Skip to main content

Module seal

Module seal 

Source
Expand description

Deterministic, tamper-evident sealing — a self-contained copy of the DSFB CanonicalHasher discipline.

This crate keeps its own copy (like dsfb-chemical-engineering-atlas does) so the runtime substrate has no dependency on any chemical crate — it is a generic mechanism. The protocol is byte-identical to the edge crate’s: each field is encoded as len(label) LE | label | len(value) LE | value, so field order and content are unambiguous and two runs over the same inputs produce the same digest.

Structs§

CanonicalHasher
A canonical, order-stable SHA-256 sealer. Build a preimage from labelled fields, then finalize.

Functions§

sha256
One-shot raw-bytes SHA-256 → 32 bytes.
to_hex
Lowercase hex of a 32-byte digest.