pub fn constant_time_compare(a: &[u8], b: &[u8]) -> boolExpand description
Perform constant-time comparison of byte arrays
This function provides protection against timing attacks by ensuring the comparison takes the same amount of time regardless of where the first difference occurs.
§Arguments
a- First byte array to compareb- Second byte array to compare
§Returns
true if arrays are equal, false otherwise
§Security
Uses the subtle crate’s constant-time comparison to prevent
timing side-channel attacks.