📅  最后修改于: 2022-03-11 15:01:21.385000             🧑  作者: Mango
//hash password
const hashedPassword = bcrypt.hashSync(yourPasswordFromSignupForm, bcrypt.genSaltSync());
//verify password
const doesPasswordMatch = bcrypt.compareSync(yourPasswordFromLoginForm, yourHashedPassword)