Skip to content

crypto.password.verify ​

Verifies a password against a previously generated hash.

Signature ​

luau
function verify(hash: string, password: string): boolean

Summary ​

Parameters ​

ParameterTypeDescription
hashstringThe hashed password to verify against.
passwordstringThe plain text password to check.

Example ​

lua
local crypto = require("@runtime/crypto")

local ok = crypto.password.verify(hashedPassword, "hunter2")
if ok then
    print("Password is correct!")
end