Skip to content

Instantly share code, notes, and snippets.

@audstanley
Created January 10, 2017 22:03
Show Gist options
  • Select an option

  • Save audstanley/8c2f272805bc8c9027ab90409d894626 to your computer and use it in GitHub Desktop.

Select an option

Save audstanley/8c2f272805bc8c9027ab90409d894626 to your computer and use it in GitHub Desktop.
var bcrypt = require('bcrypt');
const saltRounds = 10;
const myPlaintextPassword = 'thisisplaintext';
bcrypt.genSalt(saltRounds, function(err, salt) {
bcrypt.hash(myPlaintextPassword, salt, function(err, hash) {
console.log(hash);
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment