Skip to main content

constant_time_eq

Function constant_time_eq 

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

Constant-time byte comparison so admin-key validation does not leak the key via early-exit timing. Length difference is allowed to short-circuit (key length is not the secret); equal-length inputs are compared in full.