Skip to main content

encode_deterministic_cbor

Function encode_deterministic_cbor 

Source
pub fn encode_deterministic_cbor(
    value: &DeterministicCborValue,
) -> Result<Zeroizing<Vec<u8>>, DeterministicCborError>
Expand description

Encode a value using the deterministic generic-CBOR profile.

The encoder validates limits and computes the exact output length before allocating the result. Temporary encoded map-key buffers are zeroized after sorting and duplicate detection.