Function constant_time_eq::constant_time_eq_n
source · [−]Expand description
Compares two fixed-size byte strings in constant time.
Examples
use constant_time_eq::constant_time_eq_n;
assert!(constant_time_eq_n(&[3; 20], &[3; 20]));
assert!(!constant_time_eq_n(&[3; 20], &[7; 20]));