Expand description
Structural validation of untrusted images.
Validation is total and fail-closed: every byte of the buffer is accounted
for before any caller receives a node, a string, a blob or a
crate::view::InfinityView. The checker enforces the canonical form as
well as safety — sorted symbol tables, zeroed padding, zeroed unused record
fields — so a validated image cannot carry covert payload in slack space,
and a validated image re-encodes to itself.
Work is bounded by Limits: counts are checked against the remaining
bytes before allocation, traversals are iterative (no recursion), and every
reference is bounds-checked.
Structs§
- Validated
- A validated image plus zero-copy accessors.
Functions§
- is_
hash_ entry - Report whether a value is a hash provenance entry (helper for projections).
- provenance_
hash_ of - Parse a provenance block from bytes already validated (used by tests).
- validate
- Validate a buffer with the default options.
- validate_
canonical - Validate and additionally prove
bufis exactly the canonical encoding of its own content. - validate_
with - Validate a buffer with explicit options.