templates/api/models/Passport.js
function hashPassword (passport, next) {
  if (passport.password) {
    bcrypt.hash(passport.password, 10, function (err, hash) {
      passport.password = hash;
      next(err, passport);
    });
  } else {
    next(null, passport);
  }
}
function hashPassword (passport, next) {
  if (passport.password) {
    bcrypt.hash(passport.password, 10, function (err, hash) {
      passport.password = hash;
      next(err, passport);
    });
  } else {
    next(null, passport);
  }
}
function hashPassword ( passport , next ) { if ( passport . password ) { bcrypt . hash ( passport . password , 10 , function ( err , hash ) { passport . password = hash ; next ( err , passport ) ; } ) ; } else { next ( null , passport ) ; } }
Hash a passport password.

@param {Object}   password
@param {Function} next
Hash a passport password .