Skip to main content

decode_dag_cbor

Function decode_dag_cbor 

Source
pub fn decode_dag_cbor(bytes: &[u8]) -> Result<CborValue, CborError>
Expand description

Decode canonical DAG-CBOR bytes into a CborValue.

This decoder is intentionally strict:

  • rejects non-canonical encodings
  • rejects floats, tags, and indefinite-length items
  • enforces UTF-8 string map keys
  • enforces canonical map key ordering

Suitable only for cryptographic / authoritative CBOR.