Implement better password hashing
aguacongas opened this issue · comments
Olivier Lefebvre commented
Shaptorshi Bhattacharya commented
Better Password Hashing
using bcrypt extension, we can make the password hashing better as given below:
const inputPassword = req.body.password
const salt = await bcrypt.genSalt(10)
let securedPassword = await bcrypt.hash(inputPassword, salt)
This leads to a high security of hidding the password by strong hashing of scrambled letters and numerics.
The genSalt is the cost of processing data whose default value is 10
Olivier Lefebvre commented
Hi, thx to contribute.
The goal here is also to offer a way to choose the hash algorithm (Bcrypt, Argon2, Scrypt or PBKDF2). and to have a password migration.