Browse code

added contacts list and call recording and upgraded SIP.js library

DoubleBastionAdmin authored on 21/05/2024 02:08:44
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,6246 @@
1
+/**
2
+ * @copyright 2024 Double Bastion LLC <www.doublebastion.com>
3
+ *
4
+ * @author Double Bastion LLC
5
+ *
6
+ * @license GNU AGPL version 3 or any later version
7
+ *
8
+ * This program is free software; you can redistribute it and/or
9
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
+ * License as published by the Free Software Foundation; either
11
+ * version 3 of the License, or any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
+ *
18
+ * You should have received a copy of the GNU Affero General Public
19
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ *
22
+ *
23
+ *  The code contained in this file is identical with that of the
24
+ *  original file "crypto-js.js"(https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.js)
25
+ *
26
+ *  The copyright notice for the "crypto-js" library, which includes
27
+ *  the code from below, follows:
28
+
29
+/*
30
+# License
31
+
32
+[The MIT License (MIT)](http://opensource.org/licenses/MIT)
33
+
34
+Copyright (c) 2009-2013 Jeff Mott  
35
+Copyright (c) 2013-2016 Evan Vosberg
36
+
37
+Permission is hereby granted, free of charge, to any person obtaining a copy
38
+of this software and associated documentation files (the "Software"), to deal
39
+in the Software without restriction, including without limitation the rights
40
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
41
+copies of the Software, and to permit persons to whom the Software is
42
+furnished to do so, subject to the following conditions:
43
+
44
+The above copyright notice and this permission notice shall be included in
45
+all copies or substantial portions of the Software.
46
+
47
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
48
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
49
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
50
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
51
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
52
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
53
+THE SOFTWARE.
54
+*/
55
+
56
+;(function (root, factory) {
57
+	if (typeof exports === "object") {
58
+		// CommonJS
59
+		module.exports = exports = factory();
60
+	}
61
+	else if (typeof define === "function" && define.amd) {
62
+		// AMD
63
+		define([], factory);
64
+	}
65
+	else {
66
+		// Global (browser)
67
+		root.CryptoJS = factory();
68
+	}
69
+}(this, function () {
70
+
71
+	/*globals window, global, require*/
72
+
73
+	/**
74
+	 * CryptoJS core components.
75
+	 */
76
+	var CryptoJS = CryptoJS || (function (Math, undefined) {
77
+
78
+	    var crypto;
79
+
80
+	    // Native crypto from window (Browser)
81
+	    if (typeof window !== 'undefined' && window.crypto) {
82
+	        crypto = window.crypto;
83
+	    }
84
+
85
+	    // Native crypto in web worker (Browser)
86
+	    if (typeof self !== 'undefined' && self.crypto) {
87
+	        crypto = self.crypto;
88
+	    }
89
+
90
+	    // Native crypto from worker
91
+	    if (typeof globalThis !== 'undefined' && globalThis.crypto) {
92
+	        crypto = globalThis.crypto;
93
+	    }
94
+
95
+	    // Native (experimental IE 11) crypto from window (Browser)
96
+	    if (!crypto && typeof window !== 'undefined' && window.msCrypto) {
97
+	        crypto = window.msCrypto;
98
+	    }
99
+
100
+	    // Native crypto from global (NodeJS)
101
+	    if (!crypto && typeof global !== 'undefined' && global.crypto) {
102
+	        crypto = global.crypto;
103
+	    }
104
+
105
+	    // Native crypto import via require (NodeJS)
106
+	    if (!crypto && typeof require === 'function') {
107
+	        try {
108
+	            crypto = require('crypto');
109
+	        } catch (err) {}
110
+	    }
111
+
112
+	    /*
113
+	     * Cryptographically secure pseudorandom number generator
114
+	     *
115
+	     * As Math.random() is cryptographically not safe to use
116
+	     */
117
+	    var cryptoSecureRandomInt = function () {
118
+	        if (crypto) {
119
+	            // Use getRandomValues method (Browser)
120
+	            if (typeof crypto.getRandomValues === 'function') {
121
+	                try {
122
+	                    return crypto.getRandomValues(new Uint32Array(1))[0];
123
+	                } catch (err) {}
124
+	            }
125
+
126
+	            // Use randomBytes method (NodeJS)
127
+	            if (typeof crypto.randomBytes === 'function') {
128
+	                try {
129
+	                    return crypto.randomBytes(4).readInt32LE();
130
+	                } catch (err) {}
131
+	            }
132
+	        }
133
+
134
+	        throw new Error('Native crypto module could not be used to get secure random number.');
135
+	    };
136
+
137
+	    /*
138
+	     * Local polyfill of Object.create
139
+
140
+	     */
141
+	    var create = Object.create || (function () {
142
+	        function F() {}
143
+
144
+	        return function (obj) {
145
+	            var subtype;
146
+
147
+	            F.prototype = obj;
148
+
149
+	            subtype = new F();
150
+
151
+	            F.prototype = null;
152
+
153
+	            return subtype;
154
+	        };
155
+	    }());
156
+
157
+	    /**
158
+	     * CryptoJS namespace.
159
+	     */
160
+	    var C = {};
161
+
162
+	    /**
163
+	     * Library namespace.
164
+	     */
165
+	    var C_lib = C.lib = {};
166
+
167
+	    /**
168
+	     * Base object for prototypal inheritance.
169
+	     */
170
+	    var Base = C_lib.Base = (function () {
171
+
172
+
173
+	        return {
174
+	            /**
175
+	             * Creates a new object that inherits from this object.
176
+	             *
177
+	             * @param {Object} overrides Properties to copy into the new object.
178
+	             *
179
+	             * @return {Object} The new object.
180
+	             *
181
+	             * @static
182
+	             *
183
+	             * @example
184
+	             *
185
+	             *     var MyType = CryptoJS.lib.Base.extend({
186
+	             *         field: 'value',
187
+	             *
188
+	             *         method: function () {
189
+	             *         }
190
+	             *     });
191
+	             */
192
+	            extend: function (overrides) {
193
+	                // Spawn
194
+	                var subtype = create(this);
195
+
196
+	                // Augment
197
+	                if (overrides) {
198
+	                    subtype.mixIn(overrides);
199
+	                }
200
+
201
+	                // Create default initializer
202
+	                if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {
203
+	                    subtype.init = function () {
204
+	                        subtype.$super.init.apply(this, arguments);
205
+	                    };
206
+	                }
207
+
208
+	                // Initializer's prototype is the subtype object
209
+	                subtype.init.prototype = subtype;
210
+
211
+	                // Reference supertype
212
+	                subtype.$super = this;
213
+
214
+	                return subtype;
215
+	            },
216
+
217
+	            /**
218
+	             * Extends this object and runs the init method.
219
+	             * Arguments to create() will be passed to init().
220
+	             *
221
+	             * @return {Object} The new object.
222
+	             *
223
+	             * @static
224
+	             *
225
+	             * @example
226
+	             *
227
+	             *     var instance = MyType.create();
228
+	             */
229
+	            create: function () {
230
+	                var instance = this.extend();
231
+	                instance.init.apply(instance, arguments);
232
+
233
+	                return instance;
234
+	            },
235
+
236
+	            /**
237
+	             * Initializes a newly created object.
238
+	             * Override this method to add some logic when your objects are created.
239
+	             *
240
+	             * @example
241
+	             *
242
+	             *     var MyType = CryptoJS.lib.Base.extend({
243
+	             *         init: function () {
244
+	             *             // ...
245
+	             *         }
246
+	             *     });
247
+	             */
248
+	            init: function () {
249
+	            },
250
+
251
+	            /**
252
+	             * Copies properties into this object.
253
+	             *
254
+	             * @param {Object} properties The properties to mix in.
255
+	             *
256
+	             * @example
257
+	             *
258
+	             *     MyType.mixIn({
259
+	             *         field: 'value'
260
+	             *     });
261
+	             */
262
+	            mixIn: function (properties) {
263
+	                for (var propertyName in properties) {
264
+	                    if (properties.hasOwnProperty(propertyName)) {
265
+	                        this[propertyName] = properties[propertyName];
266
+	                    }
267
+	                }
268
+
269
+	                // IE won't copy toString using the loop above
270
+	                if (properties.hasOwnProperty('toString')) {
271
+	                    this.toString = properties.toString;
272
+	                }
273
+	            },
274
+
275
+	            /**
276
+	             * Creates a copy of this object.
277
+	             *
278
+	             * @return {Object} The clone.
279
+	             *
280
+	             * @example
281
+	             *
282
+	             *     var clone = instance.clone();
283
+	             */
284
+	            clone: function () {
285
+	                return this.init.prototype.extend(this);
286
+	            }
287
+	        };
288
+	    }());
289
+
290
+	    /**
291
+	     * An array of 32-bit words.
292
+	     *
293
+	     * @property {Array} words The array of 32-bit words.
294
+	     * @property {number} sigBytes The number of significant bytes in this word array.
295
+	     */
296
+	    var WordArray = C_lib.WordArray = Base.extend({
297
+	        /**
298
+	         * Initializes a newly created word array.
299
+	         *
300
+	         * @param {Array} words (Optional) An array of 32-bit words.
301
+	         * @param {number} sigBytes (Optional) The number of significant bytes in the words.
302
+	         *
303
+	         * @example
304
+	         *
305
+	         *     var wordArray = CryptoJS.lib.WordArray.create();
306
+	         *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
307
+	         *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
308
+	         */
309
+	        init: function (words, sigBytes) {
310
+	            words = this.words = words || [];
311
+
312
+	            if (sigBytes != undefined) {
313
+	                this.sigBytes = sigBytes;
314
+	            } else {
315
+	                this.sigBytes = words.length * 4;
316
+	            }
317
+	        },
318
+
319
+	        /**
320
+	         * Converts this word array to a string.
321
+	         *
322
+	         * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
323
+	         *
324
+	         * @return {string} The stringified word array.
325
+	         *
326
+	         * @example
327
+	         *
328
+	         *     var string = wordArray + '';
329
+	         *     var string = wordArray.toString();
330
+	         *     var string = wordArray.toString(CryptoJS.enc.Utf8);
331
+	         */
332
+	        toString: function (encoder) {
333
+	            return (encoder || Hex).stringify(this);
334
+	        },
335
+
336
+	        /**
337
+	         * Concatenates a word array to this word array.
338
+	         *
339
+	         * @param {WordArray} wordArray The word array to append.
340
+	         *
341
+	         * @return {WordArray} This word array.
342
+	         *
343
+	         * @example
344
+	         *
345
+	         *     wordArray1.concat(wordArray2);
346
+	         */
347
+	        concat: function (wordArray) {
348
+	            // Shortcuts
349
+	            var thisWords = this.words;
350
+	            var thatWords = wordArray.words;
351
+	            var thisSigBytes = this.sigBytes;
352
+	            var thatSigBytes = wordArray.sigBytes;
353
+
354
+	            // Clamp excess bits
355
+	            this.clamp();
356
+
357
+	            // Concat
358
+	            if (thisSigBytes % 4) {
359
+	                // Copy one byte at a time
360
+	                for (var i = 0; i < thatSigBytes; i++) {
361
+	                    var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
362
+	                    thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
363
+	                }
364
+	            } else {
365
+	                // Copy one word at a time
366
+	                for (var j = 0; j < thatSigBytes; j += 4) {
367
+	                    thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];
368
+	                }
369
+	            }
370
+	            this.sigBytes += thatSigBytes;
371
+
372
+	            // Chainable
373
+	            return this;
374
+	        },
375
+
376
+	        /**
377
+	         * Removes insignificant bits.
378
+	         *
379
+	         * @example
380
+	         *
381
+	         *     wordArray.clamp();
382
+	         */
383
+	        clamp: function () {
384
+	            // Shortcuts
385
+	            var words = this.words;
386
+	            var sigBytes = this.sigBytes;
387
+
388
+	            // Clamp
389
+	            words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);
390
+	            words.length = Math.ceil(sigBytes / 4);
391
+	        },
392
+
393
+	        /**
394
+	         * Creates a copy of this word array.
395
+	         *
396
+	         * @return {WordArray} The clone.
397
+	         *
398
+	         * @example
399
+	         *
400
+	         *     var clone = wordArray.clone();
401
+	         */
402
+	        clone: function () {
403
+	            var clone = Base.clone.call(this);
404
+	            clone.words = this.words.slice(0);
405
+
406
+	            return clone;
407
+	        },
408
+
409
+	        /**
410
+	         * Creates a word array filled with random bytes.
411
+	         *
412
+	         * @param {number} nBytes The number of random bytes to generate.
413
+	         *
414
+	         * @return {WordArray} The random word array.
415
+	         *
416
+	         * @static
417
+	         *
418
+	         * @example
419
+	         *
420
+	         *     var wordArray = CryptoJS.lib.WordArray.random(16);
421
+	         */
422
+	        random: function (nBytes) {
423
+	            var words = [];
424
+
425
+	            for (var i = 0; i < nBytes; i += 4) {
426
+	                words.push(cryptoSecureRandomInt());
427
+	            }
428
+
429
+	            return new WordArray.init(words, nBytes);
430
+	        }
431
+	    });
432
+
433
+	    /**
434
+	     * Encoder namespace.
435
+	     */
436
+	    var C_enc = C.enc = {};
437
+
438
+	    /**
439
+	     * Hex encoding strategy.
440
+	     */
441
+	    var Hex = C_enc.Hex = {
442
+	        /**
443
+	         * Converts a word array to a hex string.
444
+	         *
445
+	         * @param {WordArray} wordArray The word array.
446
+	         *
447
+	         * @return {string} The hex string.
448
+	         *
449
+	         * @static
450
+	         *
451
+	         * @example
452
+	         *
453
+	         *     var hexString = CryptoJS.enc.Hex.stringify(wordArray);
454
+	         */
455
+	        stringify: function (wordArray) {
456
+	            // Shortcuts
457
+	            var words = wordArray.words;
458
+	            var sigBytes = wordArray.sigBytes;
459
+
460
+	            // Convert
461
+	            var hexChars = [];
462
+	            for (var i = 0; i < sigBytes; i++) {
463
+	                var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
464
+	                hexChars.push((bite >>> 4).toString(16));
465
+	                hexChars.push((bite & 0x0f).toString(16));
466
+	            }
467
+
468
+	            return hexChars.join('');
469
+	        },
470
+
471
+	        /**
472
+	         * Converts a hex string to a word array.
473
+	         *
474
+	         * @param {string} hexStr The hex string.
475
+	         *
476
+	         * @return {WordArray} The word array.
477
+	         *
478
+	         * @static
479
+	         *
480
+	         * @example
481
+	         *
482
+	         *     var wordArray = CryptoJS.enc.Hex.parse(hexString);
483
+	         */
484
+	        parse: function (hexStr) {
485
+	            // Shortcut
486
+	            var hexStrLength = hexStr.length;
487
+
488
+	            // Convert
489
+	            var words = [];
490
+	            for (var i = 0; i < hexStrLength; i += 2) {
491
+	                words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
492
+	            }
493
+
494
+	            return new WordArray.init(words, hexStrLength / 2);
495
+	        }
496
+	    };
497
+
498
+	    /**
499
+	     * Latin1 encoding strategy.
500
+	     */
501
+	    var Latin1 = C_enc.Latin1 = {
502
+	        /**
503
+	         * Converts a word array to a Latin1 string.
504
+	         *
505
+	         * @param {WordArray} wordArray The word array.
506
+	         *
507
+	         * @return {string} The Latin1 string.
508
+	         *
509
+	         * @static
510
+	         *
511
+	         * @example
512
+	         *
513
+	         *     var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
514
+	         */
515
+	        stringify: function (wordArray) {
516
+	            // Shortcuts
517
+	            var words = wordArray.words;
518
+	            var sigBytes = wordArray.sigBytes;
519
+
520
+	            // Convert
521
+	            var latin1Chars = [];
522
+	            for (var i = 0; i < sigBytes; i++) {
523
+	                var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
524
+	                latin1Chars.push(String.fromCharCode(bite));
525
+	            }
526
+
527
+	            return latin1Chars.join('');
528
+	        },
529
+
530
+	        /**
531
+	         * Converts a Latin1 string to a word array.
532
+	         *
533
+	         * @param {string} latin1Str The Latin1 string.
534
+	         *
535
+	         * @return {WordArray} The word array.
536
+	         *
537
+	         * @static
538
+	         *
539
+	         * @example
540
+	         *
541
+	         *     var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
542
+	         */
543
+	        parse: function (latin1Str) {
544
+	            // Shortcut
545
+	            var latin1StrLength = latin1Str.length;
546
+
547
+	            // Convert
548
+	            var words = [];
549
+	            for (var i = 0; i < latin1StrLength; i++) {
550
+	                words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);
551
+	            }
552
+
553
+	            return new WordArray.init(words, latin1StrLength);
554
+	        }
555
+	    };
556
+
557
+	    /**
558
+	     * UTF-8 encoding strategy.
559
+	     */
560
+	    var Utf8 = C_enc.Utf8 = {
561
+	        /**
562
+	         * Converts a word array to a UTF-8 string.
563
+	         *
564
+	         * @param {WordArray} wordArray The word array.
565
+	         *
566
+	         * @return {string} The UTF-8 string.
567
+	         *
568
+	         * @static
569
+	         *
570
+	         * @example
571
+	         *
572
+	         *     var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
573
+	         */
574
+	        stringify: function (wordArray) {
575
+	            try {
576
+	                return decodeURIComponent(escape(Latin1.stringify(wordArray)));
577
+	            } catch (e) {
578
+	                throw new Error('Malformed UTF-8 data');
579
+	            }
580
+	        },
581
+
582
+	        /**
583
+	         * Converts a UTF-8 string to a word array.
584
+	         *
585
+	         * @param {string} utf8Str The UTF-8 string.
586
+	         *
587
+	         * @return {WordArray} The word array.
588
+	         *
589
+	         * @static
590
+	         *
591
+	         * @example
592
+	         *
593
+	         *     var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
594
+	         */
595
+	        parse: function (utf8Str) {
596
+	            return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
597
+	        }
598
+	    };
599
+
600
+	    /**
601
+	     * Abstract buffered block algorithm template.
602
+	     *
603
+	     * The property blockSize must be implemented in a concrete subtype.
604
+	     *
605
+	     * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
606
+	     */
607
+	    var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
608
+	        /**
609
+	         * Resets this block algorithm's data buffer to its initial state.
610
+	         *
611
+	         * @example
612
+	         *
613
+	         *     bufferedBlockAlgorithm.reset();
614
+	         */
615
+	        reset: function () {
616
+	            // Initial values
617
+	            this._data = new WordArray.init();
618
+	            this._nDataBytes = 0;
619
+	        },
620
+
621
+	        /**
622
+	         * Adds new data to this block algorithm's buffer.
623
+	         *
624
+	         * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
625
+	         *
626
+	         * @example
627
+	         *
628
+	         *     bufferedBlockAlgorithm._append('data');
629
+	         *     bufferedBlockAlgorithm._append(wordArray);
630
+	         */
631
+	        _append: function (data) {
632
+	            // Convert string to WordArray, else assume WordArray already
633
+	            if (typeof data == 'string') {
634
+	                data = Utf8.parse(data);
635
+	            }
636
+
637
+	            // Append
638
+	            this._data.concat(data);
639
+	            this._nDataBytes += data.sigBytes;
640
+	        },
641
+
642
+	        /**
643
+	         * Processes available data blocks.
644
+	         *
645
+	         * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
646
+	         *
647
+	         * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
648
+	         *
649
+	         * @return {WordArray} The processed data.
650
+	         *
651
+	         * @example
652
+	         *
653
+	         *     var processedData = bufferedBlockAlgorithm._process();
654
+	         *     var processedData = bufferedBlockAlgorithm._process(!!'flush');
655
+	         */
656
+	        _process: function (doFlush) {
657
+	            var processedWords;
658
+
659
+	            // Shortcuts
660
+	            var data = this._data;
661
+	            var dataWords = data.words;
662
+	            var dataSigBytes = data.sigBytes;
663
+	            var blockSize = this.blockSize;
664
+	            var blockSizeBytes = blockSize * 4;
665
+
666
+	            // Count blocks ready
667
+	            var nBlocksReady = dataSigBytes / blockSizeBytes;
668
+	            if (doFlush) {
669
+	                // Round up to include partial blocks
670
+	                nBlocksReady = Math.ceil(nBlocksReady);
671
+	            } else {
672
+	                // Round down to include only full blocks,
673
+	                // less the number of blocks that must remain in the buffer
674
+	                nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
675
+	            }
676
+
677
+	            // Count words ready
678
+	            var nWordsReady = nBlocksReady * blockSize;
679
+
680
+	            // Count bytes ready
681
+	            var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
682
+
683
+	            // Process blocks
684
+	            if (nWordsReady) {
685
+	                for (var offset = 0; offset < nWordsReady; offset += blockSize) {
686
+	                    // Perform concrete-algorithm logic
687
+	                    this._doProcessBlock(dataWords, offset);
688
+	                }
689
+
690
+	                // Remove processed words
691
+	                processedWords = dataWords.splice(0, nWordsReady);
692
+	                data.sigBytes -= nBytesReady;
693
+	            }
694
+
695
+	            // Return processed words
696
+	            return new WordArray.init(processedWords, nBytesReady);
697
+	        },
698
+
699
+	        /**
700
+	         * Creates a copy of this object.
701
+	         *
702
+	         * @return {Object} The clone.
703
+	         *
704
+	         * @example
705
+	         *
706
+	         *     var clone = bufferedBlockAlgorithm.clone();
707
+	         */
708
+	        clone: function () {
709
+	            var clone = Base.clone.call(this);
710
+	            clone._data = this._data.clone();
711
+
712
+	            return clone;
713
+	        },
714
+
715
+	        _minBufferSize: 0
716
+	    });
717
+
718
+	    /**
719
+	     * Abstract hasher template.
720
+	     *
721
+	     * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
722
+	     */
723
+	    var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
724
+	        /**
725
+	         * Configuration options.
726
+	         */
727
+	        cfg: Base.extend(),
728
+
729
+	        /**
730
+	         * Initializes a newly created hasher.
731
+	         *
732
+	         * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
733
+	         *
734
+	         * @example
735
+	         *
736
+	         *     var hasher = CryptoJS.algo.SHA256.create();
737
+	         */
738
+	        init: function (cfg) {
739
+	            // Apply config defaults
740
+	            this.cfg = this.cfg.extend(cfg);
741
+
742
+	            // Set initial values
743
+	            this.reset();
744
+	        },
745
+
746
+	        /**
747
+	         * Resets this hasher to its initial state.
748
+	         *
749
+	         * @example
750
+	         *
751
+	         *     hasher.reset();
752
+	         */
753
+	        reset: function () {
754
+	            // Reset data buffer
755
+	            BufferedBlockAlgorithm.reset.call(this);
756
+
757
+	            // Perform concrete-hasher logic
758
+	            this._doReset();
759
+	        },
760
+
761
+	        /**
762
+	         * Updates this hasher with a message.
763
+	         *
764
+	         * @param {WordArray|string} messageUpdate The message to append.
765
+	         *
766
+	         * @return {Hasher} This hasher.
767
+	         *
768
+	         * @example
769
+	         *
770
+	         *     hasher.update('message');
771
+	         *     hasher.update(wordArray);
772
+	         */
773
+	        update: function (messageUpdate) {
774
+	            // Append
775
+	            this._append(messageUpdate);
776
+
777
+	            // Update the hash
778
+	            this._process();
779
+
780
+	            // Chainable
781
+	            return this;
782
+	        },
783
+
784
+	        /**
785
+	         * Finalizes the hash computation.
786
+	         * Note that the finalize operation is effectively a destructive, read-once operation.
787
+	         *
788
+	         * @param {WordArray|string} messageUpdate (Optional) A final message update.
789
+	         *
790
+	         * @return {WordArray} The hash.
791
+	         *
792
+	         * @example
793
+	         *
794
+	         *     var hash = hasher.finalize();
795
+	         *     var hash = hasher.finalize('message');
796
+	         *     var hash = hasher.finalize(wordArray);
797
+	         */
798
+	        finalize: function (messageUpdate) {
799
+	            // Final message update
800
+	            if (messageUpdate) {
801
+	                this._append(messageUpdate);
802
+	            }
803
+
804
+	            // Perform concrete-hasher logic
805
+	            var hash = this._doFinalize();
806
+
807
+	            return hash;
808
+	        },
809
+
810
+	        blockSize: 512/32,
811
+
812
+	        /**
813
+	         * Creates a shortcut function to a hasher's object interface.
814
+	         *
815
+	         * @param {Hasher} hasher The hasher to create a helper for.
816
+	         *
817
+	         * @return {Function} The shortcut function.
818
+	         *
819
+	         * @static
820
+	         *
821
+	         * @example
822
+	         *
823
+	         *     var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
824
+	         */
825
+	        _createHelper: function (hasher) {
826
+	            return function (message, cfg) {
827
+	                return new hasher.init(cfg).finalize(message);
828
+	            };
829
+	        },
830
+
831
+	        /**
832
+	         * Creates a shortcut function to the HMAC's object interface.
833
+	         *
834
+	         * @param {Hasher} hasher The hasher to use in this HMAC helper.
835
+	         *
836
+	         * @return {Function} The shortcut function.
837
+	         *
838
+	         * @static
839
+	         *
840
+	         * @example
841
+	         *
842
+	         *     var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
843
+	         */
844
+	        _createHmacHelper: function (hasher) {
845
+	            return function (message, key) {
846
+	                return new C_algo.HMAC.init(hasher, key).finalize(message);
847
+	            };
848
+	        }
849
+	    });
850
+
851
+	    /**
852
+	     * Algorithm namespace.
853
+	     */
854
+	    var C_algo = C.algo = {};
855
+
856
+	    return C;
857
+	}(Math));
858
+
859
+
860
+	(function (undefined) {
861
+	    // Shortcuts
862
+	    var C = CryptoJS;
863
+	    var C_lib = C.lib;
864
+	    var Base = C_lib.Base;
865
+	    var X32WordArray = C_lib.WordArray;
866
+
867
+	    /**
868
+	     * x64 namespace.
869
+	     */
870
+	    var C_x64 = C.x64 = {};
871
+
872
+	    /**
873
+	     * A 64-bit word.
874
+	     */
875
+	    var X64Word = C_x64.Word = Base.extend({
876
+	        /**
877
+	         * Initializes a newly created 64-bit word.
878
+	         *
879
+	         * @param {number} high The high 32 bits.
880
+	         * @param {number} low The low 32 bits.
881
+	         *
882
+	         * @example
883
+	         *
884
+	         *     var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
885
+	         */
886
+	        init: function (high, low) {
887
+	            this.high = high;
888
+	            this.low = low;
889
+	        }
890
+
891
+	        /**
892
+	         * Bitwise NOTs this word.
893
+	         *
894
+	         * @return {X64Word} A new x64-Word object after negating.
895
+	         *
896
+	         * @example
897
+	         *
898
+	         *     var negated = x64Word.not();
899
+	         */
900
+	        // not: function () {
901
+	            // var high = ~this.high;
902
+	            // var low = ~this.low;
903
+
904
+	            // return X64Word.create(high, low);
905
+	        // },
906
+
907
+	        /**
908
+	         * Bitwise ANDs this word with the passed word.
909
+	         *
910
+	         * @param {X64Word} word The x64-Word to AND with this word.
911
+	         *
912
+	         * @return {X64Word} A new x64-Word object after ANDing.
913
+	         *
914
+	         * @example
915
+	         *
916
+	         *     var anded = x64Word.and(anotherX64Word);
917
+	         */
918
+	        // and: function (word) {
919
+	            // var high = this.high & word.high;
920
+	            // var low = this.low & word.low;
921
+
922
+	            // return X64Word.create(high, low);
923
+	        // },
924
+
925
+	        /**
926
+	         * Bitwise ORs this word with the passed word.
927
+	         *
928
+	         * @param {X64Word} word The x64-Word to OR with this word.
929
+	         *
930
+	         * @return {X64Word} A new x64-Word object after ORing.
931
+	         *
932
+	         * @example
933
+	         *
934
+	         *     var ored = x64Word.or(anotherX64Word);
935
+	         */
936
+	        // or: function (word) {
937
+	            // var high = this.high | word.high;
938
+	            // var low = this.low | word.low;
939
+
940
+	            // return X64Word.create(high, low);
941
+	        // },
942
+
943
+	        /**
944
+	         * Bitwise XORs this word with the passed word.
945
+	         *
946
+	         * @param {X64Word} word The x64-Word to XOR with this word.
947
+	         *
948
+	         * @return {X64Word} A new x64-Word object after XORing.
949
+	         *
950
+	         * @example
951
+	         *
952
+	         *     var xored = x64Word.xor(anotherX64Word);
953
+	         */
954
+	        // xor: function (word) {
955
+	            // var high = this.high ^ word.high;
956
+	            // var low = this.low ^ word.low;
957
+
958
+	            // return X64Word.create(high, low);
959
+	        // },
960
+
961
+	        /**
962
+	         * Shifts this word n bits to the left.
963
+	         *
964
+	         * @param {number} n The number of bits to shift.
965
+	         *
966
+	         * @return {X64Word} A new x64-Word object after shifting.
967
+	         *
968
+	         * @example
969
+	         *
970
+	         *     var shifted = x64Word.shiftL(25);
971
+	         */
972
+	        // shiftL: function (n) {
973
+	            // if (n < 32) {
974
+	                // var high = (this.high << n) | (this.low >>> (32 - n));
975
+	                // var low = this.low << n;
976
+	            // } else {
977
+	                // var high = this.low << (n - 32);
978
+	                // var low = 0;
979
+	            // }
980
+
981
+	            // return X64Word.create(high, low);
982
+	        // },
983
+
984
+	        /**
985
+	         * Shifts this word n bits to the right.
986
+	         *
987
+	         * @param {number} n The number of bits to shift.
988
+	         *
989
+	         * @return {X64Word} A new x64-Word object after shifting.
990
+	         *
991
+	         * @example
992
+	         *
993
+	         *     var shifted = x64Word.shiftR(7);
994
+	         */
995
+	        // shiftR: function (n) {
996
+	            // if (n < 32) {
997
+	                // var low = (this.low >>> n) | (this.high << (32 - n));
998
+	                // var high = this.high >>> n;
999
+	            // } else {
1000
+	                // var low = this.high >>> (n - 32);
1001
+	                // var high = 0;
1002
+	            // }
1003
+
1004
+	            // return X64Word.create(high, low);
1005
+	        // },
1006
+
1007
+	        /**
1008
+	         * Rotates this word n bits to the left.
1009
+	         *
1010
+	         * @param {number} n The number of bits to rotate.
1011
+	         *
1012
+	         * @return {X64Word} A new x64-Word object after rotating.
1013
+	         *
1014
+	         * @example
1015
+	         *
1016
+	         *     var rotated = x64Word.rotL(25);
1017
+	         */
1018
+	        // rotL: function (n) {
1019
+	            // return this.shiftL(n).or(this.shiftR(64 - n));
1020
+	        // },
1021
+
1022
+	        /**
1023
+	         * Rotates this word n bits to the right.
1024
+	         *
1025
+	         * @param {number} n The number of bits to rotate.
1026
+	         *
1027
+	         * @return {X64Word} A new x64-Word object after rotating.
1028
+	         *
1029
+	         * @example
1030
+	         *
1031
+	         *     var rotated = x64Word.rotR(7);
1032
+	         */
1033
+	        // rotR: function (n) {
1034
+	            // return this.shiftR(n).or(this.shiftL(64 - n));
1035
+	        // },
1036
+
1037
+	        /**
1038
+	         * Adds this word with the passed word.
1039
+	         *
1040
+	         * @param {X64Word} word The x64-Word to add with this word.
1041
+	         *
1042
+	         * @return {X64Word} A new x64-Word object after adding.
1043
+	         *
1044
+	         * @example
1045
+	         *
1046
+	         *     var added = x64Word.add(anotherX64Word);
1047
+	         */
1048
+	        // add: function (word) {
1049
+	            // var low = (this.low + word.low) | 0;
1050
+	            // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
1051
+	            // var high = (this.high + word.high + carry) | 0;
1052
+
1053
+	            // return X64Word.create(high, low);
1054
+	        // }
1055
+	    });
1056
+
1057
+	    /**
1058
+	     * An array of 64-bit words.
1059
+	     *
1060
+	     * @property {Array} words The array of CryptoJS.x64.Word objects.
1061
+	     * @property {number} sigBytes The number of significant bytes in this word array.
1062
+	     */
1063
+	    var X64WordArray = C_x64.WordArray = Base.extend({
1064
+	        /**
1065
+	         * Initializes a newly created word array.
1066
+	         *
1067
+	         * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
1068
+	         * @param {number} sigBytes (Optional) The number of significant bytes in the words.
1069
+	         *
1070
+	         * @example
1071
+	         *
1072
+	         *     var wordArray = CryptoJS.x64.WordArray.create();
1073
+	         *
1074
+	         *     var wordArray = CryptoJS.x64.WordArray.create([
1075
+	         *         CryptoJS.x64.Word.create(0x00010203, 0x04050607),
1076
+	         *         CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
1077
+	         *     ]);
1078
+	         *
1079
+	         *     var wordArray = CryptoJS.x64.WordArray.create([
1080
+	         *         CryptoJS.x64.Word.create(0x00010203, 0x04050607),
1081
+	         *         CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
1082
+	         *     ], 10);
1083
+	         */
1084
+	        init: function (words, sigBytes) {
1085
+	            words = this.words = words || [];
1086
+
1087
+	            if (sigBytes != undefined) {
1088
+	                this.sigBytes = sigBytes;
1089
+	            } else {
1090
+	                this.sigBytes = words.length * 8;
1091
+	            }
1092
+	        },
1093
+
1094
+	        /**
1095
+	         * Converts this 64-bit word array to a 32-bit word array.
1096
+	         *
1097
+	         * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
1098
+	         *
1099
+	         * @example
1100
+	         *
1101
+	         *     var x32WordArray = x64WordArray.toX32();
1102
+	         */
1103
+	        toX32: function () {
1104
+	            // Shortcuts
1105
+	            var x64Words = this.words;
1106
+	            var x64WordsLength = x64Words.length;
1107
+
1108
+	            // Convert
1109
+	            var x32Words = [];
1110
+	            for (var i = 0; i < x64WordsLength; i++) {
1111
+	                var x64Word = x64Words[i];
1112
+	                x32Words.push(x64Word.high);
1113
+	                x32Words.push(x64Word.low);
1114
+	            }
1115
+
1116
+	            return X32WordArray.create(x32Words, this.sigBytes);
1117
+	        },
1118
+
1119
+	        /**
1120
+	         * Creates a copy of this word array.
1121
+	         *
1122
+	         * @return {X64WordArray} The clone.
1123
+	         *
1124
+	         * @example
1125
+	         *
1126
+	         *     var clone = x64WordArray.clone();
1127
+	         */
1128
+	        clone: function () {
1129
+	            var clone = Base.clone.call(this);
1130
+
1131
+	            // Clone "words" array
1132
+	            var words = clone.words = this.words.slice(0);
1133
+
1134
+	            // Clone each X64Word object
1135
+	            var wordsLength = words.length;
1136
+	            for (var i = 0; i < wordsLength; i++) {
1137
+	                words[i] = words[i].clone();
1138
+	            }
1139
+
1140
+	            return clone;
1141
+	        }
1142
+	    });
1143
+	}());
1144
+
1145
+
1146
+	(function () {
1147
+	    // Check if typed arrays are supported
1148
+	    if (typeof ArrayBuffer != 'function') {
1149
+	        return;
1150
+	    }
1151
+
1152
+	    // Shortcuts
1153
+	    var C = CryptoJS;
1154
+	    var C_lib = C.lib;
1155
+	    var WordArray = C_lib.WordArray;
1156
+
1157
+	    // Reference original init
1158
+	    var superInit = WordArray.init;
1159
+
1160
+	    // Augment WordArray.init to handle typed arrays
1161
+	    var subInit = WordArray.init = function (typedArray) {
1162
+	        // Convert buffers to uint8
1163
+	        if (typedArray instanceof ArrayBuffer) {
1164
+	            typedArray = new Uint8Array(typedArray);
1165
+	        }
1166
+
1167
+	        // Convert other array views to uint8
1168
+	        if (
1169
+	            typedArray instanceof Int8Array ||
1170
+	            (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) ||
1171
+	            typedArray instanceof Int16Array ||
1172
+	            typedArray instanceof Uint16Array ||
1173
+	            typedArray instanceof Int32Array ||
1174
+	            typedArray instanceof Uint32Array ||
1175
+	            typedArray instanceof Float32Array ||
1176
+	            typedArray instanceof Float64Array
1177
+	        ) {
1178
+	            typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
1179
+	        }
1180
+
1181
+	        // Handle Uint8Array
1182
+	        if (typedArray instanceof Uint8Array) {
1183
+	            // Shortcut
1184
+	            var typedArrayByteLength = typedArray.byteLength;
1185
+
1186
+	            // Extract bytes
1187
+	            var words = [];
1188
+	            for (var i = 0; i < typedArrayByteLength; i++) {
1189
+	                words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);
1190
+	            }
1191
+
1192
+	            // Initialize this word array
1193
+	            superInit.call(this, words, typedArrayByteLength);
1194
+	        } else {
1195
+	            // Else call normal init
1196
+	            superInit.apply(this, arguments);
1197
+	        }
1198
+	    };
1199
+
1200
+	    subInit.prototype = WordArray;
1201
+	}());
1202
+
1203
+
1204
+	(function () {
1205
+	    // Shortcuts
1206
+	    var C = CryptoJS;
1207
+	    var C_lib = C.lib;
1208
+	    var WordArray = C_lib.WordArray;
1209
+	    var C_enc = C.enc;
1210
+
1211
+	    /**
1212
+	     * UTF-16 BE encoding strategy.
1213
+	     */
1214
+	    var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
1215
+	        /**
1216
+	         * Converts a word array to a UTF-16 BE string.
1217
+	         *
1218
+	         * @param {WordArray} wordArray The word array.
1219
+	         *
1220
+	         * @return {string} The UTF-16 BE string.
1221
+	         *
1222
+	         * @static
1223
+	         *
1224
+	         * @example
1225
+	         *
1226
+	         *     var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
1227
+	         */
1228
+	        stringify: function (wordArray) {
1229
+	            // Shortcuts
1230
+	            var words = wordArray.words;
1231
+	            var sigBytes = wordArray.sigBytes;
1232
+
1233
+	            // Convert
1234
+	            var utf16Chars = [];
1235
+	            for (var i = 0; i < sigBytes; i += 2) {
1236
+	                var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;
1237
+	                utf16Chars.push(String.fromCharCode(codePoint));
1238
+	            }
1239
+
1240
+	            return utf16Chars.join('');
1241
+	        },
1242
+
1243
+	        /**
1244
+	         * Converts a UTF-16 BE string to a word array.
1245
+	         *
1246
+	         * @param {string} utf16Str The UTF-16 BE string.
1247
+	         *
1248
+	         * @return {WordArray} The word array.
1249
+	         *
1250
+	         * @static
1251
+	         *
1252
+	         * @example
1253
+	         *
1254
+	         *     var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
1255
+	         */
1256
+	        parse: function (utf16Str) {
1257
+	            // Shortcut
1258
+	            var utf16StrLength = utf16Str.length;
1259
+
1260
+	            // Convert
1261
+	            var words = [];
1262
+	            for (var i = 0; i < utf16StrLength; i++) {
1263
+	                words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
1264
+	            }
1265
+
1266
+	            return WordArray.create(words, utf16StrLength * 2);
1267
+	        }
1268
+	    };
1269
+
1270
+	    /**
1271
+	     * UTF-16 LE encoding strategy.
1272
+	     */
1273
+	    C_enc.Utf16LE = {
1274
+	        /**
1275
+	         * Converts a word array to a UTF-16 LE string.
1276
+	         *
1277
+	         * @param {WordArray} wordArray The word array.
1278
+	         *
1279
+	         * @return {string} The UTF-16 LE string.
1280
+	         *
1281
+	         * @static
1282
+	         *
1283
+	         * @example
1284
+	         *
1285
+	         *     var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
1286
+	         */
1287
+	        stringify: function (wordArray) {
1288
+	            // Shortcuts
1289
+	            var words = wordArray.words;
1290
+	            var sigBytes = wordArray.sigBytes;
1291
+
1292
+	            // Convert
1293
+	            var utf16Chars = [];
1294
+	            for (var i = 0; i < sigBytes; i += 2) {
1295
+	                var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);
1296
+	                utf16Chars.push(String.fromCharCode(codePoint));
1297
+	            }
1298
+
1299
+	            return utf16Chars.join('');
1300
+	        },
1301
+
1302
+	        /**
1303
+	         * Converts a UTF-16 LE string to a word array.
1304
+	         *
1305
+	         * @param {string} utf16Str The UTF-16 LE string.
1306
+	         *
1307
+	         * @return {WordArray} The word array.
1308
+	         *
1309
+	         * @static
1310
+	         *
1311
+	         * @example
1312
+	         *
1313
+	         *     var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
1314
+	         */
1315
+	        parse: function (utf16Str) {
1316
+	            // Shortcut
1317
+	            var utf16StrLength = utf16Str.length;
1318
+
1319
+	            // Convert
1320
+	            var words = [];
1321
+	            for (var i = 0; i < utf16StrLength; i++) {
1322
+	                words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));
1323
+	            }
1324
+
1325
+	            return WordArray.create(words, utf16StrLength * 2);
1326
+	        }
1327
+	    };
1328
+
1329
+	    function swapEndian(word) {
1330
+	        return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);
1331
+	    }
1332
+	}());
1333
+
1334
+
1335
+	(function () {
1336
+	    // Shortcuts
1337
+	    var C = CryptoJS;
1338
+	    var C_lib = C.lib;
1339
+	    var WordArray = C_lib.WordArray;
1340
+	    var C_enc = C.enc;
1341
+
1342
+	    /**
1343
+	     * Base64 encoding strategy.
1344
+	     */
1345
+	    var Base64 = C_enc.Base64 = {
1346
+	        /**
1347
+	         * Converts a word array to a Base64 string.
1348
+	         *
1349
+	         * @param {WordArray} wordArray The word array.
1350
+	         *
1351
+	         * @return {string} The Base64 string.
1352
+	         *
1353
+	         * @static
1354
+	         *
1355
+	         * @example
1356
+	         *
1357
+	         *     var base64String = CryptoJS.enc.Base64.stringify(wordArray);
1358
+	         */
1359
+	        stringify: function (wordArray) {
1360
+	            // Shortcuts
1361
+	            var words = wordArray.words;
1362
+	            var sigBytes = wordArray.sigBytes;
1363
+	            var map = this._map;
1364
+
1365
+	            // Clamp excess bits
1366
+	            wordArray.clamp();
1367
+
1368
+	            // Convert
1369
+	            var base64Chars = [];
1370
+	            for (var i = 0; i < sigBytes; i += 3) {
1371
+	                var byte1 = (words[i >>> 2]       >>> (24 - (i % 4) * 8))       & 0xff;
1372
+	                var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;
1373
+	                var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;
1374
+
1375
+	                var triplet = (byte1 << 16) | (byte2 << 8) | byte3;
1376
+
1377
+	                for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {
1378
+	                    base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));
1379
+	                }
1380
+	            }
1381
+
1382
+	            // Add padding
1383
+	            var paddingChar = map.charAt(64);
1384
+	            if (paddingChar) {
1385
+	                while (base64Chars.length % 4) {
1386
+	                    base64Chars.push(paddingChar);
1387
+	                }
1388
+	            }
1389
+
1390
+	            return base64Chars.join('');
1391
+	        },
1392
+
1393
+	        /**
1394
+	         * Converts a Base64 string to a word array.
1395
+	         *
1396
+	         * @param {string} base64Str The Base64 string.
1397
+	         *
1398
+	         * @return {WordArray} The word array.
1399
+	         *
1400
+	         * @static
1401
+	         *
1402
+	         * @example
1403
+	         *
1404
+	         *     var wordArray = CryptoJS.enc.Base64.parse(base64String);
1405
+	         */
1406
+	        parse: function (base64Str) {
1407
+	            // Shortcuts
1408
+	            var base64StrLength = base64Str.length;
1409
+	            var map = this._map;
1410
+	            var reverseMap = this._reverseMap;
1411
+
1412
+	            if (!reverseMap) {
1413
+	                    reverseMap = this._reverseMap = [];
1414
+	                    for (var j = 0; j < map.length; j++) {
1415
+	                        reverseMap[map.charCodeAt(j)] = j;
1416
+	                    }
1417
+	            }
1418
+
1419
+	            // Ignore padding
1420
+	            var paddingChar = map.charAt(64);
1421
+	            if (paddingChar) {
1422
+	                var paddingIndex = base64Str.indexOf(paddingChar);
1423
+	                if (paddingIndex !== -1) {
1424
+	                    base64StrLength = paddingIndex;
1425
+	                }
1426
+	            }
1427
+
1428
+	            // Convert
1429
+	            return parseLoop(base64Str, base64StrLength, reverseMap);
1430
+
1431
+	        },
1432
+
1433
+	        _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
1434
+	    };
1435
+
1436
+	    function parseLoop(base64Str, base64StrLength, reverseMap) {
1437
+	      var words = [];
1438
+	      var nBytes = 0;
1439
+	      for (var i = 0; i < base64StrLength; i++) {
1440
+	          if (i % 4) {
1441
+	              var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
1442
+	              var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
1443
+	              var bitsCombined = bits1 | bits2;
1444
+	              words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);
1445
+	              nBytes++;
1446
+	          }
1447
+	      }
1448
+	      return WordArray.create(words, nBytes);
1449
+	    }
1450
+	}());
1451
+
1452
+
1453
+	(function () {
1454
+	    // Shortcuts
1455
+	    var C = CryptoJS;
1456
+	    var C_lib = C.lib;
1457
+	    var WordArray = C_lib.WordArray;
1458
+	    var C_enc = C.enc;
1459
+
1460
+	    /**
1461
+	     * Base64url encoding strategy.
1462
+	     */
1463
+	    var Base64url = C_enc.Base64url = {
1464
+	        /**
1465
+	         * Converts a word array to a Base64url string.
1466
+	         *
1467
+	         * @param {WordArray} wordArray The word array.
1468
+	         *
1469
+	         * @param {boolean} urlSafe Whether to use url safe
1470
+	         *
1471
+	         * @return {string} The Base64url string.
1472
+	         *
1473
+	         * @static
1474
+	         *
1475
+	         * @example
1476
+	         *
1477
+	         *     var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
1478
+	         */
1479
+	        stringify: function (wordArray, urlSafe=true) {
1480
+	            // Shortcuts
1481
+	            var words = wordArray.words;
1482
+	            var sigBytes = wordArray.sigBytes;
1483
+	            var map = urlSafe ? this._safe_map : this._map;
1484
+
1485
+	            // Clamp excess bits
1486
+	            wordArray.clamp();
1487
+
1488
+	            // Convert
1489
+	            var base64Chars = [];
1490
+	            for (var i = 0; i < sigBytes; i += 3) {
1491
+	                var byte1 = (words[i >>> 2]       >>> (24 - (i % 4) * 8))       & 0xff;
1492
+	                var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;
1493
+	                var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;
1494
+
1495
+	                var triplet = (byte1 << 16) | (byte2 << 8) | byte3;
1496
+
1497
+	                for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {
1498
+	                    base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));
1499
+	                }
1500
+	            }
1501
+
1502
+	            // Add padding
1503
+	            var paddingChar = map.charAt(64);
1504
+	            if (paddingChar) {
1505
+	                while (base64Chars.length % 4) {
1506
+	                    base64Chars.push(paddingChar);
1507
+	                }
1508
+	            }
1509
+
1510
+	            return base64Chars.join('');
1511
+	        },
1512
+
1513
+	        /**
1514
+	         * Converts a Base64url string to a word array.
1515
+	         *
1516
+	         * @param {string} base64Str The Base64url string.
1517
+	         *
1518
+	         * @param {boolean} urlSafe Whether to use url safe
1519
+	         *
1520
+	         * @return {WordArray} The word array.
1521
+	         *
1522
+	         * @static
1523
+	         *
1524
+	         * @example
1525
+	         *
1526
+	         *     var wordArray = CryptoJS.enc.Base64url.parse(base64String);
1527
+	         */
1528
+	        parse: function (base64Str, urlSafe=true) {
1529
+	            // Shortcuts
1530
+	            var base64StrLength = base64Str.length;
1531
+	            var map = urlSafe ? this._safe_map : this._map;
1532
+	            var reverseMap = this._reverseMap;
1533
+
1534
+	            if (!reverseMap) {
1535
+	                reverseMap = this._reverseMap = [];
1536
+	                for (var j = 0; j < map.length; j++) {
1537
+	                    reverseMap[map.charCodeAt(j)] = j;
1538
+	                }
1539
+	            }
1540
+
1541
+	            // Ignore padding
1542
+	            var paddingChar = map.charAt(64);
1543
+	            if (paddingChar) {
1544
+	                var paddingIndex = base64Str.indexOf(paddingChar);
1545
+	                if (paddingIndex !== -1) {
1546
+	                    base64StrLength = paddingIndex;
1547
+	                }
1548
+	            }
1549
+
1550
+	            // Convert
1551
+	            return parseLoop(base64Str, base64StrLength, reverseMap);
1552
+
1553
+	        },
1554
+
1555
+	        _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
1556
+	        _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',
1557
+	    };
1558
+
1559
+	    function parseLoop(base64Str, base64StrLength, reverseMap) {
1560
+	        var words = [];
1561
+	        var nBytes = 0;
1562
+	        for (var i = 0; i < base64StrLength; i++) {
1563
+	            if (i % 4) {
1564
+	                var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
1565
+	                var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
1566
+	                var bitsCombined = bits1 | bits2;
1567
+	                words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);
1568
+	                nBytes++;
1569
+	            }
1570
+	        }
1571
+	        return WordArray.create(words, nBytes);
1572
+	    }
1573
+	}());
1574
+
1575
+	(function (Math) {
1576
+	    // Shortcuts
1577
+	    var C = CryptoJS;
1578
+	    var C_lib = C.lib;
1579
+	    var WordArray = C_lib.WordArray;
1580
+	    var Hasher = C_lib.Hasher;
1581
+	    var C_algo = C.algo;
1582
+
1583
+	    // Constants table
1584
+	    var T = [];
1585
+
1586
+	    // Compute constants
1587
+	    (function () {
1588
+	        for (var i = 0; i < 64; i++) {
1589
+	            T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;
1590
+	        }
1591
+	    }());
1592
+
1593
+	    /**
1594
+	     * MD5 hash algorithm.
1595
+	     */
1596
+	    var MD5 = C_algo.MD5 = Hasher.extend({
1597
+	        _doReset: function () {
1598
+	            this._hash = new WordArray.init([
1599
+	                0x67452301, 0xefcdab89,
1600
+	                0x98badcfe, 0x10325476
1601
+	            ]);
1602
+	        },
1603
+
1604
+	        _doProcessBlock: function (M, offset) {
1605
+	            // Swap endian
1606
+	            for (var i = 0; i < 16; i++) {
1607
+	                // Shortcuts
1608
+	                var offset_i = offset + i;
1609
+	                var M_offset_i = M[offset_i];
1610
+
1611
+	                M[offset_i] = (
1612
+	                    (((M_offset_i << 8)  | (M_offset_i >>> 24)) & 0x00ff00ff) |
1613
+	                    (((M_offset_i << 24) | (M_offset_i >>> 8))  & 0xff00ff00)
1614
+	                );
1615
+	            }
1616
+
1617
+	            // Shortcuts
1618
+	            var H = this._hash.words;
1619
+
1620
+	            var M_offset_0  = M[offset + 0];
1621
+	            var M_offset_1  = M[offset + 1];
1622
+	            var M_offset_2  = M[offset + 2];
1623
+	            var M_offset_3  = M[offset + 3];
1624
+	            var M_offset_4  = M[offset + 4];
1625
+	            var M_offset_5  = M[offset + 5];
1626
+	            var M_offset_6  = M[offset + 6];
1627
+	            var M_offset_7  = M[offset + 7];
1628
+	            var M_offset_8  = M[offset + 8];
1629
+	            var M_offset_9  = M[offset + 9];
1630
+	            var M_offset_10 = M[offset + 10];
1631
+	            var M_offset_11 = M[offset + 11];
1632
+	            var M_offset_12 = M[offset + 12];
1633
+	            var M_offset_13 = M[offset + 13];
1634
+	            var M_offset_14 = M[offset + 14];
1635
+	            var M_offset_15 = M[offset + 15];
1636
+
1637
+	            // Working varialbes
1638
+	            var a = H[0];
1639
+	            var b = H[1];
1640
+	            var c = H[2];
1641
+	            var d = H[3];
1642
+
1643
+	            // Computation
1644
+	            a = FF(a, b, c, d, M_offset_0,  7,  T[0]);
1645
+	            d = FF(d, a, b, c, M_offset_1,  12, T[1]);
1646
+	            c = FF(c, d, a, b, M_offset_2,  17, T[2]);
1647
+	            b = FF(b, c, d, a, M_offset_3,  22, T[3]);
1648
+	            a = FF(a, b, c, d, M_offset_4,  7,  T[4]);
1649
+	            d = FF(d, a, b, c, M_offset_5,  12, T[5]);
1650
+	            c = FF(c, d, a, b, M_offset_6,  17, T[6]);
1651
+	            b = FF(b, c, d, a, M_offset_7,  22, T[7]);
1652
+	            a = FF(a, b, c, d, M_offset_8,  7,  T[8]);
1653
+	            d = FF(d, a, b, c, M_offset_9,  12, T[9]);
1654
+	            c = FF(c, d, a, b, M_offset_10, 17, T[10]);
1655
+	            b = FF(b, c, d, a, M_offset_11, 22, T[11]);
1656
+	            a = FF(a, b, c, d, M_offset_12, 7,  T[12]);
1657
+	            d = FF(d, a, b, c, M_offset_13, 12, T[13]);
1658
+	            c = FF(c, d, a, b, M_offset_14, 17, T[14]);
1659
+	            b = FF(b, c, d, a, M_offset_15, 22, T[15]);
1660
+
1661
+	            a = GG(a, b, c, d, M_offset_1,  5,  T[16]);
1662
+	            d = GG(d, a, b, c, M_offset_6,  9,  T[17]);
1663
+	            c = GG(c, d, a, b, M_offset_11, 14, T[18]);
1664
+	            b = GG(b, c, d, a, M_offset_0,  20, T[19]);
1665
+	            a = GG(a, b, c, d, M_offset_5,  5,  T[20]);
1666
+	            d = GG(d, a, b, c, M_offset_10, 9,  T[21]);
1667
+	            c = GG(c, d, a, b, M_offset_15, 14, T[22]);
1668
+	            b = GG(b, c, d, a, M_offset_4,  20, T[23]);
1669
+	            a = GG(a, b, c, d, M_offset_9,  5,  T[24]);
1670
+	            d = GG(d, a, b, c, M_offset_14, 9,  T[25]);
1671
+	            c = GG(c, d, a, b, M_offset_3,  14, T[26]);
1672
+	            b = GG(b, c, d, a, M_offset_8,  20, T[27]);
1673
+	            a = GG(a, b, c, d, M_offset_13, 5,  T[28]);
1674
+	            d = GG(d, a, b, c, M_offset_2,  9,  T[29]);
1675
+	            c = GG(c, d, a, b, M_offset_7,  14, T[30]);
1676
+	            b = GG(b, c, d, a, M_offset_12, 20, T[31]);
1677
+
1678
+	            a = HH(a, b, c, d, M_offset_5,  4,  T[32]);
1679
+	            d = HH(d, a, b, c, M_offset_8,  11, T[33]);
1680
+	            c = HH(c, d, a, b, M_offset_11, 16, T[34]);
1681
+	            b = HH(b, c, d, a, M_offset_14, 23, T[35]);
1682
+	            a = HH(a, b, c, d, M_offset_1,  4,  T[36]);
1683
+	            d = HH(d, a, b, c, M_offset_4,  11, T[37]);
1684
+	            c = HH(c, d, a, b, M_offset_7,  16, T[38]);
1685
+	            b = HH(b, c, d, a, M_offset_10, 23, T[39]);
1686
+	            a = HH(a, b, c, d, M_offset_13, 4,  T[40]);
1687
+	            d = HH(d, a, b, c, M_offset_0,  11, T[41]);
1688
+	            c = HH(c, d, a, b, M_offset_3,  16, T[42]);
1689
+	            b = HH(b, c, d, a, M_offset_6,  23, T[43]);
1690
+	            a = HH(a, b, c, d, M_offset_9,  4,  T[44]);
1691
+	            d = HH(d, a, b, c, M_offset_12, 11, T[45]);
1692
+	            c = HH(c, d, a, b, M_offset_15, 16, T[46]);
1693
+	            b = HH(b, c, d, a, M_offset_2,  23, T[47]);
1694
+
1695
+	            a = II(a, b, c, d, M_offset_0,  6,  T[48]);
1696
+	            d = II(d, a, b, c, M_offset_7,  10, T[49]);
1697
+	            c = II(c, d, a, b, M_offset_14, 15, T[50]);
1698
+	            b = II(b, c, d, a, M_offset_5,  21, T[51]);
1699
+	            a = II(a, b, c, d, M_offset_12, 6,  T[52]);
1700
+	            d = II(d, a, b, c, M_offset_3,  10, T[53]);
1701
+	            c = II(c, d, a, b, M_offset_10, 15, T[54]);
1702
+	            b = II(b, c, d, a, M_offset_1,  21, T[55]);
1703
+	            a = II(a, b, c, d, M_offset_8,  6,  T[56]);
1704
+	            d = II(d, a, b, c, M_offset_15, 10, T[57]);
1705
+	            c = II(c, d, a, b, M_offset_6,  15, T[58]);
1706
+	            b = II(b, c, d, a, M_offset_13, 21, T[59]);
1707
+	            a = II(a, b, c, d, M_offset_4,  6,  T[60]);
1708
+	            d = II(d, a, b, c, M_offset_11, 10, T[61]);
1709
+	            c = II(c, d, a, b, M_offset_2,  15, T[62]);
1710
+	            b = II(b, c, d, a, M_offset_9,  21, T[63]);
1711
+
1712
+	            // Intermediate hash value
1713
+	            H[0] = (H[0] + a) | 0;
1714
+	            H[1] = (H[1] + b) | 0;
1715
+	            H[2] = (H[2] + c) | 0;
1716
+	            H[3] = (H[3] + d) | 0;
1717
+	        },
1718
+
1719
+	        _doFinalize: function () {
1720
+	            // Shortcuts
1721
+	            var data = this._data;
1722
+	            var dataWords = data.words;
1723
+
1724
+	            var nBitsTotal = this._nDataBytes * 8;
1725
+	            var nBitsLeft = data.sigBytes * 8;
1726
+
1727
+	            // Add padding
1728
+	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
1729
+
1730
+	            var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
1731
+	            var nBitsTotalL = nBitsTotal;
1732
+	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
1733
+	                (((nBitsTotalH << 8)  | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
1734
+	                (((nBitsTotalH << 24) | (nBitsTotalH >>> 8))  & 0xff00ff00)
1735
+	            );
1736
+	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
1737
+	                (((nBitsTotalL << 8)  | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
1738
+	                (((nBitsTotalL << 24) | (nBitsTotalL >>> 8))  & 0xff00ff00)
1739
+	            );
1740
+
1741
+	            data.sigBytes = (dataWords.length + 1) * 4;
1742
+
1743
+	            // Hash final blocks
1744
+	            this._process();
1745
+
1746
+	            // Shortcuts
1747
+	            var hash = this._hash;
1748
+	            var H = hash.words;
1749
+
1750
+	            // Swap endian
1751
+	            for (var i = 0; i < 4; i++) {
1752
+	                // Shortcut
1753
+	                var H_i = H[i];
1754
+
1755
+	                H[i] = (((H_i << 8)  | (H_i >>> 24)) & 0x00ff00ff) |
1756
+	                       (((H_i << 24) | (H_i >>> 8))  & 0xff00ff00);
1757
+	            }
1758
+
1759
+	            // Return final computed hash
1760
+	            return hash;
1761
+	        },
1762
+
1763
+	        clone: function () {
1764
+	            var clone = Hasher.clone.call(this);
1765
+	            clone._hash = this._hash.clone();
1766
+
1767
+	            return clone;
1768
+	        }
1769
+	    });
1770
+
1771
+	    function FF(a, b, c, d, x, s, t) {
1772
+	        var n = a + ((b & c) | (~b & d)) + x + t;
1773
+	        return ((n << s) | (n >>> (32 - s))) + b;
1774
+	    }
1775
+
1776
+	    function GG(a, b, c, d, x, s, t) {
1777
+	        var n = a + ((b & d) | (c & ~d)) + x + t;
1778
+	        return ((n << s) | (n >>> (32 - s))) + b;
1779
+	    }
1780
+
1781
+	    function HH(a, b, c, d, x, s, t) {
1782
+	        var n = a + (b ^ c ^ d) + x + t;
1783
+	        return ((n << s) | (n >>> (32 - s))) + b;
1784
+	    }
1785
+
1786
+	    function II(a, b, c, d, x, s, t) {
1787
+	        var n = a + (c ^ (b | ~d)) + x + t;
1788
+	        return ((n << s) | (n >>> (32 - s))) + b;
1789
+	    }
1790
+
1791
+	    /**
1792
+	     * Shortcut function to the hasher's object interface.
1793
+	     *
1794
+	     * @param {WordArray|string} message The message to hash.
1795
+	     *
1796
+	     * @return {WordArray} The hash.
1797
+	     *
1798
+	     * @static
1799
+	     *
1800
+	     * @example
1801
+	     *
1802
+	     *     var hash = CryptoJS.MD5('message');
1803
+	     *     var hash = CryptoJS.MD5(wordArray);
1804
+	     */
1805
+	    C.MD5 = Hasher._createHelper(MD5);
1806
+
1807
+	    /**
1808
+	     * Shortcut function to the HMAC's object interface.
1809
+	     *
1810
+	     * @param {WordArray|string} message The message to hash.
1811
+	     * @param {WordArray|string} key The secret key.
1812
+	     *
1813
+	     * @return {WordArray} The HMAC.
1814
+	     *
1815
+	     * @static
1816
+	     *
1817
+	     * @example
1818
+	     *
1819
+	     *     var hmac = CryptoJS.HmacMD5(message, key);
1820
+	     */
1821
+	    C.HmacMD5 = Hasher._createHmacHelper(MD5);
1822
+	}(Math));
1823
+
1824
+
1825
+	(function () {
1826
+	    // Shortcuts
1827
+	    var C = CryptoJS;
1828
+	    var C_lib = C.lib;
1829
+	    var WordArray = C_lib.WordArray;
1830
+	    var Hasher = C_lib.Hasher;
1831
+	    var C_algo = C.algo;
1832
+
1833
+	    // Reusable object
1834
+	    var W = [];
1835
+
1836
+	    /**
1837
+	     * SHA-1 hash algorithm.
1838
+	     */
1839
+	    var SHA1 = C_algo.SHA1 = Hasher.extend({
1840
+	        _doReset: function () {
1841
+	            this._hash = new WordArray.init([
1842
+	                0x67452301, 0xefcdab89,
1843
+	                0x98badcfe, 0x10325476,
1844
+	                0xc3d2e1f0
1845
+	            ]);
1846
+	        },
1847
+
1848
+	        _doProcessBlock: function (M, offset) {
1849
+	            // Shortcut
1850
+	            var H = this._hash.words;
1851
+
1852
+	            // Working variables
1853
+	            var a = H[0];
1854
+	            var b = H[1];
1855
+	            var c = H[2];
1856
+	            var d = H[3];
1857
+	            var e = H[4];
1858
+
1859
+	            // Computation
1860
+	            for (var i = 0; i < 80; i++) {
1861
+	                if (i < 16) {
1862
+	                    W[i] = M[offset + i] | 0;
1863
+	                } else {
1864
+	                    var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
1865
+	                    W[i] = (n << 1) | (n >>> 31);
1866
+	                }
1867
+
1868
+	                var t = ((a << 5) | (a >>> 27)) + e + W[i];
1869
+	                if (i < 20) {
1870
+	                    t += ((b & c) | (~b & d)) + 0x5a827999;
1871
+	                } else if (i < 40) {
1872
+	                    t += (b ^ c ^ d) + 0x6ed9eba1;
1873
+	                } else if (i < 60) {
1874
+	                    t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;
1875
+	                } else /* if (i < 80) */ {
1876
+	                    t += (b ^ c ^ d) - 0x359d3e2a;
1877
+	                }
1878
+
1879
+	                e = d;
1880
+	                d = c;
1881
+	                c = (b << 30) | (b >>> 2);
1882
+	                b = a;
1883
+	                a = t;
1884
+	            }
1885
+
1886
+	            // Intermediate hash value
1887
+	            H[0] = (H[0] + a) | 0;
1888
+	            H[1] = (H[1] + b) | 0;
1889
+	            H[2] = (H[2] + c) | 0;
1890
+	            H[3] = (H[3] + d) | 0;
1891
+	            H[4] = (H[4] + e) | 0;
1892
+	        },
1893
+
1894
+	        _doFinalize: function () {
1895
+	            // Shortcuts
1896
+	            var data = this._data;
1897
+	            var dataWords = data.words;
1898
+
1899
+	            var nBitsTotal = this._nDataBytes * 8;
1900
+	            var nBitsLeft = data.sigBytes * 8;
1901
+
1902
+	            // Add padding
1903
+	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
1904
+	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
1905
+	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
1906
+	            data.sigBytes = dataWords.length * 4;
1907
+
1908
+	            // Hash final blocks
1909
+	            this._process();
1910
+
1911
+	            // Return final computed hash
1912
+	            return this._hash;
1913
+	        },
1914
+
1915
+	        clone: function () {
1916
+	            var clone = Hasher.clone.call(this);
1917
+	            clone._hash = this._hash.clone();
1918
+
1919
+	            return clone;
1920
+	        }
1921
+	    });
1922
+
1923
+	    /**
1924
+	     * Shortcut function to the hasher's object interface.
1925
+	     *
1926
+	     * @param {WordArray|string} message The message to hash.
1927
+	     *
1928
+	     * @return {WordArray} The hash.
1929
+	     *
1930
+	     * @static
1931
+	     *
1932
+	     * @example
1933
+	     *
1934
+	     *     var hash = CryptoJS.SHA1('message');
1935
+	     *     var hash = CryptoJS.SHA1(wordArray);
1936
+	     */
1937
+	    C.SHA1 = Hasher._createHelper(SHA1);
1938
+
1939
+	    /**
1940
+	     * Shortcut function to the HMAC's object interface.
1941
+	     *
1942
+	     * @param {WordArray|string} message The message to hash.
1943
+	     * @param {WordArray|string} key The secret key.
1944
+	     *
1945
+	     * @return {WordArray} The HMAC.
1946
+	     *
1947
+	     * @static
1948
+	     *
1949
+	     * @example
1950
+	     *
1951
+	     *     var hmac = CryptoJS.HmacSHA1(message, key);
1952
+	     */
1953
+	    C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
1954
+	}());
1955
+
1956
+
1957
+	(function (Math) {
1958
+	    // Shortcuts
1959
+	    var C = CryptoJS;
1960
+	    var C_lib = C.lib;
1961
+	    var WordArray = C_lib.WordArray;
1962
+	    var Hasher = C_lib.Hasher;
1963
+	    var C_algo = C.algo;
1964
+
1965
+	    // Initialization and round constants tables
1966
+	    var H = [];
1967
+	    var K = [];
1968
+
1969
+	    // Compute constants
1970
+	    (function () {
1971
+	        function isPrime(n) {
1972
+	            var sqrtN = Math.sqrt(n);
1973
+	            for (var factor = 2; factor <= sqrtN; factor++) {
1974
+	                if (!(n % factor)) {
1975
+	                    return false;
1976
+	                }
1977
+	            }
1978
+
1979
+	            return true;
1980
+	        }
1981
+
1982
+	        function getFractionalBits(n) {
1983
+	            return ((n - (n | 0)) * 0x100000000) | 0;
1984
+	        }
1985
+
1986
+	        var n = 2;
1987
+	        var nPrime = 0;
1988
+	        while (nPrime < 64) {
1989
+	            if (isPrime(n)) {
1990
+	                if (nPrime < 8) {
1991
+	                    H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
1992
+	                }
1993
+	                K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
1994
+
1995
+	                nPrime++;
1996
+	            }
1997
+
1998
+	            n++;
1999
+	        }
2000
+	    }());
2001
+
2002
+	    // Reusable object
2003
+	    var W = [];
2004
+
2005
+	    /**
2006
+	     * SHA-256 hash algorithm.
2007
+	     */
2008
+	    var SHA256 = C_algo.SHA256 = Hasher.extend({
2009
+	        _doReset: function () {
2010
+	            this._hash = new WordArray.init(H.slice(0));
2011
+	        },
2012
+
2013
+	        _doProcessBlock: function (M, offset) {
2014
+	            // Shortcut
2015
+	            var H = this._hash.words;
2016
+
2017
+	            // Working variables
2018
+	            var a = H[0];
2019
+	            var b = H[1];
2020
+	            var c = H[2];
2021
+	            var d = H[3];
2022
+	            var e = H[4];
2023
+	            var f = H[5];
2024
+	            var g = H[6];
2025
+	            var h = H[7];
2026
+
2027
+	            // Computation
2028
+	            for (var i = 0; i < 64; i++) {
2029
+	                if (i < 16) {
2030
+	                    W[i] = M[offset + i] | 0;
2031
+	                } else {
2032
+	                    var gamma0x = W[i - 15];
2033
+	                    var gamma0  = ((gamma0x << 25) | (gamma0x >>> 7))  ^
2034
+	                                  ((gamma0x << 14) | (gamma0x >>> 18)) ^
2035
+	                                   (gamma0x >>> 3);
2036
+
2037
+	                    var gamma1x = W[i - 2];
2038
+	                    var gamma1  = ((gamma1x << 15) | (gamma1x >>> 17)) ^
2039
+	                                  ((gamma1x << 13) | (gamma1x >>> 19)) ^
2040
+	                                   (gamma1x >>> 10);
2041
+
2042
+	                    W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
2043
+	                }
2044
+
2045
+	                var ch  = (e & f) ^ (~e & g);
2046
+	                var maj = (a & b) ^ (a & c) ^ (b & c);
2047
+
2048
+	                var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));
2049
+	                var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7)  | (e >>> 25));
2050
+
2051
+	                var t1 = h + sigma1 + ch + K[i] + W[i];
2052
+	                var t2 = sigma0 + maj;
2053
+
2054
+	                h = g;
2055
+	                g = f;
2056
+	                f = e;
2057
+	                e = (d + t1) | 0;
2058
+	                d = c;
2059
+	                c = b;
2060
+	                b = a;
2061
+	                a = (t1 + t2) | 0;
2062
+	            }
2063
+
2064
+	            // Intermediate hash value
2065
+	            H[0] = (H[0] + a) | 0;
2066
+	            H[1] = (H[1] + b) | 0;
2067
+	            H[2] = (H[2] + c) | 0;
2068
+	            H[3] = (H[3] + d) | 0;
2069
+	            H[4] = (H[4] + e) | 0;
2070
+	            H[5] = (H[5] + f) | 0;
2071
+	            H[6] = (H[6] + g) | 0;
2072
+	            H[7] = (H[7] + h) | 0;
2073
+	        },
2074
+
2075
+	        _doFinalize: function () {
2076
+	            // Shortcuts
2077
+	            var data = this._data;
2078
+	            var dataWords = data.words;
2079
+
2080
+	            var nBitsTotal = this._nDataBytes * 8;
2081
+	            var nBitsLeft = data.sigBytes * 8;
2082
+
2083
+	            // Add padding
2084
+	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
2085
+	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
2086
+	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
2087
+	            data.sigBytes = dataWords.length * 4;
2088
+
2089
+	            // Hash final blocks
2090
+	            this._process();
2091
+
2092
+	            // Return final computed hash
2093
+	            return this._hash;
2094
+	        },
2095
+
2096
+	        clone: function () {
2097
+	            var clone = Hasher.clone.call(this);
2098
+	            clone._hash = this._hash.clone();
2099
+
2100
+	            return clone;
2101
+	        }
2102
+	    });
2103
+
2104
+	    /**
2105
+	     * Shortcut function to the hasher's object interface.
2106
+	     *
2107
+	     * @param {WordArray|string} message The message to hash.
2108
+	     *
2109
+	     * @return {WordArray} The hash.
2110
+	     *
2111
+	     * @static
2112
+	     *
2113
+	     * @example
2114
+	     *
2115
+	     *     var hash = CryptoJS.SHA256('message');
2116
+	     *     var hash = CryptoJS.SHA256(wordArray);
2117
+	     */
2118
+	    C.SHA256 = Hasher._createHelper(SHA256);
2119
+
2120
+	    /**
2121
+	     * Shortcut function to the HMAC's object interface.
2122
+	     *
2123
+	     * @param {WordArray|string} message The message to hash.
2124
+	     * @param {WordArray|string} key The secret key.
2125
+	     *
2126
+	     * @return {WordArray} The HMAC.
2127
+	     *
2128
+	     * @static
2129
+	     *
2130
+	     * @example
2131
+	     *
2132
+	     *     var hmac = CryptoJS.HmacSHA256(message, key);
2133
+	     */
2134
+	    C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
2135
+	}(Math));
2136
+
2137
+
2138
+	(function () {
2139
+	    // Shortcuts
2140
+	    var C = CryptoJS;
2141
+	    var C_lib = C.lib;
2142
+	    var WordArray = C_lib.WordArray;
2143
+	    var C_algo = C.algo;
2144
+	    var SHA256 = C_algo.SHA256;
2145
+
2146
+	    /**
2147
+	     * SHA-224 hash algorithm.
2148
+	     */
2149
+	    var SHA224 = C_algo.SHA224 = SHA256.extend({
2150
+	        _doReset: function () {
2151
+	            this._hash = new WordArray.init([
2152
+	                0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
2153
+	                0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4
2154
+	            ]);
2155
+	        },
2156
+
2157
+	        _doFinalize: function () {
2158
+	            var hash = SHA256._doFinalize.call(this);
2159
+
2160
+	            hash.sigBytes -= 4;
2161
+
2162
+	            return hash;
2163
+	        }
2164
+	    });
2165
+
2166
+	    /**
2167
+	     * Shortcut function to the hasher's object interface.
2168
+	     *
2169
+	     * @param {WordArray|string} message The message to hash.
2170
+	     *
2171
+	     * @return {WordArray} The hash.
2172
+	     *
2173
+	     * @static
2174
+	     *
2175
+	     * @example
2176
+	     *
2177
+	     *     var hash = CryptoJS.SHA224('message');
2178
+	     *     var hash = CryptoJS.SHA224(wordArray);
2179
+	     */
2180
+	    C.SHA224 = SHA256._createHelper(SHA224);
2181
+
2182
+	    /**
2183
+	     * Shortcut function to the HMAC's object interface.
2184
+	     *
2185
+	     * @param {WordArray|string} message The message to hash.
2186
+	     * @param {WordArray|string} key The secret key.
2187
+	     *
2188
+	     * @return {WordArray} The HMAC.
2189
+	     *
2190
+	     * @static
2191
+	     *
2192
+	     * @example
2193
+	     *
2194
+	     *     var hmac = CryptoJS.HmacSHA224(message, key);
2195
+	     */
2196
+	    C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
2197
+	}());
2198
+
2199
+
2200
+	(function () {
2201
+	    // Shortcuts
2202
+	    var C = CryptoJS;
2203
+	    var C_lib = C.lib;
2204
+	    var Hasher = C_lib.Hasher;
2205
+	    var C_x64 = C.x64;
2206
+	    var X64Word = C_x64.Word;
2207
+	    var X64WordArray = C_x64.WordArray;
2208
+	    var C_algo = C.algo;
2209
+
2210
+	    function X64Word_create() {
2211
+	        return X64Word.create.apply(X64Word, arguments);
2212
+	    }
2213
+
2214
+	    // Constants
2215
+	    var K = [
2216
+	        X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),
2217
+	        X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),
2218
+	        X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),
2219
+	        X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),
2220
+	        X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),
2221
+	        X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),
2222
+	        X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),
2223
+	        X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),
2224
+	        X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),
2225
+	        X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),
2226
+	        X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),
2227
+	        X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),
2228
+	        X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),
2229
+	        X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),
2230
+	        X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),
2231
+	        X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),
2232
+	        X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),
2233
+	        X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),
2234
+	        X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),
2235
+	        X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),
2236
+	        X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),
2237
+	        X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),
2238
+	        X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),
2239
+	        X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),
2240
+	        X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),
2241
+	        X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),
2242
+	        X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),
2243
+	        X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),
2244
+	        X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),
2245
+	        X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),
2246
+	        X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),
2247
+	        X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),
2248
+	        X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),
2249
+	        X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),
2250
+	        X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),
2251
+	        X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),
2252
+	        X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
2253
+	        X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
2254
+	        X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
2255
+	        X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)
2256
+	    ];
2257
+
2258
+	    // Reusable objects
2259
+	    var W = [];
2260
+	    (function () {
2261
+	        for (var i = 0; i < 80; i++) {
2262
+	            W[i] = X64Word_create();
2263
+	        }
2264
+	    }());
2265
+
2266
+	    /**
2267
+	     * SHA-512 hash algorithm.
2268
+	     */
2269
+	    var SHA512 = C_algo.SHA512 = Hasher.extend({
2270
+	        _doReset: function () {
2271
+	            this._hash = new X64WordArray.init([
2272
+	                new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
2273
+	                new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
2274
+	                new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
2275
+	                new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)
2276
+	            ]);
2277
+	        },
2278
+
2279
+	        _doProcessBlock: function (M, offset) {
2280
+	            // Shortcuts
2281
+	            var H = this._hash.words;
2282
+
2283
+	            var H0 = H[0];
2284
+	            var H1 = H[1];
2285
+	            var H2 = H[2];
2286
+	            var H3 = H[3];
2287
+	            var H4 = H[4];
2288
+	            var H5 = H[5];
2289
+	            var H6 = H[6];
2290
+	            var H7 = H[7];
2291
+
2292
+	            var H0h = H0.high;
2293
+	            var H0l = H0.low;
2294
+	            var H1h = H1.high;
2295
+	            var H1l = H1.low;
2296
+	            var H2h = H2.high;
2297
+	            var H2l = H2.low;
2298
+	            var H3h = H3.high;
2299
+	            var H3l = H3.low;
2300
+	            var H4h = H4.high;
2301
+	            var H4l = H4.low;
2302
+	            var H5h = H5.high;
2303
+	            var H5l = H5.low;
2304
+	            var H6h = H6.high;
2305
+	            var H6l = H6.low;
2306
+	            var H7h = H7.high;
2307
+	            var H7l = H7.low;
2308
+
2309
+	            // Working variables
2310
+	            var ah = H0h;
2311
+	            var al = H0l;
2312
+	            var bh = H1h;
2313
+	            var bl = H1l;
2314
+	            var ch = H2h;
2315
+	            var cl = H2l;
2316
+	            var dh = H3h;
2317
+	            var dl = H3l;
2318
+	            var eh = H4h;
2319
+	            var el = H4l;
2320
+	            var fh = H5h;
2321
+	            var fl = H5l;
2322
+	            var gh = H6h;
2323
+	            var gl = H6l;
2324
+	            var hh = H7h;
2325
+	            var hl = H7l;
2326
+
2327
+	            // Rounds
2328
+	            for (var i = 0; i < 80; i++) {
2329
+	                var Wil;
2330
+	                var Wih;
2331
+
2332
+	                // Shortcut
2333
+	                var Wi = W[i];
2334
+
2335
+	                // Extend message
2336
+	                if (i < 16) {
2337
+	                    Wih = Wi.high = M[offset + i * 2]     | 0;
2338
+	                    Wil = Wi.low  = M[offset + i * 2 + 1] | 0;
2339
+	                } else {
2340
+	                    // Gamma0
2341
+	                    var gamma0x  = W[i - 15];
2342
+	                    var gamma0xh = gamma0x.high;
2343
+	                    var gamma0xl = gamma0x.low;
2344
+	                    var gamma0h  = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);
2345
+	                    var gamma0l  = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));
2346
+
2347
+	                    // Gamma1
2348
+	                    var gamma1x  = W[i - 2];
2349
+	                    var gamma1xh = gamma1x.high;
2350
+	                    var gamma1xl = gamma1x.low;
2351
+	                    var gamma1h  = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);
2352
+	                    var gamma1l  = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));
2353
+
2354
+	                    // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
2355
+	                    var Wi7  = W[i - 7];
2356
+	                    var Wi7h = Wi7.high;
2357
+	                    var Wi7l = Wi7.low;
2358
+
2359
+	                    var Wi16  = W[i - 16];
2360
+	                    var Wi16h = Wi16.high;
2361
+	                    var Wi16l = Wi16.low;
2362
+
2363
+	                    Wil = gamma0l + Wi7l;
2364
+	                    Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);
2365
+	                    Wil = Wil + gamma1l;
2366
+	                    Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);
2367
+	                    Wil = Wil + Wi16l;
2368
+	                    Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);
2369
+
2370
+	                    Wi.high = Wih;
2371
+	                    Wi.low  = Wil;
2372
+	                }
2373
+
2374
+	                var chh  = (eh & fh) ^ (~eh & gh);
2375
+	                var chl  = (el & fl) ^ (~el & gl);
2376
+	                var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);
2377
+	                var majl = (al & bl) ^ (al & cl) ^ (bl & cl);
2378
+
2379
+	                var sigma0h = ((ah >>> 28) | (al << 4))  ^ ((ah << 30)  | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));
2380
+	                var sigma0l = ((al >>> 28) | (ah << 4))  ^ ((al << 30)  | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));
2381
+	                var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));
2382
+	                var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));
2383
+
2384
+	                // t1 = h + sigma1 + ch + K[i] + W[i]
2385
+	                var Ki  = K[i];
2386
+	                var Kih = Ki.high;
2387
+	                var Kil = Ki.low;
2388
+
2389
+	                var t1l = hl + sigma1l;
2390
+	                var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);
2391
+	                var t1l = t1l + chl;
2392
+	                var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);
2393
+	                var t1l = t1l + Kil;
2394
+	                var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);
2395
+	                var t1l = t1l + Wil;
2396
+	                var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);
2397
+
2398
+	                // t2 = sigma0 + maj
2399
+	                var t2l = sigma0l + majl;
2400
+	                var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);
2401
+
2402
+	                // Update working variables
2403
+	                hh = gh;
2404
+	                hl = gl;
2405
+	                gh = fh;
2406
+	                gl = fl;
2407
+	                fh = eh;
2408
+	                fl = el;
2409
+	                el = (dl + t1l) | 0;
2410
+	                eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;
2411
+	                dh = ch;
2412
+	                dl = cl;
2413
+	                ch = bh;
2414
+	                cl = bl;
2415
+	                bh = ah;
2416
+	                bl = al;
2417
+	                al = (t1l + t2l) | 0;
2418
+	                ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;
2419
+	            }
2420
+
2421
+	            // Intermediate hash value
2422
+	            H0l = H0.low  = (H0l + al);
2423
+	            H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));
2424
+	            H1l = H1.low  = (H1l + bl);
2425
+	            H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));
2426
+	            H2l = H2.low  = (H2l + cl);
2427
+	            H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));
2428
+	            H3l = H3.low  = (H3l + dl);
2429
+	            H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));
2430
+	            H4l = H4.low  = (H4l + el);
2431
+	            H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));
2432
+	            H5l = H5.low  = (H5l + fl);
2433
+	            H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));
2434
+	            H6l = H6.low  = (H6l + gl);
2435
+	            H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));
2436
+	            H7l = H7.low  = (H7l + hl);
2437
+	            H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));
2438
+	        },
2439
+
2440
+	        _doFinalize: function () {
2441
+	            // Shortcuts
2442
+	            var data = this._data;
2443
+	            var dataWords = data.words;
2444
+
2445
+	            var nBitsTotal = this._nDataBytes * 8;
2446
+	            var nBitsLeft = data.sigBytes * 8;
2447
+
2448
+	            // Add padding
2449
+	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
2450
+	            dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);
2451
+	            dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;
2452
+	            data.sigBytes = dataWords.length * 4;
2453
+
2454
+	            // Hash final blocks
2455
+	            this._process();
2456
+
2457
+	            // Convert hash to 32-bit word array before returning
2458
+	            var hash = this._hash.toX32();
2459
+
2460
+	            // Return final computed hash
2461
+	            return hash;
2462
+	        },
2463
+
2464
+	        clone: function () {
2465
+	            var clone = Hasher.clone.call(this);
2466
+	            clone._hash = this._hash.clone();
2467
+
2468
+	            return clone;
2469
+	        },
2470
+
2471
+	        blockSize: 1024/32
2472
+	    });
2473
+
2474
+	    /**
2475
+	     * Shortcut function to the hasher's object interface.
2476
+	     *
2477
+	     * @param {WordArray|string} message The message to hash.
2478
+	     *
2479
+	     * @return {WordArray} The hash.
2480
+	     *
2481
+	     * @static
2482
+	     *
2483
+	     * @example
2484
+	     *
2485
+	     *     var hash = CryptoJS.SHA512('message');
2486
+	     *     var hash = CryptoJS.SHA512(wordArray);
2487
+	     */
2488
+	    C.SHA512 = Hasher._createHelper(SHA512);
2489
+
2490
+	    /**
2491
+	     * Shortcut function to the HMAC's object interface.
2492
+	     *
2493
+	     * @param {WordArray|string} message The message to hash.
2494
+	     * @param {WordArray|string} key The secret key.
2495
+	     *
2496
+	     * @return {WordArray} The HMAC.
2497
+	     *
2498
+	     * @static
2499
+	     *
2500
+	     * @example
2501
+	     *
2502
+	     *     var hmac = CryptoJS.HmacSHA512(message, key);
2503
+	     */
2504
+	    C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
2505
+	}());
2506
+
2507
+
2508
+	(function () {
2509
+	    // Shortcuts
2510
+	    var C = CryptoJS;
2511
+	    var C_x64 = C.x64;
2512
+	    var X64Word = C_x64.Word;
2513
+	    var X64WordArray = C_x64.WordArray;
2514
+	    var C_algo = C.algo;
2515
+	    var SHA512 = C_algo.SHA512;
2516
+
2517
+	    /**
2518
+	     * SHA-384 hash algorithm.
2519
+	     */
2520
+	    var SHA384 = C_algo.SHA384 = SHA512.extend({
2521
+	        _doReset: function () {
2522
+	            this._hash = new X64WordArray.init([
2523
+	                new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
2524
+	                new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
2525
+	                new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
2526
+	                new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
2527
+	            ]);
2528
+	        },
2529
+
2530
+	        _doFinalize: function () {
2531
+	            var hash = SHA512._doFinalize.call(this);
2532
+
2533
+	            hash.sigBytes -= 16;
2534
+
2535
+	            return hash;
2536
+	        }
2537
+	    });
2538
+
2539
+	    /**
2540
+	     * Shortcut function to the hasher's object interface.
2541
+	     *
2542
+	     * @param {WordArray|string} message The message to hash.
2543
+	     *
2544
+	     * @return {WordArray} The hash.
2545
+	     *
2546
+	     * @static
2547
+	     *
2548
+	     * @example
2549
+	     *
2550
+	     *     var hash = CryptoJS.SHA384('message');
2551
+	     *     var hash = CryptoJS.SHA384(wordArray);
2552
+	     */
2553
+	    C.SHA384 = SHA512._createHelper(SHA384);
2554
+
2555
+	    /**
2556
+	     * Shortcut function to the HMAC's object interface.
2557
+	     *
2558
+	     * @param {WordArray|string} message The message to hash.
2559
+	     * @param {WordArray|string} key The secret key.
2560
+	     *
2561
+	     * @return {WordArray} The HMAC.
2562
+	     *
2563
+	     * @static
2564
+	     *
2565
+	     * @example
2566
+	     *
2567
+	     *     var hmac = CryptoJS.HmacSHA384(message, key);
2568
+	     */
2569
+	    C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
2570
+	}());
2571
+
2572
+
2573
+	(function (Math) {
2574
+	    // Shortcuts
2575
+	    var C = CryptoJS;
2576
+	    var C_lib = C.lib;
2577
+	    var WordArray = C_lib.WordArray;
2578
+	    var Hasher = C_lib.Hasher;
2579
+	    var C_x64 = C.x64;
2580
+	    var X64Word = C_x64.Word;
2581
+	    var C_algo = C.algo;
2582
+
2583
+	    // Constants tables
2584
+	    var RHO_OFFSETS = [];
2585
+	    var PI_INDEXES  = [];
2586
+	    var ROUND_CONSTANTS = [];
2587
+
2588
+	    // Compute Constants
2589
+	    (function () {
2590
+	        // Compute rho offset constants
2591
+	        var x = 1, y = 0;
2592
+	        for (var t = 0; t < 24; t++) {
2593
+	            RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;
2594
+
2595
+	            var newX = y % 5;
2596
+	            var newY = (2 * x + 3 * y) % 5;
2597
+	            x = newX;
2598
+	            y = newY;
2599
+	        }
2600
+
2601
+	        // Compute pi index constants
2602
+	        for (var x = 0; x < 5; x++) {
2603
+	            for (var y = 0; y < 5; y++) {
2604
+	                PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;
2605
+	            }
2606
+	        }
2607
+
2608
+	        // Compute round constants
2609
+	        var LFSR = 0x01;
2610
+	        for (var i = 0; i < 24; i++) {
2611
+	            var roundConstantMsw = 0;
2612
+	            var roundConstantLsw = 0;
2613
+
2614
+	            for (var j = 0; j < 7; j++) {
2615
+	                if (LFSR & 0x01) {
2616
+	                    var bitPosition = (1 << j) - 1;
2617
+	                    if (bitPosition < 32) {
2618
+	                        roundConstantLsw ^= 1 << bitPosition;
2619
+	                    } else /* if (bitPosition >= 32) */ {
2620
+	                        roundConstantMsw ^= 1 << (bitPosition - 32);
2621
+	                    }
2622
+	                }
2623
+
2624
+	                // Compute next LFSR
2625
+	                if (LFSR & 0x80) {
2626
+	                    // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1
2627
+	                    LFSR = (LFSR << 1) ^ 0x71;
2628
+	                } else {
2629
+	                    LFSR <<= 1;
2630
+	                }
2631
+	            }
2632
+
2633
+	            ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
2634
+	        }
2635
+	    }());
2636
+
2637
+	    // Reusable objects for temporary values
2638
+	    var T = [];
2639
+	    (function () {
2640
+	        for (var i = 0; i < 25; i++) {
2641
+	            T[i] = X64Word.create();
2642
+	        }
2643
+	    }());
2644
+
2645
+	    /**
2646
+	     * SHA-3 hash algorithm.
2647
+	     */
2648
+	    var SHA3 = C_algo.SHA3 = Hasher.extend({
2649
+	        /**
2650
+	         * Configuration options.
2651
+	         *
2652
+	         * @property {number} outputLength
2653
+	         *   The desired number of bits in the output hash.
2654
+	         *   Only values permitted are: 224, 256, 384, 512.
2655
+	         *   Default: 512
2656
+	         */
2657
+	        cfg: Hasher.cfg.extend({
2658
+	            outputLength: 512
2659
+	        }),
2660
+
2661
+	        _doReset: function () {
2662
+	            var state = this._state = []
2663
+	            for (var i = 0; i < 25; i++) {
2664
+	                state[i] = new X64Word.init();
2665
+	            }
2666
+
2667
+	            this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
2668
+	        },
2669
+
2670
+	        _doProcessBlock: function (M, offset) {
2671
+	            // Shortcuts
2672
+	            var state = this._state;
2673
+	            var nBlockSizeLanes = this.blockSize / 2;
2674
+
2675
+	            // Absorb
2676
+	            for (var i = 0; i < nBlockSizeLanes; i++) {
2677
+	                // Shortcuts
2678
+	                var M2i  = M[offset + 2 * i];
2679
+	                var M2i1 = M[offset + 2 * i + 1];
2680
+
2681
+	                // Swap endian
2682
+	                M2i = (
2683
+	                    (((M2i << 8)  | (M2i >>> 24)) & 0x00ff00ff) |
2684
+	                    (((M2i << 24) | (M2i >>> 8))  & 0xff00ff00)
2685
+	                );
2686
+	                M2i1 = (
2687
+	                    (((M2i1 << 8)  | (M2i1 >>> 24)) & 0x00ff00ff) |
2688
+	                    (((M2i1 << 24) | (M2i1 >>> 8))  & 0xff00ff00)
2689
+	                );
2690
+
2691
+	                // Absorb message into state
2692
+	                var lane = state[i];
2693
+	                lane.high ^= M2i1;
2694
+	                lane.low  ^= M2i;
2695
+	            }
2696
+
2697
+	            // Rounds
2698
+	            for (var round = 0; round < 24; round++) {
2699
+	                // Theta
2700
+	                for (var x = 0; x < 5; x++) {
2701
+	                    // Mix column lanes
2702
+	                    var tMsw = 0, tLsw = 0;
2703
+	                    for (var y = 0; y < 5; y++) {
2704
+	                        var lane = state[x + 5 * y];
2705
+	                        tMsw ^= lane.high;
2706
+	                        tLsw ^= lane.low;
2707
+	                    }
2708
+
2709
+	                    // Temporary values
2710
+	                    var Tx = T[x];
2711
+	                    Tx.high = tMsw;
2712
+	                    Tx.low  = tLsw;
2713
+	                }
2714
+	                for (var x = 0; x < 5; x++) {
2715
+	                    // Shortcuts
2716
+	                    var Tx4 = T[(x + 4) % 5];
2717
+	                    var Tx1 = T[(x + 1) % 5];
2718
+	                    var Tx1Msw = Tx1.high;
2719
+	                    var Tx1Lsw = Tx1.low;
2720
+
2721
+	                    // Mix surrounding columns
2722
+	                    var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));
2723
+	                    var tLsw = Tx4.low  ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));
2724
+	                    for (var y = 0; y < 5; y++) {
2725
+	                        var lane = state[x + 5 * y];
2726
+	                        lane.high ^= tMsw;
2727
+	                        lane.low  ^= tLsw;
2728
+	                    }
2729
+	                }
2730
+
2731
+	                // Rho Pi
2732
+	                for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
2733
+	                    var tMsw;
2734
+	                    var tLsw;
2735
+
2736
+	                    // Shortcuts
2737
+	                    var lane = state[laneIndex];
2738
+	                    var laneMsw = lane.high;
2739
+	                    var laneLsw = lane.low;
2740
+	                    var rhoOffset = RHO_OFFSETS[laneIndex];
2741
+
2742
+	                    // Rotate lanes
2743
+	                    if (rhoOffset < 32) {
2744
+	                        tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));
2745
+	                        tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));
2746
+	                    } else /* if (rhoOffset >= 32) */ {
2747
+	                        tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));
2748
+	                        tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));
2749
+	                    }
2750
+
2751
+	                    // Transpose lanes
2752
+	                    var TPiLane = T[PI_INDEXES[laneIndex]];
2753
+	                    TPiLane.high = tMsw;
2754
+	                    TPiLane.low  = tLsw;
2755
+	                }
2756
+
2757
+	                // Rho pi at x = y = 0
2758
+	                var T0 = T[0];
2759
+	                var state0 = state[0];
2760
+	                T0.high = state0.high;
2761
+	                T0.low  = state0.low;
2762
+
2763
+	                // Chi
2764
+	                for (var x = 0; x < 5; x++) {
2765
+	                    for (var y = 0; y < 5; y++) {
2766
+	                        // Shortcuts
2767
+	                        var laneIndex = x + 5 * y;
2768
+	                        var lane = state[laneIndex];
2769
+	                        var TLane = T[laneIndex];
2770
+	                        var Tx1Lane = T[((x + 1) % 5) + 5 * y];
2771
+	                        var Tx2Lane = T[((x + 2) % 5) + 5 * y];
2772
+
2773
+	                        // Mix rows
2774
+	                        lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);
2775
+	                        lane.low  = TLane.low  ^ (~Tx1Lane.low  & Tx2Lane.low);
2776
+	                    }
2777
+	                }
2778
+
2779
+	                // Iota
2780
+	                var lane = state[0];
2781
+	                var roundConstant = ROUND_CONSTANTS[round];
2782
+	                lane.high ^= roundConstant.high;
2783
+	                lane.low  ^= roundConstant.low;
2784
+	            }
2785
+	        },
2786
+
2787
+	        _doFinalize: function () {
2788
+	            // Shortcuts
2789
+	            var data = this._data;
2790
+	            var dataWords = data.words;
2791
+	            var nBitsTotal = this._nDataBytes * 8;
2792
+	            var nBitsLeft = data.sigBytes * 8;
2793
+	            var blockSizeBits = this.blockSize * 32;
2794
+
2795
+	            // Add padding
2796
+	            dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);
2797
+	            dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;
2798
+	            data.sigBytes = dataWords.length * 4;
2799
+
2800
+	            // Hash final blocks
2801
+	            this._process();
2802
+
2803
+	            // Shortcuts
2804
+	            var state = this._state;
2805
+	            var outputLengthBytes = this.cfg.outputLength / 8;
2806
+	            var outputLengthLanes = outputLengthBytes / 8;
2807
+
2808
+	            // Squeeze
2809
+	            var hashWords = [];
2810
+	            for (var i = 0; i < outputLengthLanes; i++) {
2811
+	                // Shortcuts
2812
+	                var lane = state[i];
2813
+	                var laneMsw = lane.high;
2814
+	                var laneLsw = lane.low;
2815
+
2816
+	                // Swap endian
2817
+	                laneMsw = (
2818
+	                    (((laneMsw << 8)  | (laneMsw >>> 24)) & 0x00ff00ff) |
2819
+	                    (((laneMsw << 24) | (laneMsw >>> 8))  & 0xff00ff00)
2820
+	                );
2821
+	                laneLsw = (
2822
+	                    (((laneLsw << 8)  | (laneLsw >>> 24)) & 0x00ff00ff) |
2823
+	                    (((laneLsw << 24) | (laneLsw >>> 8))  & 0xff00ff00)
2824
+	                );
2825
+
2826
+	                // Squeeze state to retrieve hash
2827
+	                hashWords.push(laneLsw);
2828
+	                hashWords.push(laneMsw);
2829
+	            }
2830
+
2831
+	            // Return final computed hash
2832
+	            return new WordArray.init(hashWords, outputLengthBytes);
2833
+	        },
2834
+
2835
+	        clone: function () {
2836
+	            var clone = Hasher.clone.call(this);
2837
+
2838
+	            var state = clone._state = this._state.slice(0);
2839
+	            for (var i = 0; i < 25; i++) {
2840
+	                state[i] = state[i].clone();
2841
+	            }
2842
+
2843
+	            return clone;
2844
+	        }
2845
+	    });
2846
+
2847
+	    /**
2848
+	     * Shortcut function to the hasher's object interface.
2849
+	     *
2850
+	     * @param {WordArray|string} message The message to hash.
2851
+	     *
2852
+	     * @return {WordArray} The hash.
2853
+	     *
2854
+	     * @static
2855
+	     *
2856
+	     * @example
2857
+	     *
2858
+	     *     var hash = CryptoJS.SHA3('message');
2859
+	     *     var hash = CryptoJS.SHA3(wordArray);
2860
+	     */
2861
+	    C.SHA3 = Hasher._createHelper(SHA3);
2862
+
2863
+	    /**
2864
+	     * Shortcut function to the HMAC's object interface.
2865
+	     *
2866
+	     * @param {WordArray|string} message The message to hash.
2867
+	     * @param {WordArray|string} key The secret key.
2868
+	     *
2869
+	     * @return {WordArray} The HMAC.
2870
+	     *
2871
+	     * @static
2872
+	     *
2873
+	     * @example
2874
+	     *
2875
+	     *     var hmac = CryptoJS.HmacSHA3(message, key);
2876
+	     */
2877
+	    C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
2878
+	}(Math));
2879
+
2880
+
2881
+	/** @preserve
2882
+	(c) 2012 by Cédric Mesnil. All rights reserved.
2883
+
2884
+	Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2885
+
2886
+	    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2887
+	    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
2888
+
2889
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2890
+	*/
2891
+
2892
+	(function (Math) {
2893
+	    // Shortcuts
2894
+	    var C = CryptoJS;
2895
+	    var C_lib = C.lib;
2896
+	    var WordArray = C_lib.WordArray;
2897
+	    var Hasher = C_lib.Hasher;
2898
+	    var C_algo = C.algo;
2899
+
2900
+	    // Constants table
2901
+	    var _zl = WordArray.create([
2902
+	        0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
2903
+	        7,  4, 13,  1, 10,  6, 15,  3, 12,  0,  9,  5,  2, 14, 11,  8,
2904
+	        3, 10, 14,  4,  9, 15,  8,  1,  2,  7,  0,  6, 13, 11,  5, 12,
2905
+	        1,  9, 11, 10,  0,  8, 12,  4, 13,  3,  7, 15, 14,  5,  6,  2,
2906
+	        4,  0,  5,  9,  7, 12,  2, 10, 14,  1,  3,  8, 11,  6, 15, 13]);
2907
+	    var _zr = WordArray.create([
2908
+	        5, 14,  7,  0,  9,  2, 11,  4, 13,  6, 15,  8,  1, 10,  3, 12,
2909
+	        6, 11,  3,  7,  0, 13,  5, 10, 14, 15,  8, 12,  4,  9,  1,  2,
2910
+	        15,  5,  1,  3,  7, 14,  6,  9, 11,  8, 12,  2, 10,  0,  4, 13,
2911
+	        8,  6,  4,  1,  3, 11, 15,  0,  5, 12,  2, 13,  9,  7, 10, 14,
2912
+	        12, 15, 10,  4,  1,  5,  8,  7,  6,  2, 13, 14,  0,  3,  9, 11]);
2913
+	    var _sl = WordArray.create([
2914
+	         11, 14, 15, 12,  5,  8,  7,  9, 11, 13, 14, 15,  6,  7,  9,  8,
2915
+	        7, 6,   8, 13, 11,  9,  7, 15,  7, 12, 15,  9, 11,  7, 13, 12,
2916
+	        11, 13,  6,  7, 14,  9, 13, 15, 14,  8, 13,  6,  5, 12,  7,  5,
2917
+	          11, 12, 14, 15, 14, 15,  9,  8,  9, 14,  5,  6,  8,  6,  5, 12,
2918
+	        9, 15,  5, 11,  6,  8, 13, 12,  5, 12, 13, 14, 11,  8,  5,  6 ]);
2919
+	    var _sr = WordArray.create([
2920
+	        8,  9,  9, 11, 13, 15, 15,  5,  7,  7,  8, 11, 14, 14, 12,  6,
2921
+	        9, 13, 15,  7, 12,  8,  9, 11,  7,  7, 12,  7,  6, 15, 13, 11,
2922
+	        9,  7, 15, 11,  8,  6,  6, 14, 12, 13,  5, 14, 13, 13,  7,  5,
2923
+	        15,  5,  8, 11, 14, 14,  6, 14,  6,  9, 12,  9, 12,  5, 15,  8,
2924
+	        8,  5, 12,  9, 12,  5, 14,  6,  8, 13,  6,  5, 15, 13, 11, 11 ]);
2925
+
2926
+	    var _hl =  WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
2927
+	    var _hr =  WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
2928
+
2929
+	    /**
2930
+	     * RIPEMD160 hash algorithm.
2931
+	     */
2932
+	    var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
2933
+	        _doReset: function () {
2934
+	            this._hash  = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);
2935
+	        },
2936
+
2937
+	        _doProcessBlock: function (M, offset) {
2938
+
2939
+	            // Swap endian
2940
+	            for (var i = 0; i < 16; i++) {
2941
+	                // Shortcuts
2942
+	                var offset_i = offset + i;
2943
+	                var M_offset_i = M[offset_i];
2944
+
2945
+	                // Swap
2946
+	                M[offset_i] = (
2947
+	                    (((M_offset_i << 8)  | (M_offset_i >>> 24)) & 0x00ff00ff) |
2948
+	                    (((M_offset_i << 24) | (M_offset_i >>> 8))  & 0xff00ff00)
2949
+	                );
2950
+	            }
2951
+	            // Shortcut
2952
+	            var H  = this._hash.words;
2953
+	            var hl = _hl.words;
2954
+	            var hr = _hr.words;
2955
+	            var zl = _zl.words;
2956
+	            var zr = _zr.words;
2957
+	            var sl = _sl.words;
2958
+	            var sr = _sr.words;
2959
+
2960
+	            // Working variables
2961
+	            var al, bl, cl, dl, el;
2962
+	            var ar, br, cr, dr, er;
2963
+
2964
+	            ar = al = H[0];
2965
+	            br = bl = H[1];
2966
+	            cr = cl = H[2];
2967
+	            dr = dl = H[3];
2968
+	            er = el = H[4];
2969
+	            // Computation
2970
+	            var t;
2971
+	            for (var i = 0; i < 80; i += 1) {
2972
+	                t = (al +  M[offset+zl[i]])|0;
2973
+	                if (i<16){
2974
+		            t +=  f1(bl,cl,dl) + hl[0];
2975
+	                } else if (i<32) {
2976
+		            t +=  f2(bl,cl,dl) + hl[1];
2977
+	                } else if (i<48) {
2978
+		            t +=  f3(bl,cl,dl) + hl[2];
2979
+	                } else if (i<64) {
2980
+		            t +=  f4(bl,cl,dl) + hl[3];
2981
+	                } else {// if (i<80) {
2982
+		            t +=  f5(bl,cl,dl) + hl[4];
2983
+	                }
2984
+	                t = t|0;
2985
+	                t =  rotl(t,sl[i]);
2986
+	                t = (t+el)|0;
2987
+	                al = el;
2988
+	                el = dl;
2989
+	                dl = rotl(cl, 10);
2990
+	                cl = bl;
2991
+	                bl = t;
2992
+
2993
+	                t = (ar + M[offset+zr[i]])|0;
2994
+	                if (i<16){
2995
+		            t +=  f5(br,cr,dr) + hr[0];
2996
+	                } else if (i<32) {
2997
+		            t +=  f4(br,cr,dr) + hr[1];
2998
+	                } else if (i<48) {
2999
+		            t +=  f3(br,cr,dr) + hr[2];
3000
+	                } else if (i<64) {
3001
+		            t +=  f2(br,cr,dr) + hr[3];
3002
+	                } else {// if (i<80) {
3003
+		            t +=  f1(br,cr,dr) + hr[4];
3004
+	                }
3005
+	                t = t|0;
3006
+	                t =  rotl(t,sr[i]) ;
3007
+	                t = (t+er)|0;
3008
+	                ar = er;
3009
+	                er = dr;
3010
+	                dr = rotl(cr, 10);
3011
+	                cr = br;
3012
+	                br = t;
3013
+	            }
3014
+	            // Intermediate hash value
3015
+	            t    = (H[1] + cl + dr)|0;
3016
+	            H[1] = (H[2] + dl + er)|0;
3017
+	            H[2] = (H[3] + el + ar)|0;
3018
+	            H[3] = (H[4] + al + br)|0;
3019
+	            H[4] = (H[0] + bl + cr)|0;
3020
+	            H[0] =  t;
3021
+	        },
3022
+
3023
+	        _doFinalize: function () {
3024
+	            // Shortcuts
3025
+	            var data = this._data;
3026
+	            var dataWords = data.words;
3027
+
3028
+	            var nBitsTotal = this._nDataBytes * 8;
3029
+	            var nBitsLeft = data.sigBytes * 8;
3030
+
3031
+	            // Add padding
3032
+	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
3033
+	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
3034
+	                (((nBitsTotal << 8)  | (nBitsTotal >>> 24)) & 0x00ff00ff) |
3035
+	                (((nBitsTotal << 24) | (nBitsTotal >>> 8))  & 0xff00ff00)
3036
+	            );
3037
+	            data.sigBytes = (dataWords.length + 1) * 4;
3038
+
3039
+	            // Hash final blocks
3040
+	            this._process();
3041
+
3042
+	            // Shortcuts
3043
+	            var hash = this._hash;
3044
+	            var H = hash.words;
3045
+
3046
+	            // Swap endian
3047
+	            for (var i = 0; i < 5; i++) {
3048
+	                // Shortcut
3049
+	                var H_i = H[i];
3050
+
3051
+	                // Swap
3052
+	                H[i] = (((H_i << 8)  | (H_i >>> 24)) & 0x00ff00ff) |
3053
+	                       (((H_i << 24) | (H_i >>> 8))  & 0xff00ff00);
3054
+	            }
3055
+
3056
+	            // Return final computed hash
3057
+	            return hash;
3058
+	        },
3059
+
3060
+	        clone: function () {
3061
+	            var clone = Hasher.clone.call(this);
3062
+	            clone._hash = this._hash.clone();
3063
+
3064
+	            return clone;
3065
+	        }
3066
+	    });
3067
+
3068
+
3069
+	    function f1(x, y, z) {
3070
+	        return ((x) ^ (y) ^ (z));
3071
+
3072
+	    }
3073
+
3074
+	    function f2(x, y, z) {
3075
+	        return (((x)&(y)) | ((~x)&(z)));
3076
+	    }
3077
+
3078
+	    function f3(x, y, z) {
3079
+	        return (((x) | (~(y))) ^ (z));
3080
+	    }
3081
+
3082
+	    function f4(x, y, z) {
3083
+	        return (((x) & (z)) | ((y)&(~(z))));
3084
+	    }
3085
+
3086
+	    function f5(x, y, z) {
3087
+	        return ((x) ^ ((y) |(~(z))));
3088
+
3089
+	    }
3090
+
3091
+	    function rotl(x,n) {
3092
+	        return (x<<n) | (x>>>(32-n));
3093
+	    }
3094
+
3095
+
3096
+	    /**
3097
+	     * Shortcut function to the hasher's object interface.
3098
+	     *
3099
+	     * @param {WordArray|string} message The message to hash.
3100
+	     *
3101
+	     * @return {WordArray} The hash.
3102
+	     *
3103
+	     * @static
3104
+	     *
3105
+	     * @example
3106
+	     *
3107
+	     *     var hash = CryptoJS.RIPEMD160('message');
3108
+	     *     var hash = CryptoJS.RIPEMD160(wordArray);
3109
+	     */
3110
+	    C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
3111
+
3112
+	    /**
3113
+	     * Shortcut function to the HMAC's object interface.
3114
+	     *
3115
+	     * @param {WordArray|string} message The message to hash.
3116
+	     * @param {WordArray|string} key The secret key.
3117
+	     *
3118
+	     * @return {WordArray} The HMAC.
3119
+	     *
3120
+	     * @static
3121
+	     *
3122
+	     * @example
3123
+	     *
3124
+	     *     var hmac = CryptoJS.HmacRIPEMD160(message, key);
3125
+	     */
3126
+	    C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
3127
+	}(Math));
3128
+
3129
+
3130
+	(function () {
3131
+	    // Shortcuts
3132
+	    var C = CryptoJS;
3133
+	    var C_lib = C.lib;
3134
+	    var Base = C_lib.Base;
3135
+	    var C_enc = C.enc;
3136
+	    var Utf8 = C_enc.Utf8;
3137
+	    var C_algo = C.algo;
3138
+
3139
+	    /**
3140
+	     * HMAC algorithm.
3141
+	     */
3142
+	    var HMAC = C_algo.HMAC = Base.extend({
3143
+	        /**
3144
+	         * Initializes a newly created HMAC.
3145
+	         *
3146
+	         * @param {Hasher} hasher The hash algorithm to use.
3147
+	         * @param {WordArray|string} key The secret key.
3148
+	         *
3149
+	         * @example
3150
+	         *
3151
+	         *     var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
3152
+	         */
3153
+	        init: function (hasher, key) {
3154
+	            // Init hasher
3155
+	            hasher = this._hasher = new hasher.init();
3156
+
3157
+	            // Convert string to WordArray, else assume WordArray already
3158
+	            if (typeof key == 'string') {
3159
+	                key = Utf8.parse(key);
3160
+	            }
3161
+
3162
+	            // Shortcuts
3163
+	            var hasherBlockSize = hasher.blockSize;
3164
+	            var hasherBlockSizeBytes = hasherBlockSize * 4;
3165
+
3166
+	            // Allow arbitrary length keys
3167
+	            if (key.sigBytes > hasherBlockSizeBytes) {
3168
+	                key = hasher.finalize(key);
3169
+	            }
3170
+
3171
+	            // Clamp excess bits
3172
+	            key.clamp();
3173
+
3174
+	            // Clone key for inner and outer pads
3175
+	            var oKey = this._oKey = key.clone();
3176
+	            var iKey = this._iKey = key.clone();
3177
+
3178
+	            // Shortcuts
3179
+	            var oKeyWords = oKey.words;
3180
+	            var iKeyWords = iKey.words;
3181
+
3182
+	            // XOR keys with pad constants
3183
+	            for (var i = 0; i < hasherBlockSize; i++) {
3184
+	                oKeyWords[i] ^= 0x5c5c5c5c;
3185
+	                iKeyWords[i] ^= 0x36363636;
3186
+	            }
3187
+	            oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
3188
+
3189
+	            // Set initial values
3190
+	            this.reset();
3191
+	        },
3192
+
3193
+	        /**
3194
+	         * Resets this HMAC to its initial state.
3195
+	         *
3196
+	         * @example
3197
+	         *
3198
+	         *     hmacHasher.reset();
3199
+	         */
3200
+	        reset: function () {
3201
+	            // Shortcut
3202
+	            var hasher = this._hasher;
3203
+
3204
+	            // Reset
3205
+	            hasher.reset();
3206
+	            hasher.update(this._iKey);
3207
+	        },
3208
+
3209
+	        /**
3210
+	         * Updates this HMAC with a message.
3211
+	         *
3212
+	         * @param {WordArray|string} messageUpdate The message to append.
3213
+	         *
3214
+	         * @return {HMAC} This HMAC instance.
3215
+	         *
3216
+	         * @example
3217
+	         *
3218
+	         *     hmacHasher.update('message');
3219
+	         *     hmacHasher.update(wordArray);
3220
+	         */
3221
+	        update: function (messageUpdate) {
3222
+	            this._hasher.update(messageUpdate);
3223
+
3224
+	            // Chainable
3225
+	            return this;
3226
+	        },
3227
+
3228
+	        /**
3229
+	         * Finalizes the HMAC computation.
3230
+	         * Note that the finalize operation is effectively a destructive, read-once operation.
3231
+	         *
3232
+	         * @param {WordArray|string} messageUpdate (Optional) A final message update.
3233
+	         *
3234
+	         * @return {WordArray} The HMAC.
3235
+	         *
3236
+	         * @example
3237
+	         *
3238
+	         *     var hmac = hmacHasher.finalize();
3239
+	         *     var hmac = hmacHasher.finalize('message');
3240
+	         *     var hmac = hmacHasher.finalize(wordArray);
3241
+	         */
3242
+	        finalize: function (messageUpdate) {
3243
+	            // Shortcut
3244
+	            var hasher = this._hasher;
3245
+
3246
+	            // Compute HMAC
3247
+	            var innerHash = hasher.finalize(messageUpdate);
3248
+	            hasher.reset();
3249
+	            var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
3250
+
3251
+	            return hmac;
3252
+	        }
3253
+	    });
3254
+	}());
3255
+
3256
+
3257
+	(function () {
3258
+	    // Shortcuts
3259
+	    var C = CryptoJS;
3260
+	    var C_lib = C.lib;
3261
+	    var Base = C_lib.Base;
3262
+	    var WordArray = C_lib.WordArray;
3263
+	    var C_algo = C.algo;
3264
+	    var SHA1 = C_algo.SHA1;
3265
+	    var HMAC = C_algo.HMAC;
3266
+
3267
+	    /**
3268
+	     * Password-Based Key Derivation Function 2 algorithm.
3269
+	     */
3270
+	    var PBKDF2 = C_algo.PBKDF2 = Base.extend({
3271
+	        /**
3272
+	         * Configuration options.
3273
+	         *
3274
+	         * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
3275
+	         * @property {Hasher} hasher The hasher to use. Default: SHA1
3276
+	         * @property {number} iterations The number of iterations to perform. Default: 1
3277
+	         */
3278
+	        cfg: Base.extend({
3279
+	            keySize: 128/32,
3280
+	            hasher: SHA1,
3281
+	            iterations: 1
3282
+	        }),
3283
+
3284
+	        /**
3285
+	         * Initializes a newly created key derivation function.
3286
+	         *
3287
+	         * @param {Object} cfg (Optional) The configuration options to use for the derivation.
3288
+	         *
3289
+	         * @example
3290
+	         *
3291
+	         *     var kdf = CryptoJS.algo.PBKDF2.create();
3292
+	         *     var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
3293
+	         *     var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
3294
+	         */
3295
+	        init: function (cfg) {
3296
+	            this.cfg = this.cfg.extend(cfg);
3297
+	        },
3298
+
3299
+	        /**
3300
+	         * Computes the Password-Based Key Derivation Function 2.
3301
+	         *
3302
+	         * @param {WordArray|string} password The password.
3303
+	         * @param {WordArray|string} salt A salt.
3304
+	         *
3305
+	         * @return {WordArray} The derived key.
3306
+	         *
3307
+	         * @example
3308
+	         *
3309
+	         *     var key = kdf.compute(password, salt);
3310
+	         */
3311
+	        compute: function (password, salt) {
3312
+	            // Shortcut
3313
+	            var cfg = this.cfg;
3314
+
3315
+	            // Init HMAC
3316
+	            var hmac = HMAC.create(cfg.hasher, password);
3317
+
3318
+	            // Initial values
3319
+	            var derivedKey = WordArray.create();
3320
+	            var blockIndex = WordArray.create([0x00000001]);
3321
+
3322
+	            // Shortcuts
3323
+	            var derivedKeyWords = derivedKey.words;
3324
+	            var blockIndexWords = blockIndex.words;
3325
+	            var keySize = cfg.keySize;
3326
+	            var iterations = cfg.iterations;
3327
+
3328
+	            // Generate key
3329
+	            while (derivedKeyWords.length < keySize) {
3330
+	                var block = hmac.update(salt).finalize(blockIndex);
3331
+	                hmac.reset();
3332
+
3333
+	                // Shortcuts
3334
+	                var blockWords = block.words;
3335
+	                var blockWordsLength = blockWords.length;
3336
+
3337
+	                // Iterations
3338
+	                var intermediate = block;
3339
+	                for (var i = 1; i < iterations; i++) {
3340
+	                    intermediate = hmac.finalize(intermediate);
3341
+	                    hmac.reset();
3342
+
3343
+	                    // Shortcut
3344
+	                    var intermediateWords = intermediate.words;
3345
+
3346
+	                    // XOR intermediate with block
3347
+	                    for (var j = 0; j < blockWordsLength; j++) {
3348
+	                        blockWords[j] ^= intermediateWords[j];
3349
+	                    }
3350
+	                }
3351
+
3352
+	                derivedKey.concat(block);
3353
+	                blockIndexWords[0]++;
3354
+	            }
3355
+	            derivedKey.sigBytes = keySize * 4;
3356
+
3357
+	            return derivedKey;
3358
+	        }
3359
+	    });
3360
+
3361
+	    /**
3362
+	     * Computes the Password-Based Key Derivation Function 2.
3363
+	     *
3364
+	     * @param {WordArray|string} password The password.
3365
+	     * @param {WordArray|string} salt A salt.
3366
+	     * @param {Object} cfg (Optional) The configuration options to use for this computation.
3367
+	     *
3368
+	     * @return {WordArray} The derived key.
3369
+	     *
3370
+	     * @static
3371
+	     *
3372
+	     * @example
3373
+	     *
3374
+	     *     var key = CryptoJS.PBKDF2(password, salt);
3375
+	     *     var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
3376
+	     *     var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
3377
+	     */
3378
+	    C.PBKDF2 = function (password, salt, cfg) {
3379
+	        return PBKDF2.create(cfg).compute(password, salt);
3380
+	    };
3381
+	}());
3382
+
3383
+
3384
+	(function () {
3385
+	    // Shortcuts
3386
+	    var C = CryptoJS;
3387
+	    var C_lib = C.lib;
3388
+	    var Base = C_lib.Base;
3389
+	    var WordArray = C_lib.WordArray;
3390
+	    var C_algo = C.algo;
3391
+	    var MD5 = C_algo.MD5;
3392
+
3393
+	    /**
3394
+	     * This key derivation function is meant to conform with EVP_BytesToKey.
3395
+	     * www.openssl.org/docs/crypto/EVP_BytesToKey.html
3396
+	     */
3397
+	    var EvpKDF = C_algo.EvpKDF = Base.extend({
3398
+	        /**
3399
+	         * Configuration options.
3400
+	         *
3401
+	         * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
3402
+	         * @property {Hasher} hasher The hash algorithm to use. Default: MD5
3403
+	         * @property {number} iterations The number of iterations to perform. Default: 1
3404
+	         */
3405
+	        cfg: Base.extend({
3406
+	            keySize: 128/32,
3407
+	            hasher: MD5,
3408
+	            iterations: 1
3409
+	        }),
3410
+
3411
+	        /**
3412
+	         * Initializes a newly created key derivation function.
3413
+	         *
3414
+	         * @param {Object} cfg (Optional) The configuration options to use for the derivation.
3415
+	         *
3416
+	         * @example
3417
+	         *
3418
+	         *     var kdf = CryptoJS.algo.EvpKDF.create();
3419
+	         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
3420
+	         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
3421
+	         */
3422
+	        init: function (cfg) {
3423
+	            this.cfg = this.cfg.extend(cfg);
3424
+	        },
3425
+
3426
+	        /**
3427
+	         * Derives a key from a password.
3428
+	         *
3429
+	         * @param {WordArray|string} password The password.
3430
+	         * @param {WordArray|string} salt A salt.
3431
+	         *
3432
+	         * @return {WordArray} The derived key.
3433
+	         *
3434
+	         * @example
3435
+	         *
3436
+	         *     var key = kdf.compute(password, salt);
3437
+	         */
3438
+	        compute: function (password, salt) {
3439
+	            var block;
3440
+
3441
+	            // Shortcut
3442
+	            var cfg = this.cfg;
3443
+
3444
+	            // Init hasher
3445
+	            var hasher = cfg.hasher.create();
3446
+
3447
+	            // Initial values
3448
+	            var derivedKey = WordArray.create();
3449
+
3450
+	            // Shortcuts
3451
+	            var derivedKeyWords = derivedKey.words;
3452
+	            var keySize = cfg.keySize;
3453
+	            var iterations = cfg.iterations;
3454
+
3455
+	            // Generate key
3456
+	            while (derivedKeyWords.length < keySize) {
3457
+	                if (block) {
3458
+	                    hasher.update(block);
3459
+	                }
3460
+	                block = hasher.update(password).finalize(salt);
3461
+	                hasher.reset();
3462
+
3463
+	                // Iterations
3464
+	                for (var i = 1; i < iterations; i++) {
3465
+	                    block = hasher.finalize(block);
3466
+	                    hasher.reset();
3467
+	                }
3468
+
3469
+	                derivedKey.concat(block);
3470
+	            }
3471
+	            derivedKey.sigBytes = keySize * 4;
3472
+
3473
+	            return derivedKey;
3474
+	        }
3475
+	    });
3476
+
3477
+	    /**
3478
+	     * Derives a key from a password.
3479
+	     *
3480
+	     * @param {WordArray|string} password The password.
3481
+	     * @param {WordArray|string} salt A salt.
3482
+	     * @param {Object} cfg (Optional) The configuration options to use for this computation.
3483
+	     *
3484
+	     * @return {WordArray} The derived key.
3485
+	     *
3486
+	     * @static
3487
+	     *
3488
+	     * @example
3489
+	     *
3490
+	     *     var key = CryptoJS.EvpKDF(password, salt);
3491
+	     *     var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
3492
+	     *     var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
3493
+	     */
3494
+	    C.EvpKDF = function (password, salt, cfg) {
3495
+	        return EvpKDF.create(cfg).compute(password, salt);
3496
+	    };
3497
+	}());
3498
+
3499
+
3500
+	/**
3501
+	 * Cipher core components.
3502
+	 */
3503
+	CryptoJS.lib.Cipher || (function (undefined) {
3504
+	    // Shortcuts
3505
+	    var C = CryptoJS;
3506
+	    var C_lib = C.lib;
3507
+	    var Base = C_lib.Base;
3508
+	    var WordArray = C_lib.WordArray;
3509
+	    var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
3510
+	    var C_enc = C.enc;
3511
+	    var Utf8 = C_enc.Utf8;
3512
+	    var Base64 = C_enc.Base64;
3513
+	    var C_algo = C.algo;
3514
+	    var EvpKDF = C_algo.EvpKDF;
3515
+
3516
+	    /**
3517
+	     * Abstract base cipher template.
3518
+	     *
3519
+	     * @property {number} keySize This cipher's key size. Default: 4 (128 bits)
3520
+	     * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
3521
+	     * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
3522
+	     * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
3523
+	     */
3524
+	    var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
3525
+	        /**
3526
+	         * Configuration options.
3527
+	         *
3528
+	         * @property {WordArray} iv The IV to use for this operation.
3529
+	         */
3530
+	        cfg: Base.extend(),
3531
+
3532
+	        /**
3533
+	         * Creates this cipher in encryption mode.
3534
+	         *
3535
+	         * @param {WordArray} key The key.
3536
+	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
3537
+	         *
3538
+	         * @return {Cipher} A cipher instance.
3539
+	         *
3540
+	         * @static
3541
+	         *
3542
+	         * @example
3543
+	         *
3544
+	         *     var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
3545
+	         */
3546
+	        createEncryptor: function (key, cfg) {
3547
+	            return this.create(this._ENC_XFORM_MODE, key, cfg);
3548
+	        },
3549
+
3550
+	        /**
3551
+	         * Creates this cipher in decryption mode.
3552
+	         *
3553
+	         * @param {WordArray} key The key.
3554
+	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
3555
+	         *
3556
+	         * @return {Cipher} A cipher instance.
3557
+	         *
3558
+	         * @static
3559
+	         *
3560
+	         * @example
3561
+	         *
3562
+	         *     var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
3563
+	         */
3564
+	        createDecryptor: function (key, cfg) {
3565
+	            return this.create(this._DEC_XFORM_MODE, key, cfg);
3566
+	        },
3567
+
3568
+	        /**
3569
+	         * Initializes a newly created cipher.
3570
+	         *
3571
+	         * @param {number} xformMode Either the encryption or decryption transormation mode constant.
3572
+	         * @param {WordArray} key The key.
3573
+	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
3574
+	         *
3575
+	         * @example
3576
+	         *
3577
+	         *     var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
3578
+	         */
3579
+	        init: function (xformMode, key, cfg) {
3580
+	            // Apply config defaults
3581
+	            this.cfg = this.cfg.extend(cfg);
3582
+
3583
+	            // Store transform mode and key
3584
+	            this._xformMode = xformMode;
3585
+	            this._key = key;
3586
+
3587
+	            // Set initial values
3588
+	            this.reset();
3589
+	        },
3590
+
3591
+	        /**
3592
+	         * Resets this cipher to its initial state.
3593
+	         *
3594
+	         * @example
3595
+	         *
3596
+	         *     cipher.reset();
3597
+	         */
3598
+	        reset: function () {
3599
+	            // Reset data buffer
3600
+	            BufferedBlockAlgorithm.reset.call(this);
3601
+
3602
+	            // Perform concrete-cipher logic
3603
+	            this._doReset();
3604
+	        },
3605
+
3606
+	        /**
3607
+	         * Adds data to be encrypted or decrypted.
3608
+	         *
3609
+	         * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
3610
+	         *
3611
+	         * @return {WordArray} The data after processing.
3612
+	         *
3613
+	         * @example
3614
+	         *
3615
+	         *     var encrypted = cipher.process('data');
3616
+	         *     var encrypted = cipher.process(wordArray);
3617
+	         */
3618
+	        process: function (dataUpdate) {
3619
+	            // Append
3620
+	            this._append(dataUpdate);
3621
+
3622
+	            // Process available blocks
3623
+	            return this._process();
3624
+	        },
3625
+
3626
+	        /**
3627
+	         * Finalizes the encryption or decryption process.
3628
+	         * Note that the finalize operation is effectively a destructive, read-once operation.
3629
+	         *
3630
+	         * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
3631
+	         *
3632
+	         * @return {WordArray} The data after final processing.
3633
+	         *
3634
+	         * @example
3635
+	         *
3636
+	         *     var encrypted = cipher.finalize();
3637
+	         *     var encrypted = cipher.finalize('data');
3638
+	         *     var encrypted = cipher.finalize(wordArray);
3639
+	         */
3640
+	        finalize: function (dataUpdate) {
3641
+	            // Final data update
3642
+	            if (dataUpdate) {
3643
+	                this._append(dataUpdate);
3644
+	            }
3645
+
3646
+	            // Perform concrete-cipher logic
3647
+	            var finalProcessedData = this._doFinalize();
3648
+
3649
+	            return finalProcessedData;
3650
+	        },
3651
+
3652
+	        keySize: 128/32,
3653
+
3654
+	        ivSize: 128/32,
3655
+
3656
+	        _ENC_XFORM_MODE: 1,
3657
+
3658
+	        _DEC_XFORM_MODE: 2,
3659
+
3660
+	        /**
3661
+	         * Creates shortcut functions to a cipher's object interface.
3662
+	         *
3663
+	         * @param {Cipher} cipher The cipher to create a helper for.
3664
+	         *
3665
+	         * @return {Object} An object with encrypt and decrypt shortcut functions.
3666
+	         *
3667
+	         * @static
3668
+	         *
3669
+	         * @example
3670
+	         *
3671
+	         *     var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
3672
+	         */
3673
+	        _createHelper: (function () {
3674
+	            function selectCipherStrategy(key) {
3675
+	                if (typeof key == 'string') {
3676
+	                    return PasswordBasedCipher;
3677
+	                } else {
3678
+	                    return SerializableCipher;
3679
+	                }
3680
+	            }
3681
+
3682
+	            return function (cipher) {
3683
+	                return {
3684
+	                    encrypt: function (message, key, cfg) {
3685
+	                        return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
3686
+	                    },
3687
+
3688
+	                    decrypt: function (ciphertext, key, cfg) {
3689
+	                        return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
3690
+	                    }
3691
+	                };
3692
+	            };
3693
+	        }())
3694
+	    });
3695
+
3696
+	    /**
3697
+	     * Abstract base stream cipher template.
3698
+	     *
3699
+	     * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
3700
+	     */
3701
+	    var StreamCipher = C_lib.StreamCipher = Cipher.extend({
3702
+	        _doFinalize: function () {
3703
+	            // Process partial blocks
3704
+	            var finalProcessedBlocks = this._process(!!'flush');
3705
+
3706
+	            return finalProcessedBlocks;
3707
+	        },
3708
+
3709
+	        blockSize: 1
3710
+	    });
3711
+
3712
+	    /**
3713
+	     * Mode namespace.
3714
+	     */
3715
+	    var C_mode = C.mode = {};
3716
+
3717
+	    /**
3718
+	     * Abstract base block cipher mode template.
3719
+	     */
3720
+	    var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
3721
+	        /**
3722
+	         * Creates this mode for encryption.
3723
+	         *
3724
+	         * @param {Cipher} cipher A block cipher instance.
3725
+	         * @param {Array} iv The IV words.
3726
+	         *
3727
+	         * @static
3728
+	         *
3729
+	         * @example
3730
+	         *
3731
+	         *     var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
3732
+	         */
3733
+	        createEncryptor: function (cipher, iv) {
3734
+	            return this.Encryptor.create(cipher, iv);
3735
+	        },
3736
+
3737
+	        /**
3738
+	         * Creates this mode for decryption.
3739
+	         *
3740
+	         * @param {Cipher} cipher A block cipher instance.
3741
+	         * @param {Array} iv The IV words.
3742
+	         *
3743
+	         * @static
3744
+	         *
3745
+	         * @example
3746
+	         *
3747
+	         *     var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
3748
+	         */
3749
+	        createDecryptor: function (cipher, iv) {
3750
+	            return this.Decryptor.create(cipher, iv);
3751
+	        },
3752
+
3753
+	        /**
3754
+	         * Initializes a newly created mode.
3755
+	         *
3756
+	         * @param {Cipher} cipher A block cipher instance.
3757
+	         * @param {Array} iv The IV words.
3758
+	         *
3759
+	         * @example
3760
+	         *
3761
+	         *     var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
3762
+	         */
3763
+	        init: function (cipher, iv) {
3764
+	            this._cipher = cipher;
3765
+	            this._iv = iv;
3766
+	        }
3767
+	    });
3768
+
3769
+	    /**
3770
+	     * Cipher Block Chaining mode.
3771
+	     */
3772
+	    var CBC = C_mode.CBC = (function () {
3773
+	        /**
3774
+	         * Abstract base CBC mode.
3775
+	         */
3776
+	        var CBC = BlockCipherMode.extend();
3777
+
3778
+	        /**
3779
+	         * CBC encryptor.
3780
+	         */
3781
+	        CBC.Encryptor = CBC.extend({
3782
+	            /**
3783
+	             * Processes the data block at offset.
3784
+	             *
3785
+	             * @param {Array} words The data words to operate on.
3786
+	             * @param {number} offset The offset where the block starts.
3787
+	             *
3788
+	             * @example
3789
+	             *
3790
+	             *     mode.processBlock(data.words, offset);
3791
+	             */
3792
+	            processBlock: function (words, offset) {
3793
+	                // Shortcuts
3794
+	                var cipher = this._cipher;
3795
+	                var blockSize = cipher.blockSize;
3796
+
3797
+	                // XOR and encrypt
3798
+	                xorBlock.call(this, words, offset, blockSize);
3799
+	                cipher.encryptBlock(words, offset);
3800
+
3801
+	                // Remember this block to use with next block
3802
+	                this._prevBlock = words.slice(offset, offset + blockSize);
3803
+	            }
3804
+	        });
3805
+
3806
+	        /**
3807
+	         * CBC decryptor.
3808
+	         */
3809
+	        CBC.Decryptor = CBC.extend({
3810
+	            /**
3811
+	             * Processes the data block at offset.
3812
+	             *
3813
+	             * @param {Array} words The data words to operate on.
3814
+	             * @param {number} offset The offset where the block starts.
3815
+	             *
3816
+	             * @example
3817
+	             *
3818
+	             *     mode.processBlock(data.words, offset);
3819
+	             */
3820
+	            processBlock: function (words, offset) {
3821
+	                // Shortcuts
3822
+	                var cipher = this._cipher;
3823
+	                var blockSize = cipher.blockSize;
3824
+
3825
+	                // Remember this block to use with next block
3826
+	                var thisBlock = words.slice(offset, offset + blockSize);
3827
+
3828
+	                // Decrypt and XOR
3829
+	                cipher.decryptBlock(words, offset);
3830
+	                xorBlock.call(this, words, offset, blockSize);
3831
+
3832
+	                // This block becomes the previous block
3833
+	                this._prevBlock = thisBlock;
3834
+	            }
3835
+	        });
3836
+
3837
+	        function xorBlock(words, offset, blockSize) {
3838
+	            var block;
3839
+
3840
+	            // Shortcut
3841
+	            var iv = this._iv;
3842
+
3843
+	            // Choose mixing block
3844
+	            if (iv) {
3845
+	                block = iv;
3846
+
3847
+	                // Remove IV for subsequent blocks
3848
+	                this._iv = undefined;
3849
+	            } else {
3850
+	                block = this._prevBlock;
3851
+	            }
3852
+
3853
+	            // XOR blocks
3854
+	            for (var i = 0; i < blockSize; i++) {
3855
+	                words[offset + i] ^= block[i];
3856
+	            }
3857
+	        }
3858
+
3859
+	        return CBC;
3860
+	    }());
3861
+
3862
+	    /**
3863
+	     * Padding namespace.
3864
+	     */
3865
+	    var C_pad = C.pad = {};
3866
+
3867
+	    /**
3868
+	     * PKCS #5/7 padding strategy.
3869
+	     */
3870
+	    var Pkcs7 = C_pad.Pkcs7 = {
3871
+	        /**
3872
+	         * Pads data using the algorithm defined in PKCS #5/7.
3873
+	         *
3874
+	         * @param {WordArray} data The data to pad.
3875
+	         * @param {number} blockSize The multiple that the data should be padded to.
3876
+	         *
3877
+	         * @static
3878
+	         *
3879
+	         * @example
3880
+	         *
3881
+	         *     CryptoJS.pad.Pkcs7.pad(wordArray, 4);
3882
+	         */
3883
+	        pad: function (data, blockSize) {
3884
+	            // Shortcut
3885
+	            var blockSizeBytes = blockSize * 4;
3886
+
3887
+	            // Count padding bytes
3888
+	            var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
3889
+
3890
+	            // Create padding word
3891
+	            var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;
3892
+
3893
+	            // Create padding
3894
+	            var paddingWords = [];
3895
+	            for (var i = 0; i < nPaddingBytes; i += 4) {
3896
+	                paddingWords.push(paddingWord);
3897
+	            }
3898
+	            var padding = WordArray.create(paddingWords, nPaddingBytes);
3899
+
3900
+	            // Add padding
3901
+	            data.concat(padding);
3902
+	        },
3903
+
3904
+	        /**
3905
+	         * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
3906
+	         *
3907
+	         * @param {WordArray} data The data to unpad.
3908
+	         *
3909
+	         * @static
3910
+	         *
3911
+	         * @example
3912
+	         *
3913
+	         *     CryptoJS.pad.Pkcs7.unpad(wordArray);
3914
+	         */
3915
+	        unpad: function (data) {
3916
+	            // Get number of padding bytes from last byte
3917
+	            var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
3918
+
3919
+	            // Remove padding
3920
+	            data.sigBytes -= nPaddingBytes;
3921
+	        }
3922
+	    };
3923
+
3924
+	    /**
3925
+	     * Abstract base block cipher template.
3926
+	     *
3927
+	     * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
3928
+	     */
3929
+	    var BlockCipher = C_lib.BlockCipher = Cipher.extend({
3930
+	        /**
3931
+	         * Configuration options.
3932
+	         *
3933
+	         * @property {Mode} mode The block mode to use. Default: CBC
3934
+	         * @property {Padding} padding The padding strategy to use. Default: Pkcs7
3935
+	         */
3936
+	        cfg: Cipher.cfg.extend({
3937
+	            mode: CBC,
3938
+	            padding: Pkcs7
3939
+	        }),
3940
+
3941
+	        reset: function () {
3942
+	            var modeCreator;
3943
+
3944
+	            // Reset cipher
3945
+	            Cipher.reset.call(this);
3946
+
3947
+	            // Shortcuts
3948
+	            var cfg = this.cfg;
3949
+	            var iv = cfg.iv;
3950
+	            var mode = cfg.mode;
3951
+
3952
+	            // Reset block mode
3953
+	            if (this._xformMode == this._ENC_XFORM_MODE) {
3954
+	                modeCreator = mode.createEncryptor;
3955
+	            } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
3956
+	                modeCreator = mode.createDecryptor;
3957
+	                // Keep at least one block in the buffer for unpadding
3958
+	                this._minBufferSize = 1;
3959
+	            }
3960
+
3961
+	            if (this._mode && this._mode.__creator == modeCreator) {
3962
+	                this._mode.init(this, iv && iv.words);
3963
+	            } else {
3964
+	                this._mode = modeCreator.call(mode, this, iv && iv.words);
3965
+	                this._mode.__creator = modeCreator;
3966
+	            }
3967
+	        },
3968
+
3969
+	        _doProcessBlock: function (words, offset) {
3970
+	            this._mode.processBlock(words, offset);
3971
+	        },
3972
+
3973
+	        _doFinalize: function () {
3974
+	            var finalProcessedBlocks;
3975
+
3976
+	            // Shortcut
3977
+	            var padding = this.cfg.padding;
3978
+
3979
+	            // Finalize
3980
+	            if (this._xformMode == this._ENC_XFORM_MODE) {
3981
+	                // Pad data
3982
+	                padding.pad(this._data, this.blockSize);
3983
+
3984
+	                // Process final blocks
3985
+	                finalProcessedBlocks = this._process(!!'flush');
3986
+	            } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
3987
+	                // Process final blocks
3988
+	                finalProcessedBlocks = this._process(!!'flush');
3989
+
3990
+	                // Unpad data
3991
+	                padding.unpad(finalProcessedBlocks);
3992
+	            }
3993
+
3994
+	            return finalProcessedBlocks;
3995
+	        },
3996
+
3997
+	        blockSize: 128/32
3998
+	    });
3999
+
4000
+	    /**
4001
+	     * A collection of cipher parameters.
4002
+	     *
4003
+	     * @property {WordArray} ciphertext The raw ciphertext.
4004
+	     * @property {WordArray} key The key to this ciphertext.
4005
+	     * @property {WordArray} iv The IV used in the ciphering operation.
4006
+	     * @property {WordArray} salt The salt used with a key derivation function.
4007
+	     * @property {Cipher} algorithm The cipher algorithm.
4008
+	     * @property {Mode} mode The block mode used in the ciphering operation.
4009
+	     * @property {Padding} padding The padding scheme used in the ciphering operation.
4010
+	     * @property {number} blockSize The block size of the cipher.
4011
+	     * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.
4012
+	     */
4013
+	    var CipherParams = C_lib.CipherParams = Base.extend({
4014
+	        /**
4015
+	         * Initializes a newly created cipher params object.
4016
+	         *
4017
+	         * @param {Object} cipherParams An object with any of the possible cipher parameters.
4018
+	         *
4019
+	         * @example
4020
+	         *
4021
+	         *     var cipherParams = CryptoJS.lib.CipherParams.create({
4022
+	         *         ciphertext: ciphertextWordArray,
4023
+	         *         key: keyWordArray,
4024
+	         *         iv: ivWordArray,
4025
+	         *         salt: saltWordArray,
4026
+	         *         algorithm: CryptoJS.algo.AES,
4027
+	         *         mode: CryptoJS.mode.CBC,
4028
+	         *         padding: CryptoJS.pad.PKCS7,
4029
+	         *         blockSize: 4,
4030
+	         *         formatter: CryptoJS.format.OpenSSL
4031
+	         *     });
4032
+	         */
4033
+	        init: function (cipherParams) {
4034
+	            this.mixIn(cipherParams);
4035
+	        },
4036
+
4037
+	        /**
4038
+	         * Converts this cipher params object to a string.
4039
+	         *
4040
+	         * @param {Format} formatter (Optional) The formatting strategy to use.
4041
+	         *
4042
+	         * @return {string} The stringified cipher params.
4043
+	         *
4044
+	         * @throws Error If neither the formatter nor the default formatter is set.
4045
+	         *
4046
+	         * @example
4047
+	         *
4048
+	         *     var string = cipherParams + '';
4049
+	         *     var string = cipherParams.toString();
4050
+	         *     var string = cipherParams.toString(CryptoJS.format.OpenSSL);
4051
+	         */
4052
+	        toString: function (formatter) {
4053
+	            return (formatter || this.formatter).stringify(this);
4054
+	        }
4055
+	    });
4056
+
4057
+	    /**
4058
+	     * Format namespace.
4059
+	     */
4060
+	    var C_format = C.format = {};
4061
+
4062
+	    /**
4063
+	     * OpenSSL formatting strategy.
4064
+	     */
4065
+	    var OpenSSLFormatter = C_format.OpenSSL = {
4066
+	        /**
4067
+	         * Converts a cipher params object to an OpenSSL-compatible string.
4068
+	         *
4069
+	         * @param {CipherParams} cipherParams The cipher params object.
4070
+	         *
4071
+	         * @return {string} The OpenSSL-compatible string.
4072
+	         *
4073
+	         * @static
4074
+	         *
4075
+	         * @example
4076
+	         *
4077
+	         *     var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
4078
+	         */
4079
+	        stringify: function (cipherParams) {
4080
+	            var wordArray;
4081
+
4082
+	            // Shortcuts
4083
+	            var ciphertext = cipherParams.ciphertext;
4084
+	            var salt = cipherParams.salt;
4085
+
4086
+	            // Format
4087
+	            if (salt) {
4088
+	                wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);
4089
+	            } else {
4090
+	                wordArray = ciphertext;
4091
+	            }
4092
+
4093
+	            return wordArray.toString(Base64);
4094
+	        },
4095
+
4096
+	        /**
4097
+	         * Converts an OpenSSL-compatible string to a cipher params object.
4098
+	         *
4099
+	         * @param {string} openSSLStr The OpenSSL-compatible string.
4100
+	         *
4101
+	         * @return {CipherParams} The cipher params object.
4102
+	         *
4103
+	         * @static
4104
+	         *
4105
+	         * @example
4106
+	         *
4107
+	         *     var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
4108
+	         */
4109
+	        parse: function (openSSLStr) {
4110
+	            var salt;
4111
+
4112
+	            // Parse base64
4113
+	            var ciphertext = Base64.parse(openSSLStr);
4114
+
4115
+	            // Shortcut
4116
+	            var ciphertextWords = ciphertext.words;
4117
+
4118
+	            // Test for salt
4119
+	            if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {
4120
+	                // Extract salt
4121
+	                salt = WordArray.create(ciphertextWords.slice(2, 4));
4122
+
4123
+	                // Remove salt from ciphertext
4124
+	                ciphertextWords.splice(0, 4);
4125
+	                ciphertext.sigBytes -= 16;
4126
+	            }
4127
+
4128
+	            return CipherParams.create({ ciphertext: ciphertext, salt: salt });
4129
+	        }
4130
+	    };
4131
+
4132
+	    /**
4133
+	     * A cipher wrapper that returns ciphertext as a serializable cipher params object.
4134
+	     */
4135
+	    var SerializableCipher = C_lib.SerializableCipher = Base.extend({
4136
+	        /**
4137
+	         * Configuration options.
4138
+	         *
4139
+	         * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
4140
+	         */
4141
+	        cfg: Base.extend({
4142
+	            format: OpenSSLFormatter
4143
+	        }),
4144
+
4145
+	        /**
4146
+	         * Encrypts a message.
4147
+	         *
4148
+	         * @param {Cipher} cipher The cipher algorithm to use.
4149
+	         * @param {WordArray|string} message The message to encrypt.
4150
+	         * @param {WordArray} key The key.
4151
+	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
4152
+	         *
4153
+	         * @return {CipherParams} A cipher params object.
4154
+	         *
4155
+	         * @static
4156
+	         *
4157
+	         * @example
4158
+	         *
4159
+	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
4160
+	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
4161
+	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
4162
+	         */
4163
+	        encrypt: function (cipher, message, key, cfg) {
4164
+	            // Apply config defaults
4165
+	            cfg = this.cfg.extend(cfg);
4166
+
4167
+	            // Encrypt
4168
+	            var encryptor = cipher.createEncryptor(key, cfg);
4169
+	            var ciphertext = encryptor.finalize(message);
4170
+
4171
+	            // Shortcut
4172
+	            var cipherCfg = encryptor.cfg;
4173
+
4174
+	            // Create and return serializable cipher params
4175
+	            return CipherParams.create({
4176
+	                ciphertext: ciphertext,
4177
+	                key: key,
4178
+	                iv: cipherCfg.iv,
4179
+	                algorithm: cipher,
4180
+	                mode: cipherCfg.mode,
4181
+	                padding: cipherCfg.padding,
4182
+	                blockSize: cipher.blockSize,
4183
+	                formatter: cfg.format
4184
+	            });
4185
+	        },
4186
+
4187
+	        /**
4188
+	         * Decrypts serialized ciphertext.
4189
+	         *
4190
+	         * @param {Cipher} cipher The cipher algorithm to use.
4191
+	         * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
4192
+	         * @param {WordArray} key The key.
4193
+	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
4194
+	         *
4195
+	         * @return {WordArray} The plaintext.
4196
+	         *
4197
+	         * @static
4198
+	         *
4199
+	         * @example
4200
+	         *
4201
+	         *     var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
4202
+	         *     var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
4203
+	         */
4204
+	        decrypt: function (cipher, ciphertext, key, cfg) {
4205
+	            // Apply config defaults
4206
+	            cfg = this.cfg.extend(cfg);
4207
+
4208
+	            // Convert string to CipherParams
4209
+	            ciphertext = this._parse(ciphertext, cfg.format);
4210
+
4211
+	            // Decrypt
4212
+	            var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
4213
+
4214
+	            return plaintext;
4215
+	        },
4216
+
4217
+	        /**
4218
+	         * Converts serialized ciphertext to CipherParams,
4219
+	         * else assumed CipherParams already and returns ciphertext unchanged.
4220
+	         *
4221
+	         * @param {CipherParams|string} ciphertext The ciphertext.
4222
+	         * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
4223
+	         *
4224
+	         * @return {CipherParams} The unserialized ciphertext.
4225
+	         *
4226
+	         * @static
4227
+	         *
4228
+	         * @example
4229
+	         *
4230
+	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
4231
+	         */
4232
+	        _parse: function (ciphertext, format) {
4233
+	            if (typeof ciphertext == 'string') {
4234
+	                return format.parse(ciphertext, this);
4235
+	            } else {
4236
+	                return ciphertext;
4237
+	            }
4238
+	        }
4239
+	    });
4240
+
4241
+	    /**
4242
+	     * Key derivation function namespace.
4243
+	     */
4244
+	    var C_kdf = C.kdf = {};
4245
+
4246
+	    /**
4247
+	     * OpenSSL key derivation function.
4248
+	     */
4249
+	    var OpenSSLKdf = C_kdf.OpenSSL = {
4250
+	        /**
4251
+	         * Derives a key and IV from a password.
4252
+	         *
4253
+	         * @param {string} password The password to derive from.
4254
+	         * @param {number} keySize The size in words of the key to generate.
4255
+	         * @param {number} ivSize The size in words of the IV to generate.
4256
+	         * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
4257
+	         *
4258
+	         * @return {CipherParams} A cipher params object with the key, IV, and salt.
4259
+	         *
4260
+	         * @static
4261
+	         *
4262
+	         * @example
4263
+	         *
4264
+	         *     var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
4265
+	         *     var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
4266
+	         */
4267
+	        execute: function (password, keySize, ivSize, salt) {
4268
+	            // Generate random salt
4269
+	            if (!salt) {
4270
+	                salt = WordArray.random(64/8);
4271
+	            }
4272
+
4273
+	            // Derive key and IV
4274
+	            var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
4275
+
4276
+	            // Separate key and IV
4277
+	            var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
4278
+	            key.sigBytes = keySize * 4;
4279
+
4280
+	            // Return params
4281
+	            return CipherParams.create({ key: key, iv: iv, salt: salt });
4282
+	        }
4283
+	    };
4284
+
4285
+	    /**
4286
+	     * A serializable cipher wrapper that derives the key from a password,
4287
+	     * and returns ciphertext as a serializable cipher params object.
4288
+	     */
4289
+	    var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
4290
+	        /**
4291
+	         * Configuration options.
4292
+	         *
4293
+	         * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
4294
+	         */
4295
+	        cfg: SerializableCipher.cfg.extend({
4296
+	            kdf: OpenSSLKdf
4297
+	        }),
4298
+
4299
+	        /**
4300
+	         * Encrypts a message using a password.
4301
+	         *
4302
+	         * @param {Cipher} cipher The cipher algorithm to use.
4303
+	         * @param {WordArray|string} message The message to encrypt.
4304
+	         * @param {string} password The password.
4305
+	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
4306
+	         *
4307
+	         * @return {CipherParams} A cipher params object.
4308
+	         *
4309
+	         * @static
4310
+	         *
4311
+	         * @example
4312
+	         *
4313
+	         *     var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
4314
+	         *     var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
4315
+	         */
4316
+	        encrypt: function (cipher, message, password, cfg) {
4317
+	            // Apply config defaults
4318
+	            cfg = this.cfg.extend(cfg);
4319
+
4320
+	            // Derive key and other params
4321
+	            var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
4322
+
4323
+	            // Add IV to config
4324
+	            cfg.iv = derivedParams.iv;
4325
+
4326
+	            // Encrypt
4327
+	            var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
4328
+
4329
+	            // Mix in derived params
4330
+	            ciphertext.mixIn(derivedParams);
4331
+
4332
+	            return ciphertext;
4333
+	        },
4334
+
4335
+	        /**
4336
+	         * Decrypts serialized ciphertext using a password.
4337
+	         *
4338
+	         * @param {Cipher} cipher The cipher algorithm to use.
4339
+	         * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
4340
+	         * @param {string} password The password.
4341
+	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
4342
+	         *
4343
+	         * @return {WordArray} The plaintext.
4344
+	         *
4345
+	         * @static
4346
+	         *
4347
+	         * @example
4348
+	         *
4349
+	         *     var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
4350
+	         *     var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
4351
+	         */
4352
+	        decrypt: function (cipher, ciphertext, password, cfg) {
4353
+	            // Apply config defaults
4354
+	            cfg = this.cfg.extend(cfg);
4355
+
4356
+	            // Convert string to CipherParams
4357
+	            ciphertext = this._parse(ciphertext, cfg.format);
4358
+
4359
+	            // Derive key and other params
4360
+	            var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
4361
+
4362
+	            // Add IV to config
4363
+	            cfg.iv = derivedParams.iv;
4364
+
4365
+	            // Decrypt
4366
+	            var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
4367
+
4368
+	            return plaintext;
4369
+	        }
4370
+	    });
4371
+	}());
4372
+
4373
+
4374
+	/**
4375
+	 * Cipher Feedback block mode.
4376
+	 */
4377
+	CryptoJS.mode.CFB = (function () {
4378
+	    var CFB = CryptoJS.lib.BlockCipherMode.extend();
4379
+
4380
+	    CFB.Encryptor = CFB.extend({
4381
+	        processBlock: function (words, offset) {
4382
+	            // Shortcuts
4383
+	            var cipher = this._cipher;
4384
+	            var blockSize = cipher.blockSize;
4385
+
4386
+	            generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
4387
+
4388
+	            // Remember this block to use with next block
4389
+	            this._prevBlock = words.slice(offset, offset + blockSize);
4390
+	        }
4391
+	    });
4392
+
4393
+	    CFB.Decryptor = CFB.extend({
4394
+	        processBlock: function (words, offset) {
4395
+	            // Shortcuts
4396
+	            var cipher = this._cipher;
4397
+	            var blockSize = cipher.blockSize;
4398
+
4399
+	            // Remember this block to use with next block
4400
+	            var thisBlock = words.slice(offset, offset + blockSize);
4401
+
4402
+	            generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
4403
+
4404
+	            // This block becomes the previous block
4405
+	            this._prevBlock = thisBlock;
4406
+	        }
4407
+	    });
4408
+
4409
+	    function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
4410
+	        var keystream;
4411
+
4412
+	        // Shortcut
4413
+	        var iv = this._iv;
4414
+
4415
+	        // Generate keystream
4416
+	        if (iv) {
4417
+	            keystream = iv.slice(0);
4418
+
4419
+	            // Remove IV for subsequent blocks
4420
+	            this._iv = undefined;
4421
+	        } else {
4422
+	            keystream = this._prevBlock;
4423
+	        }
4424
+	        cipher.encryptBlock(keystream, 0);
4425
+
4426
+	        // Encrypt
4427
+	        for (var i = 0; i < blockSize; i++) {
4428
+	            words[offset + i] ^= keystream[i];
4429
+	        }
4430
+	    }
4431
+
4432
+	    return CFB;
4433
+	}());
4434
+
4435
+
4436
+	/**
4437
+	 * Counter block mode.
4438
+	 */
4439
+	CryptoJS.mode.CTR = (function () {
4440
+	    var CTR = CryptoJS.lib.BlockCipherMode.extend();
4441
+
4442
+	    var Encryptor = CTR.Encryptor = CTR.extend({
4443
+	        processBlock: function (words, offset) {
4444
+	            // Shortcuts
4445
+	            var cipher = this._cipher
4446
+	            var blockSize = cipher.blockSize;
4447
+	            var iv = this._iv;
4448
+	            var counter = this._counter;
4449
+
4450
+	            // Generate keystream
4451
+	            if (iv) {
4452
+	                counter = this._counter = iv.slice(0);
4453
+
4454
+	                // Remove IV for subsequent blocks
4455
+	                this._iv = undefined;
4456
+	            }
4457
+	            var keystream = counter.slice(0);
4458
+	            cipher.encryptBlock(keystream, 0);
4459
+
4460
+	            // Increment counter
4461
+	            counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0
4462
+
4463
+	            // Encrypt
4464
+	            for (var i = 0; i < blockSize; i++) {
4465
+	                words[offset + i] ^= keystream[i];
4466
+	            }
4467
+	        }
4468
+	    });
4469
+
4470
+	    CTR.Decryptor = Encryptor;
4471
+
4472
+	    return CTR;
4473
+	}());
4474
+
4475
+
4476
+	/** @preserve
4477
+	 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
4478
+	 * derived from CryptoJS.mode.CTR
4479
+	 * Jan Hruby jhruby.web@gmail.com
4480
+	 */
4481
+	CryptoJS.mode.CTRGladman = (function () {
4482
+	    var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
4483
+
4484
+		function incWord(word)
4485
+		{
4486
+			if (((word >> 24) & 0xff) === 0xff) { //overflow
4487
+			var b1 = (word >> 16)&0xff;
4488
+			var b2 = (word >> 8)&0xff;
4489
+			var b3 = word & 0xff;
4490
+
4491
+			if (b1 === 0xff) // overflow b1
4492
+			{
4493
+			b1 = 0;
4494
+			if (b2 === 0xff)
4495
+			{
4496
+				b2 = 0;
4497
+				if (b3 === 0xff)
4498
+				{
4499
+					b3 = 0;
4500
+				}
4501
+				else
4502
+				{
4503
+					++b3;
4504
+				}
4505
+			}
4506
+			else
4507
+			{
4508
+				++b2;
4509
+			}
4510
+			}
4511
+			else
4512
+			{
4513
+			++b1;
4514
+			}
4515
+
4516
+			word = 0;
4517
+			word += (b1 << 16);
4518
+			word += (b2 << 8);
4519
+			word += b3;
4520
+			}
4521
+			else
4522
+			{
4523
+			word += (0x01 << 24);
4524
+			}
4525
+			return word;
4526
+		}
4527
+
4528
+		function incCounter(counter)
4529
+		{
4530
+			if ((counter[0] = incWord(counter[0])) === 0)
4531
+			{
4532
+				// encr_data in fileenc.c from  Dr Brian Gladman's counts only with DWORD j < 8
4533
+				counter[1] = incWord(counter[1]);
4534
+			}
4535
+			return counter;
4536
+		}
4537
+
4538
+	    var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
4539
+	        processBlock: function (words, offset) {
4540
+	            // Shortcuts
4541
+	            var cipher = this._cipher
4542
+	            var blockSize = cipher.blockSize;
4543
+	            var iv = this._iv;
4544
+	            var counter = this._counter;
4545
+
4546
+	            // Generate keystream
4547
+	            if (iv) {
4548
+	                counter = this._counter = iv.slice(0);
4549
+
4550
+	                // Remove IV for subsequent blocks
4551
+	                this._iv = undefined;
4552
+	            }
4553
+
4554
+				incCounter(counter);
4555
+
4556
+				var keystream = counter.slice(0);
4557
+	            cipher.encryptBlock(keystream, 0);
4558
+
4559
+	            // Encrypt
4560
+	            for (var i = 0; i < blockSize; i++) {
4561
+	                words[offset + i] ^= keystream[i];
4562
+	            }
4563
+	        }
4564
+	    });
4565
+
4566
+	    CTRGladman.Decryptor = Encryptor;
4567
+
4568
+	    return CTRGladman;
4569
+	}());
4570
+
4571
+
4572
+
4573
+
4574
+	/**
4575
+	 * Output Feedback block mode.
4576
+	 */
4577
+	CryptoJS.mode.OFB = (function () {
4578
+	    var OFB = CryptoJS.lib.BlockCipherMode.extend();
4579
+
4580
+	    var Encryptor = OFB.Encryptor = OFB.extend({
4581
+	        processBlock: function (words, offset) {
4582
+	            // Shortcuts
4583
+	            var cipher = this._cipher
4584
+	            var blockSize = cipher.blockSize;
4585
+	            var iv = this._iv;
4586
+	            var keystream = this._keystream;
4587
+
4588
+	            // Generate keystream
4589
+	            if (iv) {
4590
+	                keystream = this._keystream = iv.slice(0);
4591
+
4592
+	                // Remove IV for subsequent blocks
4593
+	                this._iv = undefined;
4594
+	            }
4595
+	            cipher.encryptBlock(keystream, 0);
4596
+
4597
+	            // Encrypt
4598
+	            for (var i = 0; i < blockSize; i++) {
4599
+	                words[offset + i] ^= keystream[i];
4600
+	            }
4601
+	        }
4602
+	    });
4603
+
4604
+	    OFB.Decryptor = Encryptor;
4605
+
4606
+	    return OFB;
4607
+	}());
4608
+
4609
+
4610
+	/**
4611
+	 * Electronic Codebook block mode.
4612
+	 */
4613
+	CryptoJS.mode.ECB = (function () {
4614
+	    var ECB = CryptoJS.lib.BlockCipherMode.extend();
4615
+
4616
+	    ECB.Encryptor = ECB.extend({
4617
+	        processBlock: function (words, offset) {
4618
+	            this._cipher.encryptBlock(words, offset);
4619
+	        }
4620
+	    });
4621
+
4622
+	    ECB.Decryptor = ECB.extend({
4623
+	        processBlock: function (words, offset) {
4624
+	            this._cipher.decryptBlock(words, offset);
4625
+	        }
4626
+	    });
4627
+
4628
+	    return ECB;
4629
+	}());
4630
+
4631
+
4632
+	/**
4633
+	 * ANSI X.923 padding strategy.
4634
+	 */
4635
+	CryptoJS.pad.AnsiX923 = {
4636
+	    pad: function (data, blockSize) {
4637
+	        // Shortcuts
4638
+	        var dataSigBytes = data.sigBytes;
4639
+	        var blockSizeBytes = blockSize * 4;
4640
+
4641
+	        // Count padding bytes
4642
+	        var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
4643
+
4644
+	        // Compute last byte position
4645
+	        var lastBytePos = dataSigBytes + nPaddingBytes - 1;
4646
+
4647
+	        // Pad
4648
+	        data.clamp();
4649
+	        data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);
4650
+	        data.sigBytes += nPaddingBytes;
4651
+	    },
4652
+
4653
+	    unpad: function (data) {
4654
+	        // Get number of padding bytes from last byte
4655
+	        var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
4656
+
4657
+	        // Remove padding
4658
+	        data.sigBytes -= nPaddingBytes;
4659
+	    }
4660
+	};
4661
+
4662
+
4663
+	/**
4664
+	 * ISO 10126 padding strategy.
4665
+	 */
4666
+	CryptoJS.pad.Iso10126 = {
4667
+	    pad: function (data, blockSize) {
4668
+	        // Shortcut
4669
+	        var blockSizeBytes = blockSize * 4;
4670
+
4671
+	        // Count padding bytes
4672
+	        var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
4673
+
4674
+	        // Pad
4675
+	        data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).
4676
+	             concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
4677
+	    },
4678
+
4679
+	    unpad: function (data) {
4680
+	        // Get number of padding bytes from last byte
4681
+	        var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
4682
+
4683
+	        // Remove padding
4684
+	        data.sigBytes -= nPaddingBytes;
4685
+	    }
4686
+	};
4687
+
4688
+
4689
+	/**
4690
+	 * ISO/IEC 9797-1 Padding Method 2.
4691
+	 */
4692
+	CryptoJS.pad.Iso97971 = {
4693
+	    pad: function (data, blockSize) {
4694
+	        // Add 0x80 byte
4695
+	        data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));
4696
+
4697
+	        // Zero pad the rest
4698
+	        CryptoJS.pad.ZeroPadding.pad(data, blockSize);
4699
+	    },
4700
+
4701
+	    unpad: function (data) {
4702
+	        // Remove zero padding
4703
+	        CryptoJS.pad.ZeroPadding.unpad(data);
4704
+
4705
+	        // Remove one more byte -- the 0x80 byte
4706
+	        data.sigBytes--;
4707
+	    }
4708
+	};
4709
+
4710
+
4711
+	/**
4712
+	 * Zero padding strategy.
4713
+	 */
4714
+	CryptoJS.pad.ZeroPadding = {
4715
+	    pad: function (data, blockSize) {
4716
+	        // Shortcut
4717
+	        var blockSizeBytes = blockSize * 4;
4718
+
4719
+	        // Pad
4720
+	        data.clamp();
4721
+	        data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);
4722
+	    },
4723
+
4724
+	    unpad: function (data) {
4725
+	        // Shortcut
4726
+	        var dataWords = data.words;
4727
+
4728
+	        // Unpad
4729
+	        var i = data.sigBytes - 1;
4730
+	        for (var i = data.sigBytes - 1; i >= 0; i--) {
4731
+	            if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {
4732
+	                data.sigBytes = i + 1;
4733
+	                break;
4734
+	            }
4735
+	        }
4736
+	    }
4737
+	};
4738
+
4739
+
4740
+	/**
4741
+	 * A noop padding strategy.
4742
+	 */
4743
+	CryptoJS.pad.NoPadding = {
4744
+	    pad: function () {
4745
+	    },
4746
+
4747
+	    unpad: function () {
4748
+	    }
4749
+	};
4750
+
4751
+
4752
+	(function (undefined) {
4753
+	    // Shortcuts
4754
+	    var C = CryptoJS;
4755
+	    var C_lib = C.lib;
4756
+	    var CipherParams = C_lib.CipherParams;
4757
+	    var C_enc = C.enc;
4758
+	    var Hex = C_enc.Hex;
4759
+	    var C_format = C.format;
4760
+
4761
+	    var HexFormatter = C_format.Hex = {
4762
+	        /**
4763
+	         * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
4764
+	         *
4765
+	         * @param {CipherParams} cipherParams The cipher params object.
4766
+	         *
4767
+	         * @return {string} The hexadecimally encoded string.
4768
+	         *
4769
+	         * @static
4770
+	         *
4771
+	         * @example
4772
+	         *
4773
+	         *     var hexString = CryptoJS.format.Hex.stringify(cipherParams);
4774
+	         */
4775
+	        stringify: function (cipherParams) {
4776
+	            return cipherParams.ciphertext.toString(Hex);
4777
+	        },
4778
+
4779
+	        /**
4780
+	         * Converts a hexadecimally encoded ciphertext string to a cipher params object.
4781
+	         *
4782
+	         * @param {string} input The hexadecimally encoded string.
4783
+	         *
4784
+	         * @return {CipherParams} The cipher params object.
4785
+	         *
4786
+	         * @static
4787
+	         *
4788
+	         * @example
4789
+	         *
4790
+	         *     var cipherParams = CryptoJS.format.Hex.parse(hexString);
4791
+	         */
4792
+	        parse: function (input) {
4793
+	            var ciphertext = Hex.parse(input);
4794
+	            return CipherParams.create({ ciphertext: ciphertext });
4795
+	        }
4796
+	    };
4797
+	}());
4798
+
4799
+
4800
+	(function () {
4801
+	    // Shortcuts
4802
+	    var C = CryptoJS;
4803
+	    var C_lib = C.lib;
4804
+	    var BlockCipher = C_lib.BlockCipher;
4805
+	    var C_algo = C.algo;
4806
+
4807
+	    // Lookup tables
4808
+	    var SBOX = [];
4809
+	    var INV_SBOX = [];
4810
+	    var SUB_MIX_0 = [];
4811
+	    var SUB_MIX_1 = [];
4812
+	    var SUB_MIX_2 = [];
4813
+	    var SUB_MIX_3 = [];
4814
+	    var INV_SUB_MIX_0 = [];
4815
+	    var INV_SUB_MIX_1 = [];
4816
+	    var INV_SUB_MIX_2 = [];
4817
+	    var INV_SUB_MIX_3 = [];
4818
+
4819
+	    // Compute lookup tables
4820
+	    (function () {
4821
+	        // Compute double table
4822
+	        var d = [];
4823
+	        for (var i = 0; i < 256; i++) {
4824
+	            if (i < 128) {
4825
+	                d[i] = i << 1;
4826
+	            } else {
4827
+	                d[i] = (i << 1) ^ 0x11b;
4828
+	            }
4829
+	        }
4830
+
4831
+	        // Walk GF(2^8)
4832
+	        var x = 0;
4833
+	        var xi = 0;
4834
+	        for (var i = 0; i < 256; i++) {
4835
+	            // Compute sbox
4836
+	            var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);
4837
+	            sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;
4838
+	            SBOX[x] = sx;
4839
+	            INV_SBOX[sx] = x;
4840
+
4841
+	            // Compute multiplication
4842
+	            var x2 = d[x];
4843
+	            var x4 = d[x2];
4844
+	            var x8 = d[x4];
4845
+
4846
+	            // Compute sub bytes, mix columns tables
4847
+	            var t = (d[sx] * 0x101) ^ (sx * 0x1010100);
4848
+	            SUB_MIX_0[x] = (t << 24) | (t >>> 8);
4849
+	            SUB_MIX_1[x] = (t << 16) | (t >>> 16);
4850
+	            SUB_MIX_2[x] = (t << 8)  | (t >>> 24);
4851
+	            SUB_MIX_3[x] = t;
4852
+
4853
+	            // Compute inv sub bytes, inv mix columns tables
4854
+	            var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);
4855
+	            INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);
4856
+	            INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);
4857
+	            INV_SUB_MIX_2[sx] = (t << 8)  | (t >>> 24);
4858
+	            INV_SUB_MIX_3[sx] = t;
4859
+
4860
+	            // Compute next counter
4861
+	            if (!x) {
4862
+	                x = xi = 1;
4863
+	            } else {
4864
+	                x = x2 ^ d[d[d[x8 ^ x2]]];
4865
+	                xi ^= d[d[xi]];
4866
+	            }
4867
+	        }
4868
+	    }());
4869
+
4870
+	    // Precomputed Rcon lookup
4871
+	    var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
4872
+
4873
+	    /**
4874
+	     * AES block cipher algorithm.
4875
+	     */
4876
+	    var AES = C_algo.AES = BlockCipher.extend({
4877
+	        _doReset: function () {
4878
+	            var t;
4879
+
4880
+	            // Skip reset of nRounds has been set before and key did not change
4881
+	            if (this._nRounds && this._keyPriorReset === this._key) {
4882
+	                return;
4883
+	            }
4884
+
4885
+	            // Shortcuts
4886
+	            var key = this._keyPriorReset = this._key;
4887
+	            var keyWords = key.words;
4888
+	            var keySize = key.sigBytes / 4;
4889
+
4890
+	            // Compute number of rounds
4891
+	            var nRounds = this._nRounds = keySize + 6;
4892
+
4893
+	            // Compute number of key schedule rows
4894
+	            var ksRows = (nRounds + 1) * 4;
4895
+
4896
+	            // Compute key schedule
4897
+	            var keySchedule = this._keySchedule = [];
4898
+	            for (var ksRow = 0; ksRow < ksRows; ksRow++) {
4899
+	                if (ksRow < keySize) {
4900
+	                    keySchedule[ksRow] = keyWords[ksRow];
4901
+	                } else {
4902
+	                    t = keySchedule[ksRow - 1];
4903
+
4904
+	                    if (!(ksRow % keySize)) {
4905
+	                        // Rot word
4906
+	                        t = (t << 8) | (t >>> 24);
4907
+
4908
+	                        // Sub word
4909
+	                        t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
4910
+
4911
+	                        // Mix Rcon
4912
+	                        t ^= RCON[(ksRow / keySize) | 0] << 24;
4913
+	                    } else if (keySize > 6 && ksRow % keySize == 4) {
4914
+	                        // Sub word
4915
+	                        t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
4916
+	                    }
4917
+
4918
+	                    keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
4919
+	                }
4920
+	            }
4921
+
4922
+	            // Compute inv key schedule
4923
+	            var invKeySchedule = this._invKeySchedule = [];
4924
+	            for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
4925
+	                var ksRow = ksRows - invKsRow;
4926
+
4927
+	                if (invKsRow % 4) {
4928
+	                    var t = keySchedule[ksRow];
4929
+	                } else {
4930
+	                    var t = keySchedule[ksRow - 4];
4931
+	                }
4932
+
4933
+	                if (invKsRow < 4 || ksRow <= 4) {
4934
+	                    invKeySchedule[invKsRow] = t;
4935
+	                } else {
4936
+	                    invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
4937
+	                                               INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
4938
+	                }
4939
+	            }
4940
+	        },
4941
+
4942
+	        encryptBlock: function (M, offset) {
4943
+	            this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
4944
+	        },
4945
+
4946
+	        decryptBlock: function (M, offset) {
4947
+	            // Swap 2nd and 4th rows
4948
+	            var t = M[offset + 1];
4949
+	            M[offset + 1] = M[offset + 3];
4950
+	            M[offset + 3] = t;
4951
+
4952
+	            this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
4953
+
4954
+	            // Inv swap 2nd and 4th rows
4955
+	            var t = M[offset + 1];
4956
+	            M[offset + 1] = M[offset + 3];
4957
+	            M[offset + 3] = t;
4958
+	        },
4959
+
4960
+	        _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
4961
+	            // Shortcut
4962
+	            var nRounds = this._nRounds;
4963
+
4964
+	            // Get input, add round key
4965
+	            var s0 = M[offset]     ^ keySchedule[0];
4966
+	            var s1 = M[offset + 1] ^ keySchedule[1];
4967
+	            var s2 = M[offset + 2] ^ keySchedule[2];
4968
+	            var s3 = M[offset + 3] ^ keySchedule[3];
4969
+
4970
+	            // Key schedule row counter
4971
+	            var ksRow = 4;
4972
+
4973
+	            // Rounds
4974
+	            for (var round = 1; round < nRounds; round++) {
4975
+	                // Shift rows, sub bytes, mix columns, add round key
4976
+	                var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
4977
+	                var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
4978
+	                var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
4979
+	                var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
4980
+
4981
+	                // Update state
4982
+	                s0 = t0;
4983
+	                s1 = t1;
4984
+	                s2 = t2;
4985
+	                s3 = t3;
4986
+	            }
4987
+
4988
+	            // Shift rows, sub bytes, add round key
4989
+	            var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
4990
+	            var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
4991
+	            var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
4992
+	            var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
4993
+
4994
+	            // Set output
4995
+	            M[offset]     = t0;
4996
+	            M[offset + 1] = t1;
4997
+	            M[offset + 2] = t2;
4998
+	            M[offset + 3] = t3;
4999
+	        },
5000
+
5001
+	        keySize: 256/32
5002
+	    });
5003
+
5004
+	    /**
5005
+	     * Shortcut functions to the cipher's object interface.
5006
+	     *
5007
+	     * @example
5008
+	     *
5009
+	     *     var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
5010
+	     *     var plaintext  = CryptoJS.AES.decrypt(ciphertext, key, cfg);
5011
+	     */
5012
+	    C.AES = BlockCipher._createHelper(AES);
5013
+	}());
5014
+
5015
+
5016
+	(function () {
5017
+	    // Shortcuts
5018
+	    var C = CryptoJS;
5019
+	    var C_lib = C.lib;
5020
+	    var WordArray = C_lib.WordArray;
5021
+	    var BlockCipher = C_lib.BlockCipher;
5022
+	    var C_algo = C.algo;
5023
+
5024
+	    // Permuted Choice 1 constants
5025
+	    var PC1 = [
5026
+	        57, 49, 41, 33, 25, 17, 9,  1,
5027
+	        58, 50, 42, 34, 26, 18, 10, 2,
5028
+	        59, 51, 43, 35, 27, 19, 11, 3,
5029
+	        60, 52, 44, 36, 63, 55, 47, 39,
5030
+	        31, 23, 15, 7,  62, 54, 46, 38,
5031
+	        30, 22, 14, 6,  61, 53, 45, 37,
5032
+	        29, 21, 13, 5,  28, 20, 12, 4
5033
+	    ];
5034
+
5035
+	    // Permuted Choice 2 constants
5036
+	    var PC2 = [
5037
+	        14, 17, 11, 24, 1,  5,
5038
+	        3,  28, 15, 6,  21, 10,
5039
+	        23, 19, 12, 4,  26, 8,
5040
+	        16, 7,  27, 20, 13, 2,
5041
+	        41, 52, 31, 37, 47, 55,
5042
+	        30, 40, 51, 45, 33, 48,
5043
+	        44, 49, 39, 56, 34, 53,
5044
+	        46, 42, 50, 36, 29, 32
5045
+	    ];
5046
+
5047
+	    // Cumulative bit shift constants
5048
+	    var BIT_SHIFTS = [1,  2,  4,  6,  8,  10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
5049
+
5050
+	    // SBOXes and round permutation constants
5051
+	    var SBOX_P = [
5052
+	        {
5053
+	            0x0: 0x808200,
5054
+	            0x10000000: 0x8000,
5055
+	            0x20000000: 0x808002,
5056
+	            0x30000000: 0x2,
5057
+	            0x40000000: 0x200,
5058
+	            0x50000000: 0x808202,
5059
+	            0x60000000: 0x800202,
5060
+	            0x70000000: 0x800000,
5061
+	            0x80000000: 0x202,
5062
+	            0x90000000: 0x800200,
5063
+	            0xa0000000: 0x8200,
5064
+	            0xb0000000: 0x808000,
5065
+	            0xc0000000: 0x8002,
5066
+	            0xd0000000: 0x800002,
5067
+	            0xe0000000: 0x0,
5068
+	            0xf0000000: 0x8202,
5069
+	            0x8000000: 0x0,
5070
+	            0x18000000: 0x808202,
5071
+	            0x28000000: 0x8202,
5072
+	            0x38000000: 0x8000,
5073
+	            0x48000000: 0x808200,
5074
+	            0x58000000: 0x200,
5075
+	            0x68000000: 0x808002,
5076
+	            0x78000000: 0x2,
5077
+	            0x88000000: 0x800200,
5078
+	            0x98000000: 0x8200,
5079
+	            0xa8000000: 0x808000,
5080
+	            0xb8000000: 0x800202,
5081
+	            0xc8000000: 0x800002,
5082
+	            0xd8000000: 0x8002,
5083
+	            0xe8000000: 0x202,
5084
+	            0xf8000000: 0x800000,
5085
+	            0x1: 0x8000,
5086
+	            0x10000001: 0x2,
5087
+	            0x20000001: 0x808200,
5088
+	            0x30000001: 0x800000,
5089
+	            0x40000001: 0x808002,
5090
+	            0x50000001: 0x8200,
5091
+	            0x60000001: 0x200,
5092
+	            0x70000001: 0x800202,
5093
+	            0x80000001: 0x808202,
5094
+	            0x90000001: 0x808000,
5095
+	            0xa0000001: 0x800002,
5096
+	            0xb0000001: 0x8202,
5097
+	            0xc0000001: 0x202,
5098
+	            0xd0000001: 0x800200,
5099
+	            0xe0000001: 0x8002,
5100
+	            0xf0000001: 0x0,
5101
+	            0x8000001: 0x808202,
5102
+	            0x18000001: 0x808000,
5103
+	            0x28000001: 0x800000,
5104
+	            0x38000001: 0x200,
5105
+	            0x48000001: 0x8000,
5106
+	            0x58000001: 0x800002,
5107
+	            0x68000001: 0x2,
5108
+	            0x78000001: 0x8202,
5109
+	            0x88000001: 0x8002,
5110
+	            0x98000001: 0x800202,
5111
+	            0xa8000001: 0x202,
5112
+	            0xb8000001: 0x808200,
5113
+	            0xc8000001: 0x800200,
5114
+	            0xd8000001: 0x0,
5115
+	            0xe8000001: 0x8200,
5116
+	            0xf8000001: 0x808002
5117
+	        },
5118
+	        {
5119
+	            0x0: 0x40084010,
5120
+	            0x1000000: 0x4000,
5121
+	            0x2000000: 0x80000,
5122
+	            0x3000000: 0x40080010,
5123
+	            0x4000000: 0x40000010,
5124
+	            0x5000000: 0x40084000,
5125
+	            0x6000000: 0x40004000,
5126
+	            0x7000000: 0x10,
5127
+	            0x8000000: 0x84000,
5128
+	            0x9000000: 0x40004010,
5129
+	            0xa000000: 0x40000000,
5130
+	            0xb000000: 0x84010,
5131
+	            0xc000000: 0x80010,
5132
+	            0xd000000: 0x0,
5133
+	            0xe000000: 0x4010,
5134
+	            0xf000000: 0x40080000,
5135
+	            0x800000: 0x40004000,
5136
+	            0x1800000: 0x84010,
5137
+	            0x2800000: 0x10,
5138
+	            0x3800000: 0x40004010,
5139
+	            0x4800000: 0x40084010,
5140
+	            0x5800000: 0x40000000,
5141
+	            0x6800000: 0x80000,
5142
+	            0x7800000: 0x40080010,
5143
+	            0x8800000: 0x80010,
5144
+	            0x9800000: 0x0,
5145
+	            0xa800000: 0x4000,
5146
+	            0xb800000: 0x40080000,
5147
+	            0xc800000: 0x40000010,
5148
+	            0xd800000: 0x84000,
5149
+	            0xe800000: 0x40084000,
5150
+	            0xf800000: 0x4010,
5151
+	            0x10000000: 0x0,
5152
+	            0x11000000: 0x40080010,
5153
+	            0x12000000: 0x40004010,
5154
+	            0x13000000: 0x40084000,
5155
+	            0x14000000: 0x40080000,
5156
+	            0x15000000: 0x10,
5157
+	            0x16000000: 0x84010,
5158
+	            0x17000000: 0x4000,
5159
+	            0x18000000: 0x4010,
5160
+	            0x19000000: 0x80000,
5161
+	            0x1a000000: 0x80010,
5162
+	            0x1b000000: 0x40000010,
5163
+	            0x1c000000: 0x84000,
5164
+	            0x1d000000: 0x40004000,
5165
+	            0x1e000000: 0x40000000,
5166
+	            0x1f000000: 0x40084010,
5167
+	            0x10800000: 0x84010,
5168
+	            0x11800000: 0x80000,
5169
+	            0x12800000: 0x40080000,
5170
+	            0x13800000: 0x4000,
5171
+	            0x14800000: 0x40004000,
5172
+	            0x15800000: 0x40084010,
5173
+	            0x16800000: 0x10,
5174
+	            0x17800000: 0x40000000,
5175
+	            0x18800000: 0x40084000,
5176
+	            0x19800000: 0x40000010,
5177
+	            0x1a800000: 0x40004010,
5178
+	            0x1b800000: 0x80010,
5179
+	            0x1c800000: 0x0,
5180
+	            0x1d800000: 0x4010,
5181
+	            0x1e800000: 0x40080010,
5182
+	            0x1f800000: 0x84000
5183
+	        },
5184
+	        {
5185
+	            0x0: 0x104,
5186
+	            0x100000: 0x0,
5187
+	            0x200000: 0x4000100,
5188
+	            0x300000: 0x10104,
5189
+	            0x400000: 0x10004,
5190
+	            0x500000: 0x4000004,
5191
+	            0x600000: 0x4010104,
5192
+	            0x700000: 0x4010000,
5193
+	            0x800000: 0x4000000,
5194
+	            0x900000: 0x4010100,
5195
+	            0xa00000: 0x10100,
5196
+	            0xb00000: 0x4010004,
5197
+	            0xc00000: 0x4000104,
5198
+	            0xd00000: 0x10000,
5199
+	            0xe00000: 0x4,
5200
+	            0xf00000: 0x100,
5201
+	            0x80000: 0x4010100,
5202
+	            0x180000: 0x4010004,
5203
+	            0x280000: 0x0,
5204
+	            0x380000: 0x4000100,
5205
+	            0x480000: 0x4000004,
5206
+	            0x580000: 0x10000,
5207
+	            0x680000: 0x10004,
5208
+	            0x780000: 0x104,
5209
+	            0x880000: 0x4,
5210
+	            0x980000: 0x100,
5211
+	            0xa80000: 0x4010000,
5212
+	            0xb80000: 0x10104,
5213
+	            0xc80000: 0x10100,
5214
+	            0xd80000: 0x4000104,
5215
+	            0xe80000: 0x4010104,
5216
+	            0xf80000: 0x4000000,
5217
+	            0x1000000: 0x4010100,
5218
+	            0x1100000: 0x10004,
5219
+	            0x1200000: 0x10000,
5220
+	            0x1300000: 0x4000100,
5221
+	            0x1400000: 0x100,
5222
+	            0x1500000: 0x4010104,
5223
+	            0x1600000: 0x4000004,
5224
+	            0x1700000: 0x0,
5225
+	            0x1800000: 0x4000104,
5226
+	            0x1900000: 0x4000000,
5227
+	            0x1a00000: 0x4,
5228
+	            0x1b00000: 0x10100,
5229
+	            0x1c00000: 0x4010000,
5230
+	            0x1d00000: 0x104,
5231
+	            0x1e00000: 0x10104,
5232
+	            0x1f00000: 0x4010004,
5233
+	            0x1080000: 0x4000000,
5234
+	            0x1180000: 0x104,
5235
+	            0x1280000: 0x4010100,
5236
+	            0x1380000: 0x0,
5237
+	            0x1480000: 0x10004,
5238
+	            0x1580000: 0x4000100,
5239
+	            0x1680000: 0x100,
5240
+	            0x1780000: 0x4010004,
5241
+	            0x1880000: 0x10000,
5242
+	            0x1980000: 0x4010104,
5243
+	            0x1a80000: 0x10104,
5244
+	            0x1b80000: 0x4000004,
5245
+	            0x1c80000: 0x4000104,
5246
+	            0x1d80000: 0x4010000,
5247
+	            0x1e80000: 0x4,
5248
+	            0x1f80000: 0x10100
5249
+	        },
5250
+	        {
5251
+	            0x0: 0x80401000,
5252
+	            0x10000: 0x80001040,
5253
+	            0x20000: 0x401040,
5254
+	            0x30000: 0x80400000,
5255
+	            0x40000: 0x0,
5256
+	            0x50000: 0x401000,
5257
+	            0x60000: 0x80000040,
5258
+	            0x70000: 0x400040,
5259
+	            0x80000: 0x80000000,
5260
+	            0x90000: 0x400000,
5261
+	            0xa0000: 0x40,
5262
+	            0xb0000: 0x80001000,
5263
+	            0xc0000: 0x80400040,
5264
+	            0xd0000: 0x1040,
5265
+	            0xe0000: 0x1000,
5266
+	            0xf0000: 0x80401040,
5267
+	            0x8000: 0x80001040,
5268
+	            0x18000: 0x40,
5269
+	            0x28000: 0x80400040,
5270
+	            0x38000: 0x80001000,
5271
+	            0x48000: 0x401000,
5272
+	            0x58000: 0x80401040,
5273
+	            0x68000: 0x0,
5274
+	            0x78000: 0x80400000,
5275
+	            0x88000: 0x1000,
5276
+	            0x98000: 0x80401000,
5277
+	            0xa8000: 0x400000,
5278
+	            0xb8000: 0x1040,
5279
+	            0xc8000: 0x80000000,
5280
+	            0xd8000: 0x400040,
5281
+	            0xe8000: 0x401040,
5282
+	            0xf8000: 0x80000040,
5283
+	            0x100000: 0x400040,
5284
+	            0x110000: 0x401000,
5285
+	            0x120000: 0x80000040,
5286
+	            0x130000: 0x0,
5287
+	            0x140000: 0x1040,
5288
+	            0x150000: 0x80400040,
5289
+	            0x160000: 0x80401000,
5290
+	            0x170000: 0x80001040,
5291
+	            0x180000: 0x80401040,
5292
+	            0x190000: 0x80000000,
5293
+	            0x1a0000: 0x80400000,
5294
+	            0x1b0000: 0x401040,
5295
+	            0x1c0000: 0x80001000,
5296
+	            0x1d0000: 0x400000,
5297
+	            0x1e0000: 0x40,
5298
+	            0x1f0000: 0x1000,
5299
+	            0x108000: 0x80400000,
5300
+	            0x118000: 0x80401040,
5301
+	            0x128000: 0x0,
5302
+	            0x138000: 0x401000,
5303
+	            0x148000: 0x400040,
5304
+	            0x158000: 0x80000000,
5305
+	            0x168000: 0x80001040,
5306
+	            0x178000: 0x40,
5307
+	            0x188000: 0x80000040,
5308
+	            0x198000: 0x1000,
5309
+	            0x1a8000: 0x80001000,
5310
+	            0x1b8000: 0x80400040,
5311
+	            0x1c8000: 0x1040,
5312
+	            0x1d8000: 0x80401000,
5313
+	            0x1e8000: 0x400000,
5314
+	            0x1f8000: 0x401040
5315
+	        },
5316
+	        {
5317
+	            0x0: 0x80,
5318
+	            0x1000: 0x1040000,
5319
+	            0x2000: 0x40000,
5320
+	            0x3000: 0x20000000,
5321
+	            0x4000: 0x20040080,
5322
+	            0x5000: 0x1000080,
5323
+	            0x6000: 0x21000080,
5324
+	            0x7000: 0x40080,
5325
+	            0x8000: 0x1000000,
5326
+	            0x9000: 0x20040000,
5327
+	            0xa000: 0x20000080,
5328
+	            0xb000: 0x21040080,
5329
+	            0xc000: 0x21040000,
5330
+	            0xd000: 0x0,
5331
+	            0xe000: 0x1040080,
5332
+	            0xf000: 0x21000000,
5333
+	            0x800: 0x1040080,
5334
+	            0x1800: 0x21000080,
5335
+	            0x2800: 0x80,
5336
+	            0x3800: 0x1040000,
5337
+	            0x4800: 0x40000,
5338
+	            0x5800: 0x20040080,
5339
+	            0x6800: 0x21040000,
5340
+	            0x7800: 0x20000000,
5341
+	            0x8800: 0x20040000,
5342
+	            0x9800: 0x0,
5343
+	            0xa800: 0x21040080,
5344
+	            0xb800: 0x1000080,
5345
+	            0xc800: 0x20000080,
5346
+	            0xd800: 0x21000000,
5347
+	            0xe800: 0x1000000,
5348
+	            0xf800: 0x40080,
5349
+	            0x10000: 0x40000,
5350
+	            0x11000: 0x80,
5351
+	            0x12000: 0x20000000,
5352
+	            0x13000: 0x21000080,
5353
+	            0x14000: 0x1000080,
5354
+	            0x15000: 0x21040000,
5355
+	            0x16000: 0x20040080,
5356
+	            0x17000: 0x1000000,
5357
+	            0x18000: 0x21040080,
5358
+	            0x19000: 0x21000000,
5359
+	            0x1a000: 0x1040000,
5360
+	            0x1b000: 0x20040000,
5361
+	            0x1c000: 0x40080,
5362
+	            0x1d000: 0x20000080,
5363
+	            0x1e000: 0x0,
5364
+	            0x1f000: 0x1040080,
5365
+	            0x10800: 0x21000080,
5366
+	            0x11800: 0x1000000,
5367
+	            0x12800: 0x1040000,
5368
+	            0x13800: 0x20040080,
5369
+	            0x14800: 0x20000000,
5370
+	            0x15800: 0x1040080,
5371
+	            0x16800: 0x80,
5372
+	            0x17800: 0x21040000,
5373
+	            0x18800: 0x40080,
5374
+	            0x19800: 0x21040080,
5375
+	            0x1a800: 0x0,
5376
+	            0x1b800: 0x21000000,
5377
+	            0x1c800: 0x1000080,
5378
+	            0x1d800: 0x40000,
5379
+	            0x1e800: 0x20040000,
5380
+	            0x1f800: 0x20000080
5381
+	        },
5382
+	        {
5383
+	            0x0: 0x10000008,
5384
+	            0x100: 0x2000,
5385
+	            0x200: 0x10200000,
5386
+	            0x300: 0x10202008,
5387
+	            0x400: 0x10002000,
5388
+	            0x500: 0x200000,
5389
+	            0x600: 0x200008,
5390
+	            0x700: 0x10000000,
5391
+	            0x800: 0x0,
5392
+	            0x900: 0x10002008,
5393
+	            0xa00: 0x202000,
5394
+	            0xb00: 0x8,
5395
+	            0xc00: 0x10200008,
5396
+	            0xd00: 0x202008,
5397
+	            0xe00: 0x2008,
5398
+	            0xf00: 0x10202000,
5399
+	            0x80: 0x10200000,
5400
+	            0x180: 0x10202008,
5401
+	            0x280: 0x8,
5402
+	            0x380: 0x200000,
5403
+	            0x480: 0x202008,
5404
+	            0x580: 0x10000008,
5405
+	            0x680: 0x10002000,
5406
+	            0x780: 0x2008,
5407
+	            0x880: 0x200008,
5408
+	            0x980: 0x2000,
5409
+	            0xa80: 0x10002008,
5410
+	            0xb80: 0x10200008,
5411
+	            0xc80: 0x0,
5412
+	            0xd80: 0x10202000,
5413
+	            0xe80: 0x202000,
5414
+	            0xf80: 0x10000000,
5415
+	            0x1000: 0x10002000,
5416
+	            0x1100: 0x10200008,
5417
+	            0x1200: 0x10202008,
5418
+	            0x1300: 0x2008,
5419
+	            0x1400: 0x200000,
5420
+	            0x1500: 0x10000000,
5421
+	            0x1600: 0x10000008,
5422
+	            0x1700: 0x202000,
5423
+	            0x1800: 0x202008,
5424
+	            0x1900: 0x0,
5425
+	            0x1a00: 0x8,
5426
+	            0x1b00: 0x10200000,
5427
+	            0x1c00: 0x2000,
5428
+	            0x1d00: 0x10002008,
5429
+	            0x1e00: 0x10202000,
5430
+	            0x1f00: 0x200008,
5431
+	            0x1080: 0x8,
5432
+	            0x1180: 0x202000,
5433
+	            0x1280: 0x200000,
5434
+	            0x1380: 0x10000008,
5435
+	            0x1480: 0x10002000,
5436
+	            0x1580: 0x2008,
5437
+	            0x1680: 0x10202008,
5438
+	            0x1780: 0x10200000,
5439
+	            0x1880: 0x10202000,
5440
+	            0x1980: 0x10200008,
5441
+	            0x1a80: 0x2000,
5442
+	            0x1b80: 0x202008,
5443
+	            0x1c80: 0x200008,
5444
+	            0x1d80: 0x0,
5445
+	            0x1e80: 0x10000000,
5446
+	            0x1f80: 0x10002008
5447
+	        },
5448
+	        {
5449
+	            0x0: 0x100000,
5450
+	            0x10: 0x2000401,
5451
+	            0x20: 0x400,
5452
+	            0x30: 0x100401,
5453
+	            0x40: 0x2100401,
5454
+	            0x50: 0x0,
5455
+	            0x60: 0x1,
5456
+	            0x70: 0x2100001,
5457
+	            0x80: 0x2000400,
5458
+	            0x90: 0x100001,
5459
+	            0xa0: 0x2000001,
5460
+	            0xb0: 0x2100400,
5461
+	            0xc0: 0x2100000,
5462
+	            0xd0: 0x401,
5463
+	            0xe0: 0x100400,
5464
+	            0xf0: 0x2000000,
5465
+	            0x8: 0x2100001,
5466
+	            0x18: 0x0,
5467
+	            0x28: 0x2000401,
5468
+	            0x38: 0x2100400,
5469
+	            0x48: 0x100000,
5470
+	            0x58: 0x2000001,
5471
+	            0x68: 0x2000000,
5472
+	            0x78: 0x401,
5473
+	            0x88: 0x100401,
5474
+	            0x98: 0x2000400,
5475
+	            0xa8: 0x2100000,
5476
+	            0xb8: 0x100001,
5477
+	            0xc8: 0x400,
5478
+	            0xd8: 0x2100401,
5479
+	            0xe8: 0x1,
5480
+	            0xf8: 0x100400,
5481
+	            0x100: 0x2000000,
5482
+	            0x110: 0x100000,
5483
+	            0x120: 0x2000401,
5484
+	            0x130: 0x2100001,
5485
+	            0x140: 0x100001,
5486
+	            0x150: 0x2000400,
5487
+	            0x160: 0x2100400,
5488
+	            0x170: 0x100401,
5489
+	            0x180: 0x401,
5490
+	            0x190: 0x2100401,
5491
+	            0x1a0: 0x100400,
5492
+	            0x1b0: 0x1,
5493
+	            0x1c0: 0x0,
5494
+	            0x1d0: 0x2100000,
5495
+	            0x1e0: 0x2000001,
5496
+	            0x1f0: 0x400,
5497
+	            0x108: 0x100400,
5498
+	            0x118: 0x2000401,
5499
+	            0x128: 0x2100001,
5500
+	            0x138: 0x1,
5501
+	            0x148: 0x2000000,
5502
+	            0x158: 0x100000,
5503
+	            0x168: 0x401,
5504
+	            0x178: 0x2100400,
5505
+	            0x188: 0x2000001,
5506
+	            0x198: 0x2100000,
5507
+	            0x1a8: 0x0,
5508
+	            0x1b8: 0x2100401,
5509
+	            0x1c8: 0x100401,
5510
+	            0x1d8: 0x400,
5511
+	            0x1e8: 0x2000400,
5512
+	            0x1f8: 0x100001
5513
+	        },
5514
+	        {
5515
+	            0x0: 0x8000820,
5516
+	            0x1: 0x20000,
5517
+	            0x2: 0x8000000,
5518
+	            0x3: 0x20,
5519
+	            0x4: 0x20020,
5520
+	            0x5: 0x8020820,
5521
+	            0x6: 0x8020800,
5522
+	            0x7: 0x800,
5523
+	            0x8: 0x8020000,
5524
+	            0x9: 0x8000800,
5525
+	            0xa: 0x20800,
5526
+	            0xb: 0x8020020,
5527
+	            0xc: 0x820,
5528
+	            0xd: 0x0,
5529
+	            0xe: 0x8000020,
5530
+	            0xf: 0x20820,
5531
+	            0x80000000: 0x800,
5532
+	            0x80000001: 0x8020820,
5533
+	            0x80000002: 0x8000820,
5534
+	            0x80000003: 0x8000000,
5535
+	            0x80000004: 0x8020000,
5536
+	            0x80000005: 0x20800,
5537
+	            0x80000006: 0x20820,
5538
+	            0x80000007: 0x20,
5539
+	            0x80000008: 0x8000020,
5540
+	            0x80000009: 0x820,
5541
+	            0x8000000a: 0x20020,
5542
+	            0x8000000b: 0x8020800,
5543
+	            0x8000000c: 0x0,
5544
+	            0x8000000d: 0x8020020,
5545
+	            0x8000000e: 0x8000800,
5546
+	            0x8000000f: 0x20000,
5547
+	            0x10: 0x20820,
5548
+	            0x11: 0x8020800,
5549
+	            0x12: 0x20,
5550
+	            0x13: 0x800,
5551
+	            0x14: 0x8000800,
5552
+	            0x15: 0x8000020,
5553
+	            0x16: 0x8020020,
5554
+	            0x17: 0x20000,
5555
+	            0x18: 0x0,
5556
+	            0x19: 0x20020,
5557
+	            0x1a: 0x8020000,
5558
+	            0x1b: 0x8000820,
5559
+	            0x1c: 0x8020820,
5560
+	            0x1d: 0x20800,
5561
+	            0x1e: 0x820,
5562
+	            0x1f: 0x8000000,
5563
+	            0x80000010: 0x20000,
5564
+	            0x80000011: 0x800,
5565
+	            0x80000012: 0x8020020,
5566
+	            0x80000013: 0x20820,
5567
+	            0x80000014: 0x20,
5568
+	            0x80000015: 0x8020000,
5569
+	            0x80000016: 0x8000000,
5570
+	            0x80000017: 0x8000820,
5571
+	            0x80000018: 0x8020820,
5572
+	            0x80000019: 0x8000020,
5573
+	            0x8000001a: 0x8000800,
5574
+	            0x8000001b: 0x0,
5575
+	            0x8000001c: 0x20800,
5576
+	            0x8000001d: 0x820,
5577
+	            0x8000001e: 0x20020,
5578
+	            0x8000001f: 0x8020800
5579
+	        }
5580
+	    ];
5581
+
5582
+	    // Masks that select the SBOX input
5583
+	    var SBOX_MASK = [
5584
+	        0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,
5585
+	        0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f
5586
+	    ];
5587
+
5588
+	    /**
5589
+	     * DES block cipher algorithm.
5590
+	     */
5591
+	    var DES = C_algo.DES = BlockCipher.extend({
5592
+	        _doReset: function () {
5593
+	            // Shortcuts
5594
+	            var key = this._key;
5595
+	            var keyWords = key.words;
5596
+
5597
+	            // Select 56 bits according to PC1
5598
+	            var keyBits = [];
5599
+	            for (var i = 0; i < 56; i++) {
5600
+	                var keyBitPos = PC1[i] - 1;
5601
+	                keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;
5602
+	            }
5603
+
5604
+	            // Assemble 16 subkeys
5605
+	            var subKeys = this._subKeys = [];
5606
+	            for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
5607
+	                // Create subkey
5608
+	                var subKey = subKeys[nSubKey] = [];
5609
+
5610
+	                // Shortcut
5611
+	                var bitShift = BIT_SHIFTS[nSubKey];
5612
+
5613
+	                // Select 48 bits according to PC2
5614
+	                for (var i = 0; i < 24; i++) {
5615
+	                    // Select from the left 28 key bits
5616
+	                    subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);
5617
+
5618
+	                    // Select from the right 28 key bits
5619
+	                    subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);
5620
+	                }
5621
+
5622
+	                // Since each subkey is applied to an expanded 32-bit input,
5623
+	                // the subkey can be broken into 8 values scaled to 32-bits,
5624
+	                // which allows the key to be used without expansion
5625
+	                subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);
5626
+	                for (var i = 1; i < 7; i++) {
5627
+	                    subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);
5628
+	                }
5629
+	                subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);
5630
+	            }
5631
+
5632
+	            // Compute inverse subkeys
5633
+	            var invSubKeys = this._invSubKeys = [];
5634
+	            for (var i = 0; i < 16; i++) {
5635
+	                invSubKeys[i] = subKeys[15 - i];
5636
+	            }
5637
+	        },
5638
+
5639
+	        encryptBlock: function (M, offset) {
5640
+	            this._doCryptBlock(M, offset, this._subKeys);
5641
+	        },
5642
+
5643
+	        decryptBlock: function (M, offset) {
5644
+	            this._doCryptBlock(M, offset, this._invSubKeys);
5645
+	        },
5646
+
5647
+	        _doCryptBlock: function (M, offset, subKeys) {
5648
+	            // Get input
5649
+	            this._lBlock = M[offset];
5650
+	            this._rBlock = M[offset + 1];
5651
+
5652
+	            // Initial permutation
5653
+	            exchangeLR.call(this, 4,  0x0f0f0f0f);
5654
+	            exchangeLR.call(this, 16, 0x0000ffff);
5655
+	            exchangeRL.call(this, 2,  0x33333333);
5656
+	            exchangeRL.call(this, 8,  0x00ff00ff);
5657
+	            exchangeLR.call(this, 1,  0x55555555);
5658
+
5659
+	            // Rounds
5660
+	            for (var round = 0; round < 16; round++) {
5661
+	                // Shortcuts
5662
+	                var subKey = subKeys[round];
5663
+	                var lBlock = this._lBlock;
5664
+	                var rBlock = this._rBlock;
5665
+
5666
+	                // Feistel function
5667
+	                var f = 0;
5668
+	                for (var i = 0; i < 8; i++) {
5669
+	                    f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
5670
+	                }
5671
+	                this._lBlock = rBlock;
5672
+	                this._rBlock = lBlock ^ f;
5673
+	            }
5674
+
5675
+	            // Undo swap from last round
5676
+	            var t = this._lBlock;
5677
+	            this._lBlock = this._rBlock;
5678
+	            this._rBlock = t;
5679
+
5680
+	            // Final permutation
5681
+	            exchangeLR.call(this, 1,  0x55555555);
5682
+	            exchangeRL.call(this, 8,  0x00ff00ff);
5683
+	            exchangeRL.call(this, 2,  0x33333333);
5684
+	            exchangeLR.call(this, 16, 0x0000ffff);
5685
+	            exchangeLR.call(this, 4,  0x0f0f0f0f);
5686
+
5687
+	            // Set output
5688
+	            M[offset] = this._lBlock;
5689
+	            M[offset + 1] = this._rBlock;
5690
+	        },
5691
+
5692
+	        keySize: 64/32,
5693
+
5694
+	        ivSize: 64/32,
5695
+
5696
+	        blockSize: 64/32
5697
+	    });
5698
+
5699
+	    // Swap bits across the left and right words
5700
+	    function exchangeLR(offset, mask) {
5701
+	        var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;
5702
+	        this._rBlock ^= t;
5703
+	        this._lBlock ^= t << offset;
5704
+	    }
5705
+
5706
+	    function exchangeRL(offset, mask) {
5707
+	        var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;
5708
+	        this._lBlock ^= t;
5709
+	        this._rBlock ^= t << offset;
5710
+	    }
5711
+
5712
+	    /**
5713
+	     * Shortcut functions to the cipher's object interface.
5714
+	     *
5715
+	     * @example
5716
+	     *
5717
+	     *     var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);
5718
+	     *     var plaintext  = CryptoJS.DES.decrypt(ciphertext, key, cfg);
5719
+	     */
5720
+	    C.DES = BlockCipher._createHelper(DES);
5721
+
5722
+	    /**
5723
+	     * Triple-DES block cipher algorithm.
5724
+	     */
5725
+	    var TripleDES = C_algo.TripleDES = BlockCipher.extend({
5726
+	        _doReset: function () {
5727
+	            // Shortcuts
5728
+	            var key = this._key;
5729
+	            var keyWords = key.words;
5730
+	            // Make sure the key length is valid (64, 128 or >= 192 bit)
5731
+	            if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
5732
+	                throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');
5733
+	            }
5734
+
5735
+	            // Extend the key according to the keying options defined in 3DES standard
5736
+	            var key1 = keyWords.slice(0, 2);
5737
+	            var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
5738
+	            var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);
5739
+
5740
+	            // Create DES instances
5741
+	            this._des1 = DES.createEncryptor(WordArray.create(key1));
5742
+	            this._des2 = DES.createEncryptor(WordArray.create(key2));
5743
+	            this._des3 = DES.createEncryptor(WordArray.create(key3));
5744
+	        },
5745
+
5746
+	        encryptBlock: function (M, offset) {
5747
+	            this._des1.encryptBlock(M, offset);
5748
+	            this._des2.decryptBlock(M, offset);
5749
+	            this._des3.encryptBlock(M, offset);
5750
+	        },
5751
+
5752
+	        decryptBlock: function (M, offset) {
5753
+	            this._des3.decryptBlock(M, offset);
5754
+	            this._des2.encryptBlock(M, offset);
5755
+	            this._des1.decryptBlock(M, offset);
5756
+	        },
5757
+
5758
+	        keySize: 192/32,
5759
+
5760
+	        ivSize: 64/32,
5761
+
5762
+	        blockSize: 64/32
5763
+	    });
5764
+
5765
+	    /**
5766
+	     * Shortcut functions to the cipher's object interface.
5767
+	     *
5768
+	     * @example
5769
+	     *
5770
+	     *     var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);
5771
+	     *     var plaintext  = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);
5772
+	     */
5773
+	    C.TripleDES = BlockCipher._createHelper(TripleDES);
5774
+	}());
5775
+
5776
+
5777
+	(function () {
5778
+	    // Shortcuts
5779
+	    var C = CryptoJS;
5780
+	    var C_lib = C.lib;
5781
+	    var StreamCipher = C_lib.StreamCipher;
5782
+	    var C_algo = C.algo;
5783
+
5784
+	    /**
5785
+	     * RC4 stream cipher algorithm.
5786
+	     */
5787
+	    var RC4 = C_algo.RC4 = StreamCipher.extend({
5788
+	        _doReset: function () {
5789
+	            // Shortcuts
5790
+	            var key = this._key;
5791
+	            var keyWords = key.words;
5792
+	            var keySigBytes = key.sigBytes;
5793
+
5794
+	            // Init sbox
5795
+	            var S = this._S = [];
5796
+	            for (var i = 0; i < 256; i++) {
5797
+	                S[i] = i;
5798
+	            }
5799
+
5800
+	            // Key setup
5801
+	            for (var i = 0, j = 0; i < 256; i++) {
5802
+	                var keyByteIndex = i % keySigBytes;
5803
+	                var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;
5804
+
5805
+	                j = (j + S[i] + keyByte) % 256;
5806
+
5807
+	                // Swap
5808
+	                var t = S[i];
5809
+	                S[i] = S[j];
5810
+	                S[j] = t;
5811
+	            }
5812
+
5813
+	            // Counters
5814
+	            this._i = this._j = 0;
5815
+	        },
5816
+
5817
+	        _doProcessBlock: function (M, offset) {
5818
+	            M[offset] ^= generateKeystreamWord.call(this);
5819
+	        },
5820
+
5821
+	        keySize: 256/32,
5822
+
5823
+	        ivSize: 0
5824
+	    });
5825
+
5826
+	    function generateKeystreamWord() {
5827
+	        // Shortcuts
5828
+	        var S = this._S;
5829
+	        var i = this._i;
5830
+	        var j = this._j;
5831
+
5832
+	        // Generate keystream word
5833
+	        var keystreamWord = 0;
5834
+	        for (var n = 0; n < 4; n++) {
5835
+	            i = (i + 1) % 256;
5836
+	            j = (j + S[i]) % 256;
5837
+
5838
+	            // Swap
5839
+	            var t = S[i];
5840
+	            S[i] = S[j];
5841
+	            S[j] = t;
5842
+
5843
+	            keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);
5844
+	        }
5845
+
5846
+	        // Update counters
5847
+	        this._i = i;
5848
+	        this._j = j;
5849
+
5850
+	        return keystreamWord;
5851
+	    }
5852
+
5853
+	    /**
5854
+	     * Shortcut functions to the cipher's object interface.
5855
+	     *
5856
+	     * @example
5857
+	     *
5858
+	     *     var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);
5859
+	     *     var plaintext  = CryptoJS.RC4.decrypt(ciphertext, key, cfg);
5860
+	     */
5861
+	    C.RC4 = StreamCipher._createHelper(RC4);
5862
+
5863
+	    /**
5864
+	     * Modified RC4 stream cipher algorithm.
5865
+	     */
5866
+	    var RC4Drop = C_algo.RC4Drop = RC4.extend({
5867
+	        /**
5868
+	         * Configuration options.
5869
+	         *
5870
+	         * @property {number} drop The number of keystream words to drop. Default 192
5871
+	         */
5872
+	        cfg: RC4.cfg.extend({
5873
+	            drop: 192
5874
+	        }),
5875
+
5876
+	        _doReset: function () {
5877
+	            RC4._doReset.call(this);
5878
+
5879
+	            // Drop
5880
+	            for (var i = this.cfg.drop; i > 0; i--) {
5881
+	                generateKeystreamWord.call(this);
5882
+	            }
5883
+	        }
5884
+	    });
5885
+
5886
+	    /**
5887
+	     * Shortcut functions to the cipher's object interface.
5888
+	     *
5889
+	     * @example
5890
+	     *
5891
+	     *     var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);
5892
+	     *     var plaintext  = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);
5893
+	     */
5894
+	    C.RC4Drop = StreamCipher._createHelper(RC4Drop);
5895
+	}());
5896
+
5897
+
5898
+	(function () {
5899
+	    // Shortcuts
5900
+	    var C = CryptoJS;
5901
+	    var C_lib = C.lib;
5902
+	    var StreamCipher = C_lib.StreamCipher;
5903
+	    var C_algo = C.algo;
5904
+
5905
+	    // Reusable objects
5906
+	    var S  = [];
5907
+	    var C_ = [];
5908
+	    var G  = [];
5909
+
5910
+	    /**
5911
+	     * Rabbit stream cipher algorithm
5912
+	     */
5913
+	    var Rabbit = C_algo.Rabbit = StreamCipher.extend({
5914
+	        _doReset: function () {
5915
+	            // Shortcuts
5916
+	            var K = this._key.words;
5917
+	            var iv = this.cfg.iv;
5918
+
5919
+	            // Swap endian
5920
+	            for (var i = 0; i < 4; i++) {
5921
+	                K[i] = (((K[i] << 8)  | (K[i] >>> 24)) & 0x00ff00ff) |
5922
+	                       (((K[i] << 24) | (K[i] >>> 8))  & 0xff00ff00);
5923
+	            }
5924
+
5925
+	            // Generate initial state values
5926
+	            var X = this._X = [
5927
+	                K[0], (K[3] << 16) | (K[2] >>> 16),
5928
+	                K[1], (K[0] << 16) | (K[3] >>> 16),
5929
+	                K[2], (K[1] << 16) | (K[0] >>> 16),
5930
+	                K[3], (K[2] << 16) | (K[1] >>> 16)
5931
+	            ];
5932
+
5933
+	            // Generate initial counter values
5934
+	            var C = this._C = [
5935
+	                (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
5936
+	                (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
5937
+	                (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
5938
+	                (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
5939
+	            ];
5940
+
5941
+	            // Carry bit
5942
+	            this._b = 0;
5943
+
5944
+	            // Iterate the system four times
5945
+	            for (var i = 0; i < 4; i++) {
5946
+	                nextState.call(this);
5947
+	            }
5948
+
5949
+	            // Modify the counters
5950
+	            for (var i = 0; i < 8; i++) {
5951
+	                C[i] ^= X[(i + 4) & 7];
5952
+	            }
5953
+
5954
+	            // IV setup
5955
+	            if (iv) {
5956
+	                // Shortcuts
5957
+	                var IV = iv.words;
5958
+	                var IV_0 = IV[0];
5959
+	                var IV_1 = IV[1];
5960
+
5961
+	                // Generate four subvectors
5962
+	                var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
5963
+	                var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
5964
+	                var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
5965
+	                var i3 = (i2 << 16)  | (i0 & 0x0000ffff);
5966
+
5967
+	                // Modify counter values
5968
+	                C[0] ^= i0;
5969
+	                C[1] ^= i1;
5970
+	                C[2] ^= i2;
5971
+	                C[3] ^= i3;
5972
+	                C[4] ^= i0;
5973
+	                C[5] ^= i1;
5974
+	                C[6] ^= i2;
5975
+	                C[7] ^= i3;
5976
+
5977
+	                // Iterate the system four times
5978
+	                for (var i = 0; i < 4; i++) {
5979
+	                    nextState.call(this);
5980
+	                }
5981
+	            }
5982
+	        },
5983
+
5984
+	        _doProcessBlock: function (M, offset) {
5985
+	            // Shortcut
5986
+	            var X = this._X;
5987
+
5988
+	            // Iterate the system
5989
+	            nextState.call(this);
5990
+
5991
+	            // Generate four keystream words
5992
+	            S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
5993
+	            S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
5994
+	            S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
5995
+	            S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
5996
+
5997
+	            for (var i = 0; i < 4; i++) {
5998
+	                // Swap endian
5999
+	                S[i] = (((S[i] << 8)  | (S[i] >>> 24)) & 0x00ff00ff) |
6000
+	                       (((S[i] << 24) | (S[i] >>> 8))  & 0xff00ff00);
6001
+
6002
+	                // Encrypt
6003
+	                M[offset + i] ^= S[i];
6004
+	            }
6005
+	        },
6006
+
6007
+	        blockSize: 128/32,
6008
+
6009
+	        ivSize: 64/32
6010
+	    });
6011
+
6012
+	    function nextState() {
6013
+	        // Shortcuts
6014
+	        var X = this._X;
6015
+	        var C = this._C;
6016
+
6017
+	        // Save old counter values
6018
+	        for (var i = 0; i < 8; i++) {
6019
+	            C_[i] = C[i];
6020
+	        }
6021
+
6022
+	        // Calculate new counter values
6023
+	        C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
6024
+	        C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
6025
+	        C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
6026
+	        C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
6027
+	        C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
6028
+	        C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
6029
+	        C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
6030
+	        C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
6031
+	        this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
6032
+
6033
+	        // Calculate the g-values
6034
+	        for (var i = 0; i < 8; i++) {
6035
+	            var gx = X[i] + C[i];
6036
+
6037
+	            // Construct high and low argument for squaring
6038
+	            var ga = gx & 0xffff;
6039
+	            var gb = gx >>> 16;
6040
+
6041
+	            // Calculate high and low result of squaring
6042
+	            var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
6043
+	            var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
6044
+
6045
+	            // High XOR low
6046
+	            G[i] = gh ^ gl;
6047
+	        }
6048
+
6049
+	        // Calculate new state values
6050
+	        X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
6051
+	        X[1] = (G[1] + ((G[0] << 8)  | (G[0] >>> 24)) + G[7]) | 0;
6052
+	        X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
6053
+	        X[3] = (G[3] + ((G[2] << 8)  | (G[2] >>> 24)) + G[1]) | 0;
6054
+	        X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
6055
+	        X[5] = (G[5] + ((G[4] << 8)  | (G[4] >>> 24)) + G[3]) | 0;
6056
+	        X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
6057
+	        X[7] = (G[7] + ((G[6] << 8)  | (G[6] >>> 24)) + G[5]) | 0;
6058
+	    }
6059
+
6060
+	    /**
6061
+	     * Shortcut functions to the cipher's object interface.
6062
+	     *
6063
+	     * @example
6064
+	     *
6065
+	     *     var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
6066
+	     *     var plaintext  = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
6067
+	     */
6068
+	    C.Rabbit = StreamCipher._createHelper(Rabbit);
6069
+	}());
6070
+
6071
+
6072
+	(function () {
6073
+	    // Shortcuts
6074
+	    var C = CryptoJS;
6075
+	    var C_lib = C.lib;
6076
+	    var StreamCipher = C_lib.StreamCipher;
6077
+	    var C_algo = C.algo;
6078
+
6079
+	    // Reusable objects
6080
+	    var S  = [];
6081
+	    var C_ = [];
6082
+	    var G  = [];
6083
+
6084
+	    /**
6085
+	     * Rabbit stream cipher algorithm.
6086
+	     *
6087
+	     * This is a legacy version that neglected to convert the key to little-endian.
6088
+	     * This error doesn't affect the cipher's security,
6089
+	     * but it does affect its compatibility with other implementations.
6090
+	     */
6091
+	    var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
6092
+	        _doReset: function () {
6093
+	            // Shortcuts
6094
+	            var K = this._key.words;
6095
+	            var iv = this.cfg.iv;
6096
+
6097
+	            // Generate initial state values
6098
+	            var X = this._X = [
6099
+	                K[0], (K[3] << 16) | (K[2] >>> 16),
6100
+	                K[1], (K[0] << 16) | (K[3] >>> 16),
6101
+	                K[2], (K[1] << 16) | (K[0] >>> 16),
6102
+	                K[3], (K[2] << 16) | (K[1] >>> 16)
6103
+	            ];
6104
+
6105
+	            // Generate initial counter values
6106
+	            var C = this._C = [
6107
+	                (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
6108
+	                (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
6109
+	                (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
6110
+	                (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
6111
+	            ];
6112
+
6113
+	            // Carry bit
6114
+	            this._b = 0;
6115
+
6116
+	            // Iterate the system four times
6117
+	            for (var i = 0; i < 4; i++) {
6118
+	                nextState.call(this);
6119
+	            }
6120
+
6121
+	            // Modify the counters
6122
+	            for (var i = 0; i < 8; i++) {
6123
+	                C[i] ^= X[(i + 4) & 7];
6124
+	            }
6125
+
6126
+	            // IV setup
6127
+	            if (iv) {
6128
+	                // Shortcuts
6129
+	                var IV = iv.words;
6130
+	                var IV_0 = IV[0];
6131
+	                var IV_1 = IV[1];
6132
+
6133
+	                // Generate four subvectors
6134
+	                var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
6135
+	                var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
6136
+	                var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
6137
+	                var i3 = (i2 << 16)  | (i0 & 0x0000ffff);
6138
+
6139
+	                // Modify counter values
6140
+	                C[0] ^= i0;
6141
+	                C[1] ^= i1;
6142
+	                C[2] ^= i2;
6143
+	                C[3] ^= i3;
6144
+	                C[4] ^= i0;
6145
+	                C[5] ^= i1;
6146
+	                C[6] ^= i2;
6147
+	                C[7] ^= i3;
6148
+
6149
+	                // Iterate the system four times
6150
+	                for (var i = 0; i < 4; i++) {
6151
+	                    nextState.call(this);
6152
+	                }
6153
+	            }
6154
+	        },
6155
+
6156
+	        _doProcessBlock: function (M, offset) {
6157
+	            // Shortcut
6158
+	            var X = this._X;
6159
+
6160
+	            // Iterate the system
6161
+	            nextState.call(this);
6162
+
6163
+	            // Generate four keystream words
6164
+	            S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
6165
+	            S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
6166
+	            S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
6167
+	            S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
6168
+
6169
+	            for (var i = 0; i < 4; i++) {
6170
+	                // Swap endian
6171
+	                S[i] = (((S[i] << 8)  | (S[i] >>> 24)) & 0x00ff00ff) |
6172
+	                       (((S[i] << 24) | (S[i] >>> 8))  & 0xff00ff00);
6173
+
6174
+	                // Encrypt
6175
+	                M[offset + i] ^= S[i];
6176
+	            }
6177
+	        },
6178
+
6179
+	        blockSize: 128/32,
6180
+
6181
+	        ivSize: 64/32
6182
+	    });
6183
+
6184
+	    function nextState() {
6185
+	        // Shortcuts
6186
+	        var X = this._X;
6187
+	        var C = this._C;
6188
+
6189
+	        // Save old counter values
6190
+	        for (var i = 0; i < 8; i++) {
6191
+	            C_[i] = C[i];
6192
+	        }
6193
+
6194
+	        // Calculate new counter values
6195
+	        C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
6196
+	        C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
6197
+	        C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
6198
+	        C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
6199
+	        C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
6200
+	        C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
6201
+	        C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
6202
+	        C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
6203
+	        this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
6204
+
6205
+	        // Calculate the g-values
6206
+	        for (var i = 0; i < 8; i++) {
6207
+	            var gx = X[i] + C[i];
6208
+
6209
+	            // Construct high and low argument for squaring
6210
+	            var ga = gx & 0xffff;
6211
+	            var gb = gx >>> 16;
6212
+
6213
+	            // Calculate high and low result of squaring
6214
+	            var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
6215
+	            var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
6216
+
6217
+	            // High XOR low
6218
+	            G[i] = gh ^ gl;
6219
+	        }
6220
+
6221
+	        // Calculate new state values
6222
+	        X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
6223
+	        X[1] = (G[1] + ((G[0] << 8)  | (G[0] >>> 24)) + G[7]) | 0;
6224
+	        X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
6225
+	        X[3] = (G[3] + ((G[2] << 8)  | (G[2] >>> 24)) + G[1]) | 0;
6226
+	        X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
6227
+	        X[5] = (G[5] + ((G[4] << 8)  | (G[4] >>> 24)) + G[3]) | 0;
6228
+	        X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
6229
+	        X[7] = (G[7] + ((G[6] << 8)  | (G[6] >>> 24)) + G[5]) | 0;
6230
+	    }
6231
+
6232
+	    /**
6233
+	     * Shortcut functions to the cipher's object interface.
6234
+	     *
6235
+	     * @example
6236
+	     *
6237
+	     *     var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
6238
+	     *     var plaintext  = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
6239
+	     */
6240
+	    C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
6241
+	}());
6242
+
6243
+
6244
+	return CryptoJS;
6245
+
6246
+}));
0 6247
\ No newline at end of file