20159 月10
Node:加盐salt密码验证
npm install bcrypt –save
var salt = bcrypt.genSaltSync(10);
var hash = bcrypt.hashSync(‘pass’, salt);
console.log(‘加密::’+hash);
console.log(‘解密::’+bcrypt.compareSync(‘pass’,hash));
本文地址:https://wizzer.cn/archives/3171 , 转载请保留.