import hashlib
def encrypt_password(passwd):
# h = hashlib.sha256(passwd.encode('utf8))
salt = "abcdeasd11234"
h = hashlib.sha256()
h.update(passwd.encode('utf8'))
h.update(salt.encode('utf8'))
return h.hexdigest()
print(encrypt_password("123"))
hashlib模块简单使用
最新推荐文章于 2024-09-09 00:00:00 发布