Skip to content

Commit

Permalink
fix user crypto to sha1
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhutu committed Oct 2, 2016
1 parent 025b6ca commit 277904e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/model/user.model.js
Expand Up @@ -166,7 +166,7 @@ UserSchema.methods = {
encryptPassword: function(password) {
if (!password || !this.salt) return '';
var salt = new Buffer(this.salt, 'base64');
return crypto.pbkdf2Sync(password, salt, 10000, 64, 'sha256').toString('base64');
return crypto.pbkdf2Sync(password, salt, 10000, 64, 'sha1').toString('base64');
}
}

Expand Down

0 comments on commit 277904e

Please sign in to comment.