crypto_argon2_verify
Verify a plaintext password against an encoded Argon2 hash. Automatically reads the Argon2 variant, version, and cost parameters from the hash string.
Instructions
Argon2 Hash Verifier. Check whether a plaintext password matches an existing Argon2 hash using PHP's password_verify, which reads the variant, version, and m/t/p parameters from the encoded hash itself. Use this to verify a candidate password; use crypto_argon2 instead to generate a new hash. Runs server-side on the input you provide: read-only, non-destructive, contacts no external service, and is rate-limited (5 requests/min, 30/hour, 100/day for anonymous callers; CAPTCHA may trigger above 20/hour). Returns whether the password matched plus the parameters parsed from the hash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | Yes | The plaintext password to test against the hash. | |
| hash | Yes | The encoded Argon2 hash to verify against, in PHP's PHC format produced by crypto_argon2: $argon2id$v=19$m=65536,t=4,p=3$<saltBase64>$<hashBase64>. The variant, version, and m/t/p cost parameters are read from this string; argon2i and argon2id are both accepted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | No | The plaintext password that was tested (echoed from the request). | |
| hash | No | The encoded Argon2 hash that was checked (echoed from the request). | |
| verified | No | True when the password matches the supplied hash. | |
| info | No | Components parsed from the hash. Contains only {error} when the hash has fewer than six $-delimited segments. | |
| verifiedAt | No | ISO 8601 timestamp of when verification ran. |