Skip to main content

embedded_decoded_bytes

Function embedded_decoded_bytes 

Source
pub fn embedded_decoded_bytes(
    emb: &EmbeddedContent,
) -> Result<Vec<u8>, AcdpError>
Expand description

Decode an EmbeddedContent to its canonical byte form per acdp-data-ref.schema.json content_hash semantics:

  • json → JCS-canonicalized bytes
  • utf8 → raw UTF-8 bytes of the string
  • base64 → base64-decoded bytes of the string