Hashing takes a value and creates a hash value out of that value which is a unique set of characters that means the same thing as the initial value but more secure
const {SHA256} = require('crypto-js');
// const jwt = require('jsonwebtoken');
// const bcrypt = require('bcryptjs');
let password = '123abc!';
bcrypt.genSalt(10, (err, salt) => {
bcrypt.hash(password, salt, (err, hash) => {
console.log(hash);
})
})
let hashedPassword = "$2a$10$Wm53cIgvpkF.q431oJ3RvO4TDJ.CHiwHn46XAyyTl/W0at98EL1NG";
bcrypt.compare(password, hashedPassword, (err, res) => {
console.log(res);
});