How to use the genSaltSync function from bcrypt-nodejs
Find comprehensive JavaScript bcrypt-nodejs.genSaltSync code examples handpicked from public code repositorys.
GitHub: drabinowitz/CourseBuilder
43 44 45 46 47 48 49 50 51 52
initialize: function() { this.on('saving', function(model,attrs,options){ if (model.get('authType') === 'local'){ var password = model.get('password'); var salt = bcrypt.genSaltSync(); var hash = bcrypt.hashSync(password); model.set('password',hash); } });
0
10
2
bcrypt-nodejs.hashSync is the most popular function in bcrypt-nodejs (111 examples)