📜  Strapi 用于密码的算法 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:29.855000             🧑  作者: Mango

代码示例1
const bcrypt = require('bcryptjs');



const hashPassword = async password => await bcrypt.hash(password, 10);

const validatePassword = async (password, hash) => await bcrypt.compare(password, hash);