Pudu programming language
Menu
API reference

Std.Crypto.secretsMatch

1 declaration

fn

secretsMatch: Str -> Str -> Bool

This is a callable function.

What it does

Whether two texts are the same, compared in constant time.

For comparing a token a caller was given against one it holds, where the

time an ordinary comparison takes would leak how much of it was right.

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.

Back to Std.CryptoSearch related declarations