simonepri / upash

🔒Unified API for password hashing algorithms
https://www.npmjs.com/upash
MIT License
536 stars 24 forks source link

Adding support for needsRehash #12

Open thetutlage opened 5 years ago

thetutlage commented 5 years ago

First of all, it is a great, well written project. Thanks 🙏

Since uphash has the params and version information, I was thinking, if we should add support for needsRehash function, that returns a boolean, if the config values are different from the encoded values. PHP already does the same.

Ideally the function will be added to the underlying libraries @phc/bcrypt, @phc/argon2 and I am happy to work on the PR, if you think we should add it