Also here is some info on using bcrypt: https://auth0.com/blog/hashing-in-action-understanding-bcrypt/
Note the use of multiple salt rounds.
const bcrypt = require("bcrypt");
const saltRounds = 10;
const plainTextPassword1 = "DFGh5546*%^__90";
bcrypt
gives us access to a Node.js library that has utility methods to facilitate the hashing process. saltRounds
represent the cost or work factor. We are going to use a random password, plainTextPassword1
, for the example.