Skip to main content

Crate base64_ng_serde

Crate base64_ng_serde 

Source
Expand description

Optional serde integration for base64-ng.

This crate keeps serialization support out of the core package. It provides explicit wrappers and #[serde(with = "...")] modules so applications must choose the alphabet and padding policy at the field boundary.

§Security

Deserialization helpers in this crate use base64_ng::Engine::decode_vec, the strict timing-variable decoder. They map decode failures to redacted error classes, but they are not constant-time-oriented secret decoders. Do not use these serde modules for API keys, bearer tokens, private keys, or other secret-bearing fields when malformed-input timing matters. Decode those values explicitly with base64_ng::ct or with base64_ng_sanitization::CtDecodeSanitizationExt instead.

Modules§

mime
Serde helpers for MIME Base64 fields with 76-column CRLF wrapping.
pem
Serde helpers for PEM Base64 fields with 64-column LF wrapping.
standard
Serde helpers for strict standard padded Base64 fields.
standard_no_pad
Serde helpers for strict standard unpadded Base64 fields.
url_safe
Serde helpers for URL-safe padded Base64 fields.
url_safe_no_pad
Serde helpers for URL-safe unpadded Base64 fields.

Structs§

Base64Standard
Owned bytes serialized as strict standard padded Base64.
Base64UrlSafeNoPad
Owned bytes serialized as URL-safe unpadded Base64.