const bcrypt = require('bcryptjs'); // npm i bcryptjs const password = "12345" let salt = bcrypt.genSaltSync(10); let hash = bcrypt.hashSync(password, salt); // check hash password // bcrypt.compareSync(password, hashPassword);