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

browserify-aes

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-aes - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

7

cipherBase.js

@@ -24,5 +24,6 @@ var Transform = require('stream').Transform;

CipherBase.prototype._flush = function (next) {
var chunk = this._final();
if (chunk) {
this.push(chunk);
try {
this.push(this._final());
} catch(e) {
return next(e);
}

@@ -29,0 +30,0 @@ next();

{
"name": "browserify-aes",
"version": "0.7.1",
"version": "0.7.2",
"description": "aes, for browserify",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -441,2 +441,24 @@ var test = require('tape');

}
function incorectPaddingDoesNotThrow(padding) {
test('stream incorrect padding ' + padding.toString('hex'), function (t) {
t.plan(2);
var block1 = new Buffer(16);
block1.fill(4);
var cipher = crypto.createCipher('aes128', new Buffer('password'));
cipher.setAutoPadding(false);
var decipher = crypto.createDecipher('aes128', new Buffer('password'));
var decipher2 = _crypto.createDecipher('aes128', new Buffer('password'));
cipher.pipe(decipher);
cipher.pipe(decipher2);
cipher.write(block1);
cipher.write(padding);
decipher.on('error', function (e) {
t.ok(e, 'mine');
});
decipher2.on('error', function (e) {
t.ok(e, 'node');
});
cipher.end();
});
}
var sixteens2 = new Buffer(16);

@@ -446,2 +468,3 @@ sixteens2.fill(16);

incorectPaddingthrows(sixteens2);
incorectPaddingDoesNotThrow(sixteens2);
var fifteens2 = new Buffer(16);

@@ -452,3 +475,3 @@ fifteens2.fill(15);

incorectPaddingthrows(fifteens2);
incorectPaddingDoesNotThrow(fifteens2);
var two = _crypto.randomBytes(16);

@@ -458,2 +481,3 @@ two[15] = 2;

incorectPaddingthrows(two);
incorectPaddingDoesNotThrow(two);
test('autopadding false decipher', function (t) {

@@ -460,0 +484,0 @@ t.plan(2);

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