File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ UserSchema
3838 . set ( function ( password ) {
3939 this . _password = password ;
4040 this . salt = this . makeSalt ( ) ;
41- this . hashedPassword = this . encryptPassword ( password , this . salt ) ;
41+ this . hashedPassword = this . encryptPassword ( password ) ;
4242 } )
4343 . get ( function ( ) {
4444 return this . _password ;
@@ -120,7 +120,7 @@ UserSchema.methods = {
120120 * @api public
121121 */
122122 authenticate : function ( plainText ) {
123- return this . encryptPassword ( plainText , this . salt ) === this . hashedPassword ;
123+ return this . encryptPassword ( plainText ) === this . hashedPassword ;
124124 } ,
125125
126126 /**
@@ -140,7 +140,7 @@ UserSchema.methods = {
140140 * @return {String }
141141 * @api public
142142 */
143- encryptPassword : function ( password , salt ) {
143+ encryptPassword : function ( password ) {
144144 if ( ! password || ! this . salt ) return '' ;
145145 var salt = new Buffer ( this . salt , 'base64' ) ;
146146 return crypto . pbkdf2Sync ( password , salt , 10000 , 64 ) . toString ( 'base64' ) ;
You can’t perform that action at this time.
0 commit comments