Skip to main content

codec_base64/
lib.rs

1// SPDX-FileCopyrightText: 2026 ReallyMe Technologies Limited
2//
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5//! Standard base64 (RFC 4648) encode/decode with canonical padding required on decode.
6
7mod decode;
8mod encode;
9mod error;
10
11pub use codec_proto::generated::proto::reallyme::codec::v1::CodecBase64DecodeLimits as Base64DecodeLimits;
12pub use decode::{
13    base64_to_bytes, base64_to_bytes_with_limits, DEFAULT_BASE64_DECODED_OUTPUT_BYTES,
14};
15mod limits;
16pub use encode::bytes_to_base64;
17pub use error::Base64Error;
18pub use limits::MAX_BASE64_INPUT_LEN;