Chapter 9: add hasing-with-bcrypt samples

This commit is contained in:
Beth Griggs
2020-11-13 00:26:12 +00:00
parent 30334e5ae2
commit e3202cc0f4
4 changed files with 525 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
const password = process.argv[2];
const bcrypt = require("bcrypt");
const saltRounds = 10;
bcrypt.hash(password, saltRounds, (err, hash) => {
console.log(hash);
});