Std.Crypto.digestsMatch
1 declaration
fn
digestsMatch: &Std.Crypto.Digest -> &Std.Crypto.Digest -> BoolThis is a callable function.
What it does
Whether two digests are the same, compared in constant time.
Every word is examined whichever way the answer goes, so how long the
comparison took says nothing about where the two differed. A plain
comparison that stopped at the first difference would say exactly that, and
that is how a secret is guessed one byte at a time.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- & borrows a value for this call instead of moving or copying it.
