Question: Computer science python 3 program 1. Run 2 hash functions for your name and verify them. I wrote a SHA251. Can someone code one for

Computer science python 3 program 1. Run 2 hash functions for your name and verify them. I wrote a SHA251. Can someone code one for SHA256?. Create a hash function using SHA256

 import hashlib # print out the available hash algorithms print(hashlib.algorithms_available) print(hashlib.algorithms_guaranteed) hash_object = hashlib.md5(b'Hello World') # b in front of Hello World converts the string to bytes # b/c hash function only takes bytes as parameter print(hash_object.hexdigest()) # take the input from a console? mystring = input('Enter String to hash: ') # Assumes the default UTF-8 hash_object = hashlib.md5(mystring.encode()) print(hash_object.hexdigest()) # try SHA1 # produces 160 bit (20 bytes) hash values # 40 digits long # Count the output and verify it's 40 digits hash_object = hashlib.sha1(b'Hello World') hex_dig = hash_object.hexdigest() print(hex_dig) 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!