对字符串s实现32位加密
编辑日期: 2024-11-28 文章阅读: 次
@author jackzhenguo
@desc
@date 2019/10/10
109 32位加密
import hashlib
def hash_cry32(s):
m = hashlib.md5()
m.update((str(s).encode('utf-8')))
return m.hexdigest()
print(hash_cry32(1)) # c4ca4238a0b923820dcc509a6f75849b
print(hash_cry32('hello')) # 5d41402abc4b2a76b9719d911017c592