Created
November 18, 2021 13:43
-
-
Save tychobrailleur/210194dd0c5fa4852681a5c305f9c934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bcrypt = require('bcrypt'); | |
const saltRounds = 12; | |
const myPassword = "password"; | |
bcrypt.genSalt(saltRounds, function(err, salt) { | |
bcrypt.hash(myPassword, salt, function(err, hash) { | |
console.log("Hash: " + hash); | |
// Store hash in your password DB. | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment