Skip to main content

codec_base64/
encode.rs

1// SPDX-FileCopyrightText: 2026 ReallyMe LLC
2//
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5use base64::{engine::general_purpose::STANDARD, Engine as _};
6
7/// Encode bytes as standard padded Base64 from RFC 4648.
8pub fn bytes_to_base64(bytes: &[u8]) -> String {
9    STANDARD.encode(bytes)
10}