Skip to content

Commit 5824844

Browse files
committed
added sync hashing and comapring
1 parent 08150cb commit 5824844

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => {
2222

2323
//END_ASYNC
2424

25+
var hash = bcrypt.hashSync(myPlaintextPassword, saltRounds);
26+
console.log(hash);
27+
var result = bcrypt.compareSync(myPlaintextPassword, hash);
28+
console.log(result);
29+
30+
2531
//START_SYNC
2632

2733

0 commit comments

Comments
 (0)