Expand description
Comparisons of secrets whose running time does not depend on where the values first differ.
== on strings stops at the first mismatching byte, so how long a
comparison takes tells a caller how many leading bytes they got right.
Client secrets and CSRF tokens are compared here instead.
Functionsยง
- optional_
str_ eq - Whether an optional secret matches: both absent, or both present and
equal under
str_eq. - str_eq
- Whether
aandbare the same string, in time that depends only on their lengths.