Describe the bug
I've been using Argon2 in an application not written in Java. Now, I want to start checking those Argon2 hashes in my Java application using password4j.
My other application has generated an Argon2 hash that looks like this:
$argon2id$v=19$m=16384,t=2,p=1$nlm7oNI5zquzSYkyby6oVw$JOkJAYrDB0i2gmiJrXC6o2r+u1rszCm/RO9gIQtnxlY
The clear text password for this is Test123!. If I fill in those values on this online checker, things work exactly the way I want it:
https://argon2.online
But when I use password4j, I always get false when running it like this:
boolean verified = Password.check("Test123!", "$argon2id$v=19$m=16384,t=2,p=1$nlm7oNI5zquzSYkyby6oVw$JOkJAYrDB0i2gmiJrXC6o2r+u1rszCm/RO9gIQtnxlY").withArgon2();
System.out.println(verified);
I've also noticed that it seems to ignore the configuration values in the hash itself (such as t=2 and p=1). I've tried setting them to match the hash, but that shouldn't be necessary...
To Reproduce
See Java code above.
Expected behavior
I expect the above to yield true.
Environment:
- OS: Ubuntu 20.04
- JDK Oracle JDK 17
- Version 1.6.2
Additional context
N/A.
Describe the bug
I've been using Argon2 in an application not written in Java. Now, I want to start checking those Argon2 hashes in my Java application using password4j.
My other application has generated an Argon2 hash that looks like this:
The clear text password for this is
Test123!. If I fill in those values on this online checker, things work exactly the way I want it:https://argon2.online
But when I use password4j, I always get
falsewhen running it like this:I've also noticed that it seems to ignore the configuration values in the hash itself (such as
t=2andp=1). I've tried setting them to match the hash, but that shouldn't be necessary...To Reproduce
See Java code above.
Expected behavior
I expect the above to yield
true.Environment:
Additional context
N/A.