from pathlib import Path
import hashlib


def get_hash(path: Path) -> str:
    """Get the SHA256 hash digest of a file."""
    m = hashlib.sha256()
    m.update(path.read_bytes())
    return m.hexdigest()