首页 > 编程学习 > Node:加盐salt密码验证
2015九月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));

Loading

本文地址:https://wizzer.cn/archives/3171 , 转载请保留.

本文目前尚无任何评论.

发表评论