Skip to main content

assert_ct_eq

Macro assert_ct_eq 

Source
macro_rules! assert_ct_eq {
    ($x:expr, $y:expr) => { ... };
}
Expand description

Asserts equality using ConstantTimeEq. The second argument must be a reference.

The comparison is constant time for equal-length inputs; assertion failure still branches. This macro is intended for tests, not authentication decisions.