Expand description
Minimal PEM (RFC 7468) encoding/decoding.
Implemented in-crate because the pinned rustls-pki-types on the current
registry mirror has no pem feature, and because key/certificate PEM
handling needs strict control over labels.
Structs§
- Section
- One decoded PEM section: label (e.g.
"CERTIFICATE") and DER bytes.
Functions§
- encode
- Encode
derinto a PEM block with the given label, 64-char base64 lines. - first_
section_ with_ label - Decode the first section whose label is in
labels. - sections
- Decode every PEM section found in
data. Non-PEM content between blocks is ignored; malformed blocks are skipped (lenient semantics for leading garbage; strict enough for our trusted storage inputs).