File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ UserSchema
38
38
. set ( function ( password ) {
39
39
this . _password = password ;
40
40
this . salt = this . makeSalt ( ) ;
41
- this . hashedPassword = this . encryptPassword ( password , this . salt ) ;
41
+ this . hashedPassword = this . encryptPassword ( password ) ;
42
42
} )
43
43
. get ( function ( ) {
44
44
return this . _password ;
@@ -120,7 +120,7 @@ UserSchema.methods = {
120
120
* @api public
121
121
*/
122
122
authenticate : function ( plainText ) {
123
- return this . encryptPassword ( plainText , this . salt ) === this . hashedPassword ;
123
+ return this . encryptPassword ( plainText ) === this . hashedPassword ;
124
124
} ,
125
125
126
126
/**
@@ -140,7 +140,7 @@ UserSchema.methods = {
140
140
* @return {String }
141
141
* @api public
142
142
*/
143
- encryptPassword : function ( password , salt ) {
143
+ encryptPassword : function ( password ) {
144
144
if ( ! password || ! this . salt ) return '' ;
145
145
var salt = new Buffer ( this . salt , 'base64' ) ;
146
146
return crypto . pbkdf2Sync ( password , salt , 10000 , 64 ) . toString ( 'base64' ) ;
You can’t perform that action at this time.
0 commit comments