计算字符串的MD5值 12345 import hashlibstring = ''md5 = hashlib.md5(string.encode('utf-8')).hexdigest()print(md5) 计算文件的MD5值 1234567 import hashlibfile = ''md5file = open(file, 'rb')md5 = hashlib.md5(md5file.read()).hexdigest()md5file.close()print(md5) 赞微海报分享
近期评论