Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports.hash = async function hash(password) {
const salt = await bcrypt.genSaltAsync(rounds);
const hash = await bcrypt.hashAsync(password, salt);
return hash;
};