用haslib给字符加密

import hashlib

obj = hashlib.md5(bytes("abc",encoding="utf-8")) #md5是一种加密方法
obj.update(bytes("123456", encoding="utf-8")) #下面的123456会被上面的abc所结合成为新的加密字符
result = obj.hexdigest() 
print(result)

  

猜你喜欢

转载自www.cnblogs.com/spencersun/p/9241148.html