Cryptography/hashing lib, @node-rs/argon2 might be better
npminstallbcrypt
Basics
constbcrypt=require('bcrypt');constsaltRounds=10;constmyPlaintextPassword='s0/\/\P4$$w0rD';constsomeOtherPlaintextPassword='not_bacon';//Hash Passwordbcrypt.hash(myPlaintextPassword, saltRounds).then(function(hash) {// Store hash in your password DB.});// Load hash from your password DB.bcrypt.compare(myPlaintextPassword, hash).then(function(res) {// res == true});bcrypt.compare(someOtherPlaintextPassword, hash).then(function(res) {// res == false});