import hashlib sha=hashlib.sha3_512()# define what format to encrypt sha.update('how to use sha1 in years later'.encode('utf-8'))#Define encrypted content print(sha.hexdigest())#Convert to hexadecimal encoding md5=hashlib.md5() md5.update('how to use sha1 in '.encode('utf-8')) print(md5.hexdigest())