f5f443b 16d9f16
1
2
3
4
5
6
7
8
9
10
11
import hashlib from pathlib import Path def digest_file(path): digest = hashlib.sha256() with Path(path).open("rb") as handle: for chunk in iter(lambda: handle.read(1024 * 1024), b""): digest.update(chunk) return digest.hexdigest()