cadrumo.core.identity.digest module

Content-digest alias for surfaces that content-address a payload.

A content digest is the lowercase hex SHA-256 of a payload’s exact bytes. It is not an identity minted by a service; it is a re-computable claim about bytes, so every consumer that stores one must be able to recompute it and compare. Pinning the hex-64 shape at the pydantic boundary keeps a malformed digest out of persisted records and wire payloads, where the mismatch would otherwise surface only when a later verification pass recomputes the hash.

The alias derives from core.hex.Hex64Str, the one canonical hex-64 constrained primitive every unrelated hex-64 identity concept is defined from, and lives beside SnapshotId in cadrumo.core.identity because digest-bearing records span the application, adapter, and persistence layers with no single owner.

ContentDigest