← Back to Posts

hash password in node.js

👤 علی ذوالفقار 📅 1401/09/05 18:12:37 👁️ 406 views
use bcrypt packgae to hash and compare passwords : 

hash : 
await bcrypt.hash(req.body.password,10)

compare : 
await bcrypt.compare(req.body.password, db.passwordHash)

← Back to Posts