windows上用bcrypt-nodejs 替代 bcrypt
相對應(yīng)的代碼為
var?bcrypt?=?require('bcrypt-nodejs') ... bcrypt.hash(user.password,?null,?null,?function?(err,?hash){ if?(err)?{ return?next(err) }? user.password?=?hash next()? })
相對應(yīng)的代碼為
var?bcrypt?=?require('bcrypt-nodejs') ... bcrypt.hash(user.password,?null,?null,?function?(err,?hash){ if?(err)?{ return?next(err) }? user.password?=?hash next()? })
2015-02-01
舉報(bào)
2015-05-31
嗯,bcrypt和bcrypt-nodejs對同一字符串進(jìn)行hash之后值好像是不一樣的,導(dǎo)致先用bcrypt在改用bcrypt-nodejs會出現(xiàn)錯(cuò)誤
2015-05-21
非常感謝答案