Skip to main content

Crate codec_base64

Crate codec_base64 

Source
Expand description

Standard base64 (RFC 4648) encode/decode with canonical padding required on decode.

Structs§

Base64DecodeLimits
Independent budgets for strict padded-standard Base64 decoding. Omitted fields select defaults of 2,097,152 encoded bytes and 1,572,864 decoded bytes. Explicit zero permits only empty input/output. Limits must fit the platform’s addressable buffer size. Encoded bytes exclude any caller-removed data-URL prefix; alphabet, padding and unused pad bits must be canonical RFC 4648. The native API may raise either budget; transport envelopes retain their existing independent hard limits.

Enums§

Base64Error
Error returned when base64 decoding fails.

Constants§

DEFAULT_BASE64_DECODED_OUTPUT_BYTES
Default decoded-byte budget paired with the historical encoded-input cap.
MAX_BASE64_INPUT_LEN
Maximum accepted encoded base64 text length.

Functions§

base64_to_bytes
Decode standard padded Base64 with the historical 2 MiB input limit. The returned bytes retain the existing caller-owned cleanup contract.
base64_to_bytes_with_limits
Decode strict padded-standard Base64 into a wiping owner.
bytes_to_base64
Encode bytes as standard padded Base64 from RFC 4648.