Skip to main content

parse_signed_note

Function parse_signed_note 

Source
pub fn parse_signed_note(
    note: &str,
) -> Result<(String, Vec<NoteSignature>), TransparencyError>
Expand description

Parse a C2SP signed note into its body and signature components.

A signed note has the format:

<body lines>\n
\n
— <key_name> <base64(alg + key_id + sig)>\n

Args:

  • note — The full signed note text.

Usage:

let (body, sigs) = parse_signed_note(note_text)?;