DEV Community

Discussion on: How to hash your passwords in Node.js Easily.

Collapse
 
raphym profile image
Raphael • Edited

You just hash your password, this is not called encrypt...

Encryption is a two-way function; what is encrypted can be decrypted with the proper key. Hashing, however, is a one-way function that scrambles plain text to produce a unique message digest. With a properly designed algorithm, there is no way to reverse the hashing process to reveal the original password. An attacker who steals a file of hashed passwords must then guess the password.

Collapse
 
syedumaircodes profile image
Syed Umair Ali

Thank you for pointing it out.