Expand description
Standard base64 (RFC 4648) encode/decode with canonical padding required on decode.
Structs§
- Base64
Decode Limits - 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§
- Base64
Error - 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.