Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aes-js

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aes-js - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

7

index.js

@@ -635,5 +635,10 @@ "use strict";

// We cannot safely handle numbers beyond the safe range for integers
if (value > Number.MAX_SAFE_INTEGER) {
throw new Error('integer value out of safe range');
}
for (var index = 15; index >= 0; --index) {
this._counter[index] = value % 256;
value = value >> 8;
value = parseInt(value / 256);
}

@@ -640,0 +645,0 @@ }

2

package.json
{
"name": "aes-js",
"version": "3.0.0",
"version": "3.1.0",
"bugs": {

@@ -5,0 +5,0 @@ "url": "http://github.com/ricmoo/aes-js/issues",

@@ -68,2 +68,4 @@ var nodeunit = require('nodeunit');

'test-counter-number-256': makeTest({number: 256, incrementResult: "00000000000000000000000000000101"}),
'test-counter-number-large': makeTest({number: 1099511627774, incrementResult: "0000000000000000000000ffffffffff"}),
'test-counter-number-max': makeTest({number: 9007199254740991, incrementResult: "00000000000000000020000000000000"}),
'test-counter-bytes-0000': makeTest({bytes: "00000000000000000000000000000000", incrementResult: "00000000000000000000000000000001"}),

@@ -70,0 +72,0 @@ 'test-counter-bytes-00ff': makeTest({bytes: "000000000000000000000000000000ff", incrementResult: "00000000000000000000000000000100"}),

@@ -166,2 +166,9 @@ 'use strict';

test.throws(function() {
var counter = new aes.Counter(Number.MAX_SAFE_INTEGER + 1);
}, function(error) {
return (error.message === 'integer value out of safe range');
},
'invalid counter value (out of range) failed to throw an error');
var badThings = [0, 1.5, 1];

@@ -168,0 +175,0 @@ for (var i = 0; i < badThings.length; i++) {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc