python3 生成MD5 方法

import hashlib
data = 123
md5 = hashlib.md5(data.encode(encoding='UTF-8')).hexdigest()
print(md5)
output:
202cb962ac59075b964b07152d234b70

 

posted @ 2021-06-11 16:18  RoyFans  阅读(2261)  评论(0编辑  收藏  举报