Skip to main content

decode_into_constant_time

Function decode_into_constant_time 

Source
pub const fn decode_into_constant_time(
    output: &mut [u8],
    encoded_data: &[u8],
) -> Result<(), DecodeError>
Expand description

Constant-time hex decoding. Processes all input data without secret-dependent branches or memory accesses, making it suitable for cryptographic applications.

Note that output is written even when Err is returned, which is required for constant-time operation. Callers must not rely on the contents of output when an error is returned.

Consumers may prefer the faster decode_into which dispatches to a SIMD-accelerated path when available (non constant-time).