aws_lc_rs::constant_time

Function verify_slices_are_equal

Source
pub fn verify_slices_are_equal(a: &[u8], b: &[u8]) -> Result<(), Unspecified>
Expand description

Returns Ok(()) if a == b and Err(error::Unspecified) otherwise.

The comparison of a and b is done in constant time with respect to the contents of each, but NOT in constant time with respect to the lengths of a and b.

ยงErrors

error::Unspecified when a and b differ.