Module decoder

Module decoder 

Source
Expand description

Decoder for PEM encapsulated data.

From RFC 7468 Section 2:

Textual encoding begins with a line comprising “—–BEGIN “, a label, and “—–”, and ends with a line comprising “—–END “, a label, and “—–”. Between these lines, or “encapsulation boundaries”, are base64-encoded data according to Section 4 of RFC 4648.

Structs§

Decoder
Buffered PEM decoder.
Encapsulation 🔒
PEM encapsulation parser.

Functions§

check_for_headers 🔒
Check for PEM headers in the input, as they are disallowed by RFC7468.
decode
Decode a PEM document according to RFC 7468’s “Strict” grammar.
decode_label
Decode the encapsulation boundaries of a PEM document according to RFC 7468’s “Strict” grammar.
decode_vec
Decode a PEM document according to RFC 7468’s “Strict” grammar, returning the result as a Vec upon success.