Permalink
Browse files

Fix deprecation warnings with bcrypt >= 0.5.0.

  • Loading branch information...
1 parent 5b6b200 commit 5ea5d80fb562f859230ffda832b8e7ba603ae471 @justinlatimer justinlatimer committed Jan 19, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/modules/password/plugin.js
  2. +1 −1 package.json
@@ -36,8 +36,8 @@ exports = module.exports = function (schema, opts) {
return this._password;
}).set( function (password) {
this._password = password;
- var salt = this.salt = bcrypt.gen_salt_sync(10);
- this.hash = bcrypt.encrypt_sync(password, salt);
+ var salt = this.salt = bcrypt.genSaltSync(10);
+ this.hash = bcrypt.hashSync(password, salt);
});
schema.method('authenticate', function (password, callback) {
View
@@ -13,7 +13,7 @@
"lib": "."
},
"dependencies": {
- "bcrypt":">=0.2.0",
+ "bcrypt":">=0.5.0",
"mongoose": ">=1.4.0",
"everyauth": "0.2.23",
"mongoose-types": ">=1.0.3"

0 comments on commit 5ea5d80

Please sign in to comment.