【发布时间】:2021-07-19 18:08:46
【问题描述】:
我在散列密码时卡住了。这是我的代码:
const salt = await bcrypt.gentSalt(10);
const hashPassword = await bcrypt.hash(req.body.password, salt);
这是我的用户身体数据代码:
const user = new User({
name: req.body.name,
email: req.body.email,
password: hashPassword,
});
【问题讨论】:
-
"gentSalt" !== "genSalt".
标签: javascript node.js web hash