constant_time_string_compare

Function constant_time_string_compare 

Source
pub fn constant_time_string_compare(a: &str, b: &str) -> bool
Expand description

Perform a constant-time string comparison

Compares two strings in constant time to prevent timing attacks.

§Arguments

  • a - First string to compare
  • b - Second string to compare

§Returns

true if strings are equal, false otherwise