📅  最后修改于: 2022-03-11 15:01:29.855000             🧑  作者: Mango
const bcrypt = require('bcryptjs');
const hashPassword = async password => await bcrypt.hash(password, 10);
const validatePassword = async (password, hash) => await bcrypt.compare(password, hash);