A short project dedicated to learning about password hashing, salts, and asynchronous events. Made with Node.js and bcrypt
- Easily change the two passwords to be compared and the number of salt rounds
- Displays and compares the two hashes as well as the salt
- Add visual interface through html
awaitcan be used to handle asynchronous password hashing, which is preferable because password hashing is an intensive taskawaitonly pauses execution (and waits for thePromiseto resolve) for the next line in the function block- If code is dependent on the
Promiseresolving (in this case, the hash being calculated), it should be placed in the same block as theawaitstatement - Otherwise, the event loop will continue executing synchronous functions while the
Promiseresolves
Project is created with:
- node.js
- bcrypt.js
- Thank you to heynode.com for providing such a stellar bcrypt tutorial
- Link to Tutorial
