antelle / argon2-browser

Argon2 library compiled for browser runtime
https://antelle.net/argon2-browser
MIT License
367 stars 79 forks source link

How to verify an Argon2 Hash? #7

Closed ibudisteanu closed 6 years ago

ibudisteanu commented 6 years ago

How do you verify an Argon2 Hash with this library in the browser?

antelle commented 6 years ago

Hi! There's no way to do it with the current setup. If you need verify function, you can add it here: https://github.com/antelle/argon2-browser/blob/master/build-wasm.sh#L8, to EXPORTED_FUNCTIONS list. However I haven't tested it, maybe some fixes will be required.

Nantris commented 5 years ago

@antelle - Is there any chance of seeing plain old JavaScript, or WASM support for hash verification in this repo without forking?

Seems like the last missing piece to a perfect, browser-friendly Argon2 implementation.

antelle commented 5 years ago

Added argon2-verify in v1.5.0, here's an example:

argon2.verify({ pass: 'password', encoded: 'enc-hash' })
    .then(() => console.log('OK'))
    .catch(e => console.error(e.message, e.code))
Nantris commented 5 years ago

If all my Github issues were resolved as quickly as the ones in this repo I'd be a year ahead of schedule!

Thank you @antelle!