Tell us what’s happening:
I’m pretty sure i’m doing this correctly, but fCC won’t pass it. The hash prints to the console and the result does too (true). I get no errors in the console. Am I doing something wrong?
//START_SYNC
var hash = bcrypt.hashSync(myPlaintextPassword, saltRounds);
console.log(hash);
var res = bcrypt.compareSync(myPlaintextPassword, hash);
console.log(res);
//END_SYNC
Your project link(s)
solution: boilerplate-bcrypt - Replit
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Information Security with HelmetJS - Hash and Compare Passwords Synchronously