Expand description
SHA-256, hand-rolled — the one hash the format’s entry identity needs, kept in-crate so “serde-only, no engine required” stays literally true on every target (spec/session.md’s canonical-hash rule names the algorithm; it doesn’t get to name a dependency).
Verified against the FIPS 180-4 test vectors in the tests below and
by the cross-language canonical-JSON golden in tests/. This is
content addressing, not cryptography: the threat is drift between
writers, not adversaries.
Functions§
- sha256
- SHA-256 of
bytes, as 32 raw bytes. - sha256_
hex - SHA-256 of
bytes, lowercase hex.