我试图计算pycharm中“Disk image”USbImg.E01的散列值
import hashlib
try:
file = open("F:/USB Try MATCH/USBTRY.E01",'r')
except:
print("\nFile not found")
ad5 = hashlib.md5()
ad5.update(file)
print("md5: %s" % ad5.hexdigest())
object supporting the buffer API required
Tags:
导入hashlib 字段名='F:/NEWIMG2/ABC.E01' hashermd5=hashlib.md5() 以open(fiename,'rb')作为open\u文件: content=open\u file.read() hashermd5.update(内容) 打印(“md5:%s”%hashermd5.hexdigest())
相关问题 更多 >
编程相关推荐