Replacement for md5 module in Python 3?

随声附和 提交于 2019-12-09 07:38:05

问题


Is there any other module for md5?


回答1:


It is in hashlib

import hashlib
print(hashlib.md5('asd'.encode()).hexdigest())



回答2:


It has been deprecated since version 2.5. You must use hashlib.




回答3:


From: http://www.python.org/dev/peps/pep-0004/

MD5 have been replaced by the 'hashlib' module.



来源:https://stackoverflow.com/questions/4954602/replacement-for-md5-module-in-python-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!