artifact.py python
12 lines 304 B
Raw
sha256:cb0d285531d52a0703d33e76389edd88459e272649b519516caf3aef09339b11 docs: restore original site design with bounded-v1 copy Human 9 days ago
1 """Artifact digest helpers (§K9.8)."""
2
3 from __future__ import annotations
4
5 import hashlib
6 from pathlib import Path
7
8
9 def sha256_file_bytes(path: Path) -> str:
10 """Return lowercase hex SHA-256 of raw file bytes."""
11 digest = hashlib.sha256(path.read_bytes()).hexdigest()
12 return digest.lower()
File History 1 commit
sha256:cb0d285531d52a0703d33e76389edd88459e272649b519516caf3aef09339b11 docs: restore original site design with bounded-v1 copy Human 9 days ago