import hashlib sha=hashlib.sha3_512()#定义加密成什么格式 sha.update('how to use sha1 in 年后 '.encode('utf-8'))#定义加密的内容 print(sha.hexdigest())#转换为16进制的编码 md5=hashlib.md5() md5.update('how to use sha1 in '.encode('utf-8')) print(md5.hexdigest())
import hashlib sha=hashlib.sha3_512()#定义加密成什么格式 sha.update('how to use sha1 in 年后 '.encode('utf-8'))#定义加密的内容 print(sha.hexdigest())#转换为16进制的编码 md5=hashlib.md5() md5.update('how to use sha1 in '.encode('utf-8')) print(md5.hexdigest())