Permalink
Browse files

bcrypt salt problem. Bump version

  • Loading branch information...
1 parent dd4316b commit 6e3d6ed18e3820a5f9515428fa07e9f0de13c2dc @richtera richtera committed Oct 29, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 package.json
  2. +3 −3 utils/crypto.js
View
@@ -1,7 +1,7 @@
{
"name": "calipso",
"description": "A NodeJS CMS",
- "version": "0.3.13",
+ "version": "0.3.14",
"homepage": "http://calip.so",
"repository": {
"type": "git",
View
@@ -17,14 +17,14 @@ module.exports = exports = {
* Unsure why this can be here, and does not need to be stored.
* TODO - Figure out how this works
*/
-var salt = null;
+var globalSalt = null;
function loadBCrypt() {
if (!bcrypt && !triedbcrypt) {
triedbcrypt = true;
try {
bcrypt = require("bcrypt");
- salt = bcrypt.genSaltSync(10);
+ globalSalt = bcrypt.genSaltSync(10);
calipso.silly('NOTE: bcrypt is available.');
}
catch (e) {
@@ -60,7 +60,7 @@ function check(string,hash,cb) {
function hash(string,key,cb) {
loadBCrypt();
if (bcrypt && !calipso.auth.migrate2pbkdf2) {
- cb(null, bcrypt.hashSync(string,key));
+ cb(null, bcrypt.hashSync(string,globalSalt));
}
var salt = new Buffer(key);
var items = [salt.toString('base64'), null];

0 comments on commit 6e3d6ed

Please sign in to comment.