Skip to main content

Module cbor

Module cbor 

Source
Expand description

A minimal CBOR (RFC 8949) decoder for WebAuthn: attestation objects and COSE keys. Definite lengths only (CTAP2 canonical encoding never uses indefinite ones), nesting capped, every length checked against the input before anything is allocated. Floats are skipped over, not interpreted.

Enums§

Value
A decoded item.

Functions§

decode
Decode one item from the front of input; returns it and how many bytes it took. Trailing bytes are the caller’s business (authenticator data carries extensions after the credential key).
decode_all
Decode exactly one item spanning all of input.