"""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()