How to use the bcryptjs.hashAsync 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 llambda / agilegps / src / server / lib / password.js View on Github external
module.exports.hash = async function hash(password) {
  const salt = await bcrypt.genSaltAsync(rounds);
  const hash = await bcrypt.hashAsync(password, salt);
  return hash;
};

bcryptjs

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

MIT
Latest version published 8 years ago

Package Health Score

70 / 100
Full package analysis