File size: 260 Bytes
fe31b61 | 1 2 3 4 5 6 7 8 9 | """Exact helper functions extracted from the frozen source adapter."""
import hashlib
from pathlib import Path
def sha(path):
h=hashlib.sha256()
with Path(path).open('rb') as f:
while part:=f.read(8<<20):h.update(part)
return h.hexdigest()
|