模板

1
2
3
4
5
import hashlib

with open(path, "rb") as f:
bytes = f.read()
md5 = hashlib.md5(bytes).hexdigest()