pub const fn encode_into_constant_time(
output: &mut [u8],
data: &[u8],
alphabet: Alphabet,
) -> Result<(), EncodeError>Expand description
Constant-time base32 encoding. Processes all input data without secret-dependent branches or memory accesses, making it suitable for cryptographic applications.
Consumers may prefer the faster encode_into which dispatches to
a SIMD-accelerated path when available (non constant-time).
ยงExample
let mut buf = [0u8; 8];
base32::encode_into_constant_time(&mut buf, b"hello", base32::Alphabet::Rfc4648).unwrap();
assert_eq!(&buf, b"NBSWY3DP");