Skip to main content

timing_safe_eq

Function timing_safe_eq 

Source
pub fn timing_safe_eq<const N: usize>(a: &[u8; N], b: &[u8; N]) -> bool
Expand description

Constant-time equality check for fixed-size byte arrays.

Returns true iff a == b without leaking which bytes differed or at which index the comparison terminated.