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
@@ -0,0 +1,10 @@
const password = process.argv[2];
const hash = process.argv[3];
const bcrypt = require("bcrypt");
bcrypt
.compare(password, hash)
.then((res) => {
console.log(res);
})
.catch((err) => console.error(err.message));