pub const fn decode_into_constant_time(
output: &mut [u8],
encoded_data: &[u8],
alphabet: Alphabet,
) -> Result<(), DecodeError>Expand description
Constant-time base64 decoding. Processes all input data without secret-dependent branches or memory accesses, making it suitable for cryptographic applications.
Consumers may prefer the faster decode_into which dispatches to
a SIMD-accelerated path when available (non constant-time).
ยงExample
let mut buf = [0u8; 3];
base64::decode_into_constant_time(&mut buf, b"Zm9v", base64::Alphabet::Standard).unwrap();
assert_eq!(&buf, b"foo");