hashlib使用

提供摘要算法:主要提供SHA1,SHA224,SHA256,SHA384,SHA512,MD5算法

import hashlib

m = hashlib.md5("ddddd".encode('utf8'))        #在加密之前加盐
m.update("hello".encode('utf8'))   #添加hello
print(m.hexdigest())        #对m进行hash运算
原文地址:https://www.cnblogs.com/chrrydot/p/9810289.html