How to use the bcrypt-nodejs.hashSync function in bcrypt-nodejs

To help you get started, we’ve selected a few bcrypt-nodejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github worknenjoy / gitpay / models / user.js View on Github external
generateHash: (password) => {
        /* eslint-disable no-sync */
        return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null)
      }
    },
github ChereeNielson / MovieMate / models / users.js View on Github external
Users.addHook("beforeCreate", function(users) {
    users.password = bcrypt.hashSync(
      users.password,
      bcrypt.genSaltSync(10),
      null
    );
  });
github ChickenKyiv / stripe-recurring-membership / server / models / user.js View on Github external
userSchema.methods.generateHash = function(password) {

  return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
};
github btomashvili / user-identity / app / models / users.js View on Github external
userSchema.methods.generateHash = function(password) {
    var bcrypt = require('bcrypt-nodejs')
    return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null)
}
github gustavohenrique / gh1 / server / nodejs / src / models / User.js View on Github external
function hashPassword (instance) {
        var salt = bcrypt.genSaltSync(10);
        var hash = bcrypt.hashSync(instance.password, salt);
        instance.password = hash;
    }

bcrypt-nodejs

A native JS bcrypt library for NodeJS.

Unknown
Latest version published 11 years ago

Package Health Score

39 / 100
Full package analysis