Expand description
HMAC-SHA256 hash chain for tamper-evident audit records.
Each record’s hash is HMAC(root_key, prev_hash || canonical_json(record)).
Genesis records use prev_hash = [0; 32].
Structs§
- ChainId
- A unique identifier for one chain (helps when multiple chains coexist).
- Hash
Chain - A live hash chain: holds the root key and current head hash.
Enums§
- Chain
Load Error - Errors returned by
HashChain::load_head_from_file.
Constants§
- HASH_
LEN - Length of a chain hash in bytes (32 = SHA-256 output).