Skip to content

Commit

Permalink
Merge branch 'release/3.1.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
evanvosberg committed Dec 14, 2016
2 parents be8d44d + 756e722 commit 0596fae
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crypto-js",
"version": "3.1.8",
"version": "3.1.9",
"description": "JavaScript library of crypto standards.",
"license": "MIT",
"homepage": "http://github.com/brix/crypto-js",
Expand Down
15 changes: 10 additions & 5 deletions cipher-core.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
;(function (root, factory) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"));
module.exports = exports = factory(require("./core"), require("./evpkdf"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core"], factory);
define(["./core", "./evpkdf"], factory);
}
else {
// Global (browser)
Expand Down Expand Up @@ -466,11 +466,16 @@
var modeCreator = mode.createEncryptor;
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
var modeCreator = mode.createDecryptor;

// Keep at least one block in the buffer for unpadding
this._minBufferSize = 1;
}
this._mode = modeCreator.call(mode, this, iv && iv.words);

if (this._mode && this._mode.__creator == modeCreator) {
this._mode.init(this, iv && iv.words);
} else {
this._mode = modeCreator.call(mode, this, iv && iv.words);
this._mode.__creator = modeCreator;
}
},

_doProcessBlock: function (words, offset) {
Expand Down
9 changes: 7 additions & 2 deletions crypto-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -3717,11 +3717,16 @@
var modeCreator = mode.createEncryptor;
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
var modeCreator = mode.createDecryptor;

// Keep at least one block in the buffer for unpadding
this._minBufferSize = 1;
}
this._mode = modeCreator.call(mode, this, iv && iv.words);

if (this._mode && this._mode.__creator == modeCreator) {
this._mode.init(this, iv && iv.words);
} else {
this._mode = modeCreator.call(mode, this, iv && iv.words);
this._mode.__creator = modeCreator;
}
},

_doProcessBlock: function (words, offset) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crypto-js",
"version": "3.1.8",
"version": "3.1.9",
"description": "JavaScript library of crypto standards.",
"license": "MIT",
"author": {
Expand Down

0 comments on commit 0596fae

Please sign in to comment.