Expand description
Exact and normalized content hashes plus the dataset fingerprint.
Implemented by plan 02-03. Exact and normalized content hashes plus the dataset fingerprint.
Two hashes per row, for two different jobs (D-17): the exact SHA-256 over the raw
input bytes is identity and provenance; the normalized hash (nfc-trim-ws-v1 — NFC,
trimmed, internal whitespace collapsed, deliberately NO casefolding) is leakage
detection.
§This module is a LEAF
It depends on nothing else in this crate except the error type. In particular it does
not know that typed split roles exist: both fingerprints take raw parts
([SplitFingerprintInput], [DatasetFingerprintInput]) rather than a typed split, so
the hashing story is complete and testable on its own. The one place the typestate and
the hashes meet is the prepared-dataset constructor, which assembles these inputs from
its own splits.
§One construction, two domain tags
A dataset fingerprint and a single-split fingerprint absorb split parts through the same private helper. They differ only in their domain-tag prefix, which is what makes them differ even for a one-split dataset — so a split fingerprint can never be mistaken for a dataset fingerprint by a consumer comparing hex strings.
Structs§
- Dataset
Fingerprint - Identity of a WHOLE dataset.
- Split
Fingerprint - Identity of ONE split alone.
Constants§
- CONTENT_
NORMALIZATION_ VERSION - The version tag of the normalization pipeline behind
normalized_hash.
Functions§
- exact_
hash - SHA-256 over the raw bytes of
input. Identity and provenance. - hex
- Lowercase hex rendering of a digest.
- normalized_
hash - SHA-256 over the
nfc-trim-ws-v1normalization ofinput. Leakage detection.