读文文件md5值
作者:互联网
import hashlib import sys def check_md5(src): m = hashlib.md5() with open('src','rb') as fobj: while True: data = fobj.read(4096) if not data: break m.update(data) return m.hexdigest() if __name__ == '__main__': print(check_md5(sys.argv[1]))
标签:__,文件,fobj,读文,import,data,check,md5 来源: https://www.cnblogs.com/lsgo/p/10561129.html