:sig
function crypto_equal(left : string, right : string) bool

:params
left : the expected byte string
right : the submitted byte string

:returns
`true` if both byte strings are equal.

:content
`crypto_equal()` compares byte strings in constant time.

Use it to compare secrets such as HMACs and tokens. Do not use `==` to compare secrets.

:example capy render
var expected := hmac_sha256("key", "payload")
if crypto_equal(expected, hmac_sha256("key", "payload")) { print("valid\n") } else { print("invalid\n") }

:see-group
crypto

:see
csrf_valid
