Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argon2: fix addRandomSalt #143

Closed
firaja opened this issue Mar 7, 2024 · 0 comments
Closed

Argon2: fix addRandomSalt #143

firaja opened this issue Mar 7, 2024 · 0 comments
Milestone

Comments

@firaja
Copy link
Member

firaja commented Mar 7, 2024

Describe the bug
Conversion from String to byte[] changes the original generated salt in Argon2

To Reproduce

Hash hash = Password.hash(test.plainTextPassword).addRandomSalt().withArgon2();
assertTrue(Password.check(test.plainTextPassword, hash));  // fails

in particular what is generated by HashBuilder#addRandomSalt() is different from Hash#salt

Expected behavior
HashBuilder#addRandomSalt() == Hash#salt

Environment:
1.7.3+

@firaja firaja linked a pull request Mar 7, 2024 that will close this issue
@firaja firaja added this to the 1.8.1 milestone Mar 7, 2024
firaja added a commit that referenced this issue Mar 7, 2024
@firaja firaja moved this to Done in Core development Mar 7, 2024
@firaja firaja closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant