Professional Documents
Culture Documents
This Study Resource Was: Digital Assisignment-4
This Study Resource Was: Digital Assisignment-4
1. SHA-1 is a popular heuristic hash function that is currently in trend. In this experiment, we shall
familiarize ourselves with SHA-1 as well as look at one important application of hashing, namely,
the HMAC algorithm which is currently used in the Internet to achieve data integrity.
m
er as
# Method 1: Using hashlib and hmac modules
co
import hashlib
eH w
import hmac
o.
def make_digest(message, key):
rs e
ou urc
# converting into bytes
key = bytes(key, 'UTF-8')
o
#signature1 = digester.digest()
ar stu
print("Hexdigest: ",signature1)
# main function
sh
This study source was downloaded by 100000832904401 from CourseHero.com on 10-12-2021 07:47:25 GMT -05:00
https://www.coursehero.com/file/81941350/19BCI0154-VL2020210104340-AST04-1pdf/
Output:
m
er as
co
eH w
o.
rs e
ou urc
o
aC s
vi y re
ed d
ar stu
is
Th
sh
This study source was downloaded by 100000832904401 from CourseHero.com on 10-12-2021 07:47:25 GMT -05:00
https://www.coursehero.com/file/81941350/19BCI0154-VL2020210104340-AST04-1pdf/
Powered by TCPDF (www.tcpdf.org)