We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
9.0.5
Hi!
While testing with Adonis, I noticed argon.verify doesn't work with variants i and d.
i
d
To reproduce I guess you can try running these two tests and they should fail:
test('should verify a precomputed hash for variant i', async ({ assert }) => { // Precomputed hash for "password" const hash = '$argon2i$v=19$m=4096,t=4,p=2$dHRHRnJrNXhMS3hGdXp2Sg$rjAqTHriWP3GhO5/ZYoxuKcXDks/02JLGld9uBTsUgc' const argon = new Argon({ variant: 'i', iterations: 4, memory: 4096, parallelism: 2, version: 19, saltSize: 16, }) assert.isTrue(await argon.verify(hash, 'password')) }) test('should verify a precomputed hash for variant d', async ({ assert }) => { // Precomputed hash for "password" const hash = '$argon2d$v=19$m=4096,t=4,p=2$dHRHRnJrNXhMS3hGdXp2Sg$F4lQNEt3xXSCNwTOflBJPzSlNk9dN3h1+lizNakqEzs' const argon = new Argon({ variant: 'd', iterations: 4, memory: 4096, parallelism: 2, version: 19, saltSize: 16, }) assert.isTrue(await argon.verify(hash, 'password')) })
Result 👇
The problem seems to be the following code, where i should be 1 and d should be 0
/** * Supported variants */ #variants: { [K in ArgonVariants]: 0 | 1 | 2 } = { i: 0, d: 1, id: 2, }
No response
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Package version
9.0.5
Describe the bug
Hi!
While testing with Adonis, I noticed argon.verify doesn't work with variants
i
andd
.To reproduce I guess you can try running these two tests and they should fail:
Result 👇
The problem seems to be the following code, where
i
should be 1 andd
should be 0Reproduction repo
No response
The text was updated successfully, but these errors were encountered: