Examples
Verify an OpenSSL Argon2id passphrase
Input
correct horse battery stapleExpected answer
Match
Match
- Encoded hash
$argon2id$v=19$m=1024,t=2,p=1$cHVibGljLWRlbW8tc2FsdA$xopcIYSeu4N6i+rjg7AxFvOXEbyK/YZMCfJFidUmBRY
Change one capital letter in the same passphrase
Input
Correct horse battery stapleExpected answer
No match
No match
- Encoded hash
$argon2id$v=19$m=1024,t=2,p=1$cHVibGljLWRlbW8tc2FsdA$xopcIYSeu4N6i+rjg7AxFvOXEbyK/YZMCfJFidUmBRY
Keep a trailing space significant
Input
correct horse battery staple Expected answer
No match
No match
- Encoded hash
$argon2id$v=19$m=1024,t=2,p=1$cHVibGljLWRlbW8tc2FsdA$xopcIYSeu4N6i+rjg7AxFvOXEbyK/YZMCfJFidUmBRY
Verify café with an Argon2i hash
Input
caféExpected answer
Match
Match
- Encoded hash
$argon2i$v=19$m=1024,t=2,p=1$cHVibGljLWRlbW8tc2FsdA$T4UGPz3nW1UQrrK140Th0Nwt8/YPK2+3L4uREHuJyqA
Compare visually identical Unicode with different bytes
The candidate uses a separate combining accent; the fixture uses precomposed é.
Input
caféExpected answer
No match
No match
- Encoded hash
$argon2i$v=19$m=1024,t=2,p=1$cHVibGljLWRlbW8tc2FsdA$T4UGPz3nW1UQrrK140Th0Nwt8/YPK2+3L4uREHuJyqA
Distinguish a broken hash from a wrong password
Input
public-exampleExpected rejection
Message containsInvalid or unsupported Argon2 encoded hash.- Encoded hash
$argon2id$v=19$m=1024$broken
Reject a hash requesting nearly 1 TiB of memory
Input
public-exampleExpected rejection
Message containsBrowser limit: Argon2 requires at most 64 MiB, 10 iterations, 4 lanes and 256 MiB-passes.- Encoded hash
$argon2id$v=19$m=999999999,t=2,p=1$cHVibGljLWRlbW8tc2FsdA$xopcIYSeu4N6i+rjg7AxFvOXEbyK/YZMCfJFidUmBRY
Argon2 compare
Reproduce this published regression case and compare the exact result. Argon2 compare.
Input
argon2passwordExpected answer
Match
Match
- Encoded hash
$argon2i$v=19$m=4096,t=3,p=1$c29tZXNhbHQ$s43my9eBljQADuF/LWCG8vGqwAJzOorKQ0Yog8jFvbw
Format reference: Argon2 compare background and specification