Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/bcrypt-isaac.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
else if (typeof rounds !== 'number')
throw Error("Illegal arguments: "+(typeof rounds)+", "+(typeof seed_length));
if (rounds < 4 || rounds > 31)
throw Error("Illegal number of rounds: "+rounds);
throw Error("Illegal number of rounds (4-31): "+rounds);
var salt = [];
salt.push("$2a$");
if (rounds < 10)
Expand Down Expand Up @@ -988,7 +988,7 @@

// Validate
if (rounds < 4 || rounds > 31) {
err = Error("Illegal number of rounds: "+rounds);
err = Error("Illegal number of rounds (4-31): "+rounds);
if (callback) {
nextTick(callback.bind(this, err));
return;
Expand Down
4 changes: 2 additions & 2 deletions dist/bcrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
else if (typeof rounds !== 'number')
throw Error("Illegal arguments: "+(typeof rounds)+", "+(typeof seed_length));
if (rounds < 4 || rounds > 31)
throw Error("Illegal number of rounds: "+rounds);
throw Error("Illegal number of rounds (4-31): "+rounds);
var salt = [];
salt.push("$2a$");
if (rounds < 10)
Expand Down Expand Up @@ -984,7 +984,7 @@

// Validate
if (rounds < 4 || rounds > 31) {
err = Error("Illegal number of rounds: "+rounds);
err = Error("Illegal number of rounds (4-31): "+rounds);
if (callback) {
nextTick(callback.bind(this, err));
return;
Expand Down
10 changes: 5 additions & 5 deletions src/bcrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
(function(global) {
"use strict";

/**
* bcrypt namespace.
* @type {Object.<string,*>}
Expand Down Expand Up @@ -104,7 +104,7 @@
else if (typeof rounds !== 'number')
throw Error("Illegal arguments: "+(typeof rounds)+", "+(typeof seed_length));
if (rounds < 4 || rounds > 31)
throw Error("Illegal number of rounds: "+rounds);
throw Error("Illegal number of rounds (4-31): "+rounds);
var salt = [];
salt.push("$2a$");
if (rounds < 10)
Expand Down Expand Up @@ -256,11 +256,11 @@
throw Error("Illegal hash length: "+hash.length+" != 60");
return hash.substring(0, 29);
};

//? include("bcrypt/util.js");

//? include("bcrypt/impl.js");

//? if (ISAAC) include("bcrypt/prng/isaac.js");

/* CommonJS */ if (typeof module !== 'undefined' && module["exports"])
Expand All @@ -269,5 +269,5 @@
define(function() { return bcrypt; });
/* Global */ else
(global["dcodeIO"] = global["dcodeIO"] || {})["bcrypt"] = bcrypt;

})(this);
2 changes: 1 addition & 1 deletion src/bcrypt/impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function _crypt(b, salt, rounds, callback, progressCallback) {

// Validate
if (rounds < 4 || rounds > 31) {
err = Error("Illegal number of rounds: "+rounds);
err = Error("Illegal number of rounds (4-31): "+rounds);
if (callback) {
nextTick(callback.bind(this, err));
return;
Expand Down