Skip to main content

Module base64

Module base64 

Source
Expand description

Base64 encoding helpers.

Wraps the workspace base64 crate with the standard alphabet. The reference engine emits padded output (it calls OpenSSL’s BIO_f_base64() with BIO_FLAGS_BASE64_NO_NL, which suppresses embedded newlines but keeps the trailing = padding); this module preserves that behavior. Decoding accepts both padded and unpadded inputs.

Functions§

base64_decode
Decode a base64 string. Accepts both padded and unpadded inputs using the standard alphabet.
base64_encode
Encode bytes to a base64 string using the standard alphabet with trailing = padding (RFC 4648).