sha1的加密

from hashlib import sha1
#给password加密
s1 = sha1() #创建sha1加密对象
s1.update(password.encode("utf-8")) #转码(字节流)
password2 = s1.hexdigest() #将字节码转成16进制



posted on 2018-09-04 23:02  zengsf  阅读(1224)  评论(0编辑  收藏  举报

导航