Skip to main content

constant_time_eq

Function constant_time_eq 

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

Constant-time byte-string equality: early exit only on a length mismatch (lengths aren’t secret), then XOR-accumulate every byte. Shared by the session-plane preamble check and inbound API auth.