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

feat(argon2): add secret parameter #57

Merged
merged 1 commit into from
Nov 13, 2023
Merged

feat(argon2): add secret parameter #57

merged 1 commit into from
Nov 13, 2023

Conversation

malobre
Copy link
Contributor

@malobre malobre commented Nov 8, 2023

Closes #53.

@malobre
Copy link
Contributor Author

malobre commented Nov 8, 2023

@Daninet Should I add specific tests for the secret parameter or just integrate it in the existing ones ?

lib/argon2.ts Outdated Show resolved Hide resolved
@Daninet
Copy link
Owner

Daninet commented Nov 8, 2023

Awesome. You can create a new test group dedicated for the secret parameter with a few test cases here: https://github.com/Daninet/hash-wasm/blob/master/test/argon2.test.ts

Thank you!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Comment on lines +109 to +115
${argon2i} | ${'somesecret'} | ${64} | ${1} | ${1} | ${'$argon2i$v=19$m=64,t=1,p=1$c29tZXNhbHQ$feIpCNM774/NRKH7kk05fPDR9AVmS1Ti'}
${argon2d} | ${'somesecret'} | ${64} | ${1} | ${1} | ${'$argon2d$v=19$m=64,t=1,p=1$c29tZXNhbHQ$BC1zOS/31Hbq1XqrbUolSJD8lbGO5hYA'}
${argon2id} | ${'somesecret'} | ${64} | ${1} | ${1} | ${'$argon2id$v=19$m=64,t=1,p=1$c29tZXNhbHQ$RvwmOL1c3noOUb9Tb0PVAyFny0544DEN'}

${argon2i} | ${'somesecret'} | ${64} | ${2} | ${1} | ${'$argon2i$v=19$m=64,t=2,p=1$c29tZXNhbHQ$TSUIZoltkBnapO9908hb/n6UtBg/NzWC'}
${argon2d} | ${'somesecret'} | ${64} | ${2} | ${1} | ${'$argon2d$v=19$m=64,t=2,p=1$c29tZXNhbHQ$UwnJWSBvwsqUqSfQ3O8eAeM35RaF3qVV'}
${argon2id} | ${'somesecret'} | ${64} | ${2} | ${1} | ${'$argon2id$v=19$m=64,t=2,p=1$c29tZXNhbHQ$iOtAF9uLeVkqVavTbncWiTAX+a0RQ34k'}
Copy link
Contributor Author

@malobre malobre Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I validated the hashes against another implementation of argon2 (rust argon2 crate).

@malobre malobre marked this pull request as ready for review November 9, 2023 12:28
@malobre
Copy link
Contributor Author

malobre commented Nov 9, 2023

  • npm run eslint
  • npm run test

Sorry, something went wrong.

@malobre
Copy link
Contributor Author

malobre commented Nov 13, 2023

@Daninet friendly bump :)

Copy link
Owner

@Daninet Daninet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @malobre !

@Daninet Daninet merged commit ea58505 into Daninet:master Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add secret parameter to argon2 implementation
2 participants