使用python求字符串或文件的MD5 五月 21st, 2008 #以下可在python3000运行. #字符串md5,用你的字符串代替'字符串'中的内容. import hashlib md5=hashlib.md5('字符串'.encode('utf-8′)).hexdigest() print(md5) #求文件md5 import hashlib #文件位置中的路径,请用双反斜杠, 如'D:\\abc\\www\\b.msi' file='[文件位置]' md5file=open(fi…