Skip to main content

Module codec

Module codec 

Source
Expand description

Standard (RFC 4648) Base64 encode/decode with no external dependencies.

Used for two purposes:

  • Encoding an embedded C2PA Manifest Store into a data:application/c2pa;base64, reference and decoding it back out again ([crate::extract]).
  • Encoding the hard-binding hash value when serialising a c2pa.hash.data assertion to JSON (crate::hardbinding).

Enums§

DecodeError

Functions§

decode
Decode standard Base64. Rejects any character outside the alphabet (including URL-safe -/_) and any malformed padding. Whitespace is not permitted; callers must trim before decoding.
encode