python module hashlib
import hashlib
m=hashlib.md5() # Generate MD5 encrypted object
m.update('jiami-string'.encode('utf8')) # Pass in a string 'jiami-string' to the object and must be encoded as 'utf8'
m.hexdigest() # Generate a hexadecimal string print(m.hexdigest()) print --> 59e58649d0cd655002b6c101f4663db3
s=hashlib.sha256() # Generate sha256 encrypted object
s.update('jiami-string'.encode('utf8')) # Pass in a string 'jiami-string' to the object and must be encoded as 'utf8'
s.hexdigest() # Generate a hexadecimal string print(m.hexdigest()) print