标签:obj error: sdn must def pre 加密 objects tail
https://blog.csdn.net/u012087740/article/details/48439559
import hashlib import sys def md5s(): m=hashlib.md5() strs=sys.argv[1] m.update(strs.encode("utf8")) print(m.hexdigest()) if __name__==‘__main__‘: md5s()
注意update()必须指定要加密的字符串的字符编码
关于python2.7的md5加密遇到的问题(TypeError: Unicode-objects must be encoded before hashing)
标签:obj error: sdn must def pre 加密 objects tail
原文地址:https://www.cnblogs.com/davidwang456/p/8983879.html