Closed LishuGupta652 closed 2 years ago
Just use bcrypt.hash(pass, 10)
This works for me.
let pass= pass.toString();
bcrypt.hash(pass, 10);
This also works.
let pass= pass.toString(); bcrypt.hash(pass, parseInt(salt));
Thank you all this issue is now been resolved
It took me a while to figure out while this error was comming up. I tried to fix and searched a lot and finally came up with the solution that the salt created with
bcrypt.gensalt(10)
returned a string value but when i input the salt inbcrypt.hash(pass, salt)
it required me to input the salf as integerfinal solution should be using salt as a intenger
bcrypt.hash(pass, parseInt(salt))
thank you
bcrypt.compair(password.toString(),this.password) // this work for me in compairing password while login user ... thanks everyone for help
It took me a while to figure out while this error was comming up. I tried to fix and searched a lot and finally came up with the solution that the salt created with
bcrypt.gensalt(10)
returned a string value but when i input the salt inbcrypt.hash(pass, salt)
it required me to input the salf as integerfinal solution should be using salt as a intenger
bcrypt.hash(pass, parseInt(salt))