-
Notifications
You must be signed in to change notification settings - Fork 0
crypto_verify
John Regan edited this page Jan 3, 2021
·
1 revision
Wrappers for the crypto_verify
functions.
local luasodium = require'luasodium'
local message = string.rep('\0',16)
local message2 = string.rep('\0',16)
assert(luasodium.crypto_verify_16(message, message2) == true)
syntax: boolean equal = luasodium.crypto_verify_16(string message1, string message2)
Performs a constant-time comparison between message1
and message2
, both strings must be 16 bytes.
syntax: boolean equal = luasodium.crypto_verify_32(string message1, string message2)
Performs a constant-time comparison between message1
and message2
, both strings must be 32 bytes.