Skip to main content

constant_time_eq

Function constant_time_eq 

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

Compares two byte slices in constant time with respect to their contents.

§Arguments

  • &[u8] - First byte slice.
  • &[u8] - Second byte slice.

§Returns

  • bool - true when lengths and bytes are identical.