pub(crate) fn decode_secret<'a>(
input: &[u8],
output: &'a mut [u8],
) -> Result<&'a [u8], Error>
Expand description
Decode base64 input
, writing the result into output
.
input
is treated as secret, so efforts are made to avoid
leaking its value via side channels, such as timing,
memory accesses, and execution trace.
The following is deemed non-secret information:
- Appearance of whitespace in
input
- Erroneous characters in
input
(indeed, the first illegal character is quoted in the error type) - The length of
input
- The length of
output
Returns the prefix of output
that was written to.