PasswordVerify
Jump to navigation
Jump to search
passwordVerify
Queues an asynchronous Argon2id password verification operation.
Syntax
number|false passwordVerify(string password, string encodedHash, function callback)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
password |
string |
yes | The password candidate, from 1 to 256 bytes. |
encodedHash |
string |
yes | A valid encoded Argon2id hash previously produced by passwordHash.
|
callback |
function |
yes | Called as callback(success, matches, error).
|
Returns
Returns a numeric request identifier when queued, or false when validation, service availability, or queue limits reject the request.
Examples
Verify an account password:
passwordVerify(password, account.passwordHash, function(success, matches, errorMessage)
if success and matches then
outputDebugString("Password accepted")
elseif errorMessage then
outputDebugString(errorMessage)
end
end)
Notes
- Available only in server-side resource scripts.
- A successful request can still report
matches = falsefor an incorrect password. - Verification runs on the bounded password worker service and does not block the server tick.