How to use the bcryptjs.getRounds function in bcryptjs

To help you get started, we’ve selected a few bcryptjs 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 thelounge / thelounge / src / helper.js View on Github external
function passwordRequiresUpdate(password) {
	return bcrypt.getRounds(password) !== 11;
}
github ajmueller / express-auth-session / models / user.js View on Github external
function(isMatch, waterfallCb) {
			if (bcrypt.getRounds(user.password) !== config.login.passwordHashRounds) {
				user.password = passwordToCompare;

				user.save(function(err, user) {
					if (err) {
						return waterfallCb(err, isMatch);
					}

					waterfallCb(null, isMatch);
				});
			}
			else {
				waterfallCb(null, isMatch);
			}
		}
	], function(err, isMatch) {

bcryptjs

Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.

MIT
Latest version published 7 years ago

Package Health Score

73 / 100
Full package analysis