pub const fn decode_n<const N: usize>(src: &[u8; N]) -> Option<Array<N>>Expand description
Decodes a fixed-size base64 array with padding.
§Arguments
src- The encoded byte array to decode
§Returns
A Result containing the decoded byte array or an error.
§Example
use omp_core::base64;
let data = [0x48u8, 0x65, 0x6c, 0x6c, 0x6f];
let encoded = base64::encode(&data).into_vec();
let decoded = base64::decode(&encoded).into_vec().unwrap();
assert_eq!(&decoded, &data);