Tutorialspoint

string in a sequence of bytes in python

import hashlib
mystring = input('Enter string to hash: ')
hash_obj = hashlib.sha1(mystring.encode())
print(hash_obj.hexdigest())

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.