Skip to main content

ct_eq

Function ct_eq 

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

Constant-time byte-slice equality comparison.

Returns true if a and b are equal. The comparison time depends only on the length of the shorter slice, never on the position of the first differing byte.