File tree Expand file tree Collapse file tree 4 files changed +19
-9
lines changed Expand file tree Collapse file tree 4 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " crypto-js" ,
3
- "version" : " 3.1.8 " ,
3
+ "version" : " 3.1.9 " ,
4
4
"description" : " JavaScript library of crypto standards." ,
5
5
"license" : " MIT" ,
6
6
"homepage" : " http://github.com/brix/crypto-js" ,
Original file line number Diff line number Diff line change 1
- ; ( function ( root , factory ) {
1
+ ; ( function ( root , factory , undef ) {
2
2
if ( typeof exports === "object" ) {
3
3
// CommonJS
4
- module . exports = exports = factory ( require ( "./core" ) ) ;
4
+ module . exports = exports = factory ( require ( "./core" ) , require ( "./evpkdf" ) ) ;
5
5
}
6
6
else if ( typeof define === "function" && define . amd ) {
7
7
// AMD
8
- define ( [ "./core" ] , factory ) ;
8
+ define ( [ "./core" , "./evpkdf" ] , factory ) ;
9
9
}
10
10
else {
11
11
// Global (browser)
466
466
var modeCreator = mode . createEncryptor ;
467
467
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
468
468
var modeCreator = mode . createDecryptor ;
469
-
470
469
// Keep at least one block in the buffer for unpadding
471
470
this . _minBufferSize = 1 ;
472
471
}
473
- this . _mode = modeCreator . call ( mode , this , iv && iv . words ) ;
472
+
473
+ if ( this . _mode && this . _mode . __creator == modeCreator ) {
474
+ this . _mode . init ( this , iv && iv . words ) ;
475
+ } else {
476
+ this . _mode = modeCreator . call ( mode , this , iv && iv . words ) ;
477
+ this . _mode . __creator = modeCreator ;
478
+ }
474
479
} ,
475
480
476
481
_doProcessBlock : function ( words , offset ) {
Original file line number Diff line number Diff line change 3717
3717
var modeCreator = mode . createEncryptor ;
3718
3718
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
3719
3719
var modeCreator = mode . createDecryptor ;
3720
-
3721
3720
// Keep at least one block in the buffer for unpadding
3722
3721
this . _minBufferSize = 1 ;
3723
3722
}
3724
- this . _mode = modeCreator . call ( mode , this , iv && iv . words ) ;
3723
+
3724
+ if ( this . _mode && this . _mode . __creator == modeCreator ) {
3725
+ this . _mode . init ( this , iv && iv . words ) ;
3726
+ } else {
3727
+ this . _mode = modeCreator . call ( mode , this , iv && iv . words ) ;
3728
+ this . _mode . __creator = modeCreator ;
3729
+ }
3725
3730
} ,
3726
3731
3727
3732
_doProcessBlock : function ( words , offset ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " crypto-js" ,
3
- "version" : " 3.1.8 " ,
3
+ "version" : " 3.1.9 " ,
4
4
"description" : " JavaScript library of crypto standards." ,
5
5
"license" : " MIT" ,
6
6
"author" : {
You can’t perform that action at this time.
0 commit comments