Skip to main content

constant_time_eq

Function constant_time_eq 

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

argon2_compare() from src/argon2.c: a constant-time byte comparison.

Returns false immediately for differing lengths (the C never compares mismatched lengths — outlen is fixed by the decoded string).