Socket
Socket
Sign inDemoInstall

bcryptjs

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

2

bower.json
{
"name": "bcryptjs",
"description": "Optimized bcrypt in plain JavaScript with zero dependencies.",
"version": "2.2.0",
"version": "2.2.1",
"main": "dist/bcrypt-isaac.js",

@@ -6,0 +6,0 @@ "license": "New-BSD",

@@ -1022,3 +1022,3 @@ /*

}
rounds = 1 << rounds;
rounds = (1 << rounds) >>> 0;
var P = P_ORIG.slice(),

@@ -1025,0 +1025,0 @@ S = S_ORIG.slice(),

@@ -11,4 +11,4 @@ (function(){/*

b[m]^=e.key;for(m=g=0;m<h;m+=2)e=s(c,g),g=e.a,f[0]^=e.key,e=s(c,g),g=e.a,f[1]^=e.key,f=t(f,0,b,d),b[m]=f[0],b[m+1]=f[1];for(m=0;m<k;m+=2)e=s(c,g),g=e.a,f[0]^=e.key,e=s(c,g),g=e.a,f[1]^=e.key,f=t(f,0,b,d),d[m]=f[0],d[m+1]=f[1]}function C(c,a,b,d,g){function f(){g&&g(n/b);if(n<b)for(var e=Date.now();n<b&&!(n+=1,B(c,m,l),B(a,m,l),100<Date.now()-e););else{for(n=0;64>n;n++)for(p=0;p<k>>1;p++)t(h,p<<1,m,l);e=[];for(n=0;n<k;n++)e.push((h[n]>>24&255)>>>0),e.push((h[n]>>16&255)>>>0),e.push((h[n]>>8&255)>>>
0),e.push((h[n]&255)>>>0);if(d){d(null,e);return}return e}d&&q(f)}var h=D.slice(),k=h.length,e;if(4>b||31<b){e=Error("Illegal number of rounds (4-31): "+b);if(d){q(d.bind(this,e));return}throw e;}if(16!==a.length){e=Error("Illegal salt length: "+a.length+" != 16");if(d){q(d.bind(this,e));return}throw e;}b=1<<b;var m=H.slice(),l=I.slice(),n=0,p;G(a,c,m,l);if("undefined"!==typeof d)f();else for(;;)if("undefined"!==typeof(e=f()))return e||[]}function y(c,a,b,d){function g(b){var a=[];a.push("$2");"a"<=
f&&a.push(f);a.push("$");10>k&&a.push("0");a.push(k.toString());a.push("$");a.push(v(e,e.length));a.push(v(b,4*D.length-1));return a.join("")}if("string"!==typeof c||"string"!==typeof a){d=Error("Invalid string / salt: Not a string");if(b){q(b.bind(this,d));return}throw d;}var f,h;if("$"!==a.charAt(0)||"2"!==a.charAt(1)){d=Error("Invalid salt version: "+a.substring(0,2));if(b){q(b.bind(this,d));return}throw d;}if("$"===a.charAt(2))f=String.fromCharCode(0),h=3;else{f=a.charAt(2);if("a"!==f&&"y"!==
0),e.push((h[n]&255)>>>0);if(d){d(null,e);return}return e}d&&q(f)}var h=D.slice(),k=h.length,e;if(4>b||31<b){e=Error("Illegal number of rounds (4-31): "+b);if(d){q(d.bind(this,e));return}throw e;}if(16!==a.length){e=Error("Illegal salt length: "+a.length+" != 16");if(d){q(d.bind(this,e));return}throw e;}b=1<<b>>>0;var m=H.slice(),l=I.slice(),n=0,p;G(a,c,m,l);if("undefined"!==typeof d)f();else for(;;)if("undefined"!==typeof(e=f()))return e||[]}function y(c,a,b,d){function g(b){var a=[];a.push("$2");
"a"<=f&&a.push(f);a.push("$");10>k&&a.push("0");a.push(k.toString());a.push("$");a.push(v(e,e.length));a.push(v(b,4*D.length-1));return a.join("")}if("string"!==typeof c||"string"!==typeof a){d=Error("Invalid string / salt: Not a string");if(b){q(b.bind(this,d));return}throw d;}var f,h;if("$"!==a.charAt(0)||"2"!==a.charAt(1)){d=Error("Invalid salt version: "+a.substring(0,2));if(b){q(b.bind(this,d));return}throw d;}if("$"===a.charAt(2))f=String.fromCharCode(0),h=3;else{f=a.charAt(2);if("a"!==f&&"y"!==
f||"$"!==a.charAt(3)){d=Error("Invalid salt revision: "+a.substring(2,4));if(b){q(b.bind(this,d));return}throw d;}h=4}if("$"<a.charAt(h+2)){d=Error("Missing salt rounds");if(b){q(b.bind(this,d));return}throw d;}var k=10*parseInt(a.substring(h,h+1),10)+parseInt(a.substring(h+1,h+2),10);a=a.substring(h+3,h+25);c=E(c+("a"<=f?"\x00":""));var e=A(a,16);if("undefined"==typeof b)return g(C(c,e,k));C(c,e,k,function(a,d){a?b(a,null):b(null,g(d))},d)}var l={},u=null;try{z(1)}catch(J){}u=null;l.l=function(c){u=

@@ -15,0 +15,0 @@ c};l.genSaltSync=function(c,a){if("undefined"===typeof c)c=10;else if("number"!==typeof c)throw Error("Illegal arguments: "+typeof c+", "+typeof a);if(4>c||31<c)throw Error("Illegal number of rounds (4-31): "+c);var b=[];b.push("$2a$");10>c&&b.push("0");b.push(c.toString());b.push("$");b.push(v(z(16),16));return b.join("")};l.genSalt=function(c,a,b){"function"===typeof a&&(b=a,a=void 0);"function"===typeof c&&(b=c,c=10);if("function"!==typeof b)throw Error("Illegal callback: "+typeof b);"number"!==

{
"name": "bcryptjs",
"description": "Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.",
"version": "2.2.0",
"version": "2.2.1",
"author": "Daniel Wirtz <dcode@dcode.io>",

@@ -39,8 +39,3 @@ "contributors": [

},
"licenses" : [
{
"type" : "New-BSD, MIT",
"url" : "https://raw.githubusercontent.com/dcodeIO/bcrypt.js/master/LICENSE"
}
],
"license" : "MIT",
"scripts": {

@@ -47,0 +42,0 @@ "test": "node node_modules/testjs/bin/testjs",

@@ -409,3 +409,3 @@ /**

}
rounds = 1 << rounds;
rounds = (1 << rounds) >>> 0;
var P = P_ORIG.slice(),

@@ -412,0 +412,0 @@ S = S_ORIG.slice(),

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc