mundane::bytes

Function constant_time_eq

Source
pub fn constant_time_eq(a: &[u8], b: &[u8]) -> bool
Expand description

Constant-time byte sequence equality.

Returns true iff the bytes at a and b are equal. Takes an amount of time dependent on length, but independent of individual byte values.