vendor: 42,864 bytes, lines 1-1531
1(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[98],{ 2 3/***/ 168: 4/***/ (function(module, exports, __webpack_require__) { 5 6;(function (root, factory) { 7 if (true) { 8 // CommonJS 9 module.exports = exports = factory(__webpack_require__(3)); 10 } 11 else {} 12}(this, function (CryptoJS) { 13 14 (function () { 15 // Check if typed arrays are supported 16 if (typeof ArrayBuffer != 'function') { 17 return; 18 } 19 20 // Shortcuts 21 var C = CryptoJS; 22 var C_lib = C.lib; 23 var WordArray = C_lib.WordArray; 24 25 // Reference original init 26 var superInit = WordArray.init; 27 28 // Augment WordArray.init to handle typed arrays 29 var subInit = WordArray.init = function (typedArray) { 30 // Convert buffers to uint8 31 if (typedArray instanceof ArrayBuffer) { 32 typedArray = new Uint8Array(typedArray); 33 } 34 35 // Convert other array views to uint8 36 if ( 37 typedArray instanceof Int8Array || 38 (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || 39 typedArray instanceof Int16Array || 40 typedArray instanceof Uint16Array || 41 typedArray instanceof Int32Array || 42 typedArray instanceof Uint32Array || 43 typedArray instanceof Float32Array || 44 typedArray instanceof Float64Array 45 ) { 46 typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); 47 } 48 49 // Handle Uint8Array 50 if (typedArray instanceof Uint8Array) { 51 // Shortcut 52 var typedArrayByteLength = typedArray.byteLength; 53 54 // Extract bytes 55 var words = []; 56 for (var i = 0; i < typedArrayByteLength; i++) { 57 words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); 58 } 59 60 // Initialize this word array 61 superInit.call(this, words, typedArrayByteLength); 62 } else { 63 // Else call normal init 64 superInit.apply(this, arguments); 65 } 66 }; 67 68 subInit.prototype = WordArray; 69 }()); 70 71 72 return CryptoJS.lib.WordArray; 73 74})); 75 76/***/ }), 77 78/***/ 171: 79/***/ (function(module, exports, __webpack_require__) { 80 81;(function (root, factory, undef) { 82 if (true) { 83 // CommonJS 84 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(45)); 85 } 86 else {} 87}(this, function (CryptoJS) { 88 89 (function () { 90 // Shortcuts 91 var C = CryptoJS; 92 var C_lib = C.lib; 93 var WordArray = C_lib.WordArray; 94 var C_algo = C.algo; 95 var SHA256 = C_algo.SHA256; 96 97 /** 98 * SHA-224 hash algorithm. 99 */ 100 var SHA224 = C_algo.SHA224 = SHA256.extend({ 101 _doReset: function () { 102 this._hash = new WordArray.init([ 103 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 104 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 105 ]); 106 }, 107 108 _doFinalize: function () { 109 var hash = SHA256._doFinalize.call(this); 110 111 hash.sigBytes -= 4; 112 113 return hash; 114 } 115 }); 116 117 /** 118 * Shortcut function to the hasher's object interface. 119 * 120 * @param {WordArray|string} message The message to hash. 121 * 122 * @return {WordArray} The hash. 123 * 124 * @static 125 * 126 * @example 127 * 128 * var hash = CryptoJS.SHA224('message'); 129 * var hash = CryptoJS.SHA224(wordArray); 130 */ 131 C.SHA224 = SHA256._createHelper(SHA224); 132 133 /** 134 * Shortcut function to the HMAC's object interface. 135 * 136 * @param {WordArray|string} message The message to hash. 137 * @param {WordArray|string} key The secret key. 138 * 139 * @return {WordArray} The HMAC. 140 * 141 * @static 142 * 143 * @example 144 * 145 * var hmac = CryptoJS.HmacSHA224(message, key); 146 */ 147 C.HmacSHA224 = SHA256._createHmacHelper(SHA224); 148 }()); 149 150 151 return CryptoJS.SHA224; 152 153})); 154 155/***/ }), 156 157/***/ 172: 158/***/ (function(module, exports, __webpack_require__) { 159 160;(function (root, factory, undef) { 161 if (true) { 162 // CommonJS 163 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(32), __webpack_require__(86)); 164 } 165 else {} 166}(this, function (CryptoJS) { 167 168 (function () { 169 // Shortcuts 170 var C = CryptoJS; 171 var C_x64 = C.x64; 172 var X64Word = C_x64.Word; 173 var X64WordArray = C_x64.WordArray; 174 var C_algo = C.algo; 175 var SHA512 = C_algo.SHA512; 176 177 /** 178 * SHA-384 hash algorithm. 179 */ 180 var SHA384 = C_algo.SHA384 = SHA512.extend({ 181 _doReset: function () { 182 this._hash = new X64WordArray.init([ 183 new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), 184 new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), 185 new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), 186 new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) 187 ]); 188 }, 189 190 _doFinalize: function () { 191 var hash = SHA512._doFinalize.call(this); 192 193 hash.sigBytes -= 16; 194 195 return hash; 196 } 197 }); 198 199 /** 200 * Shortcut function to the hasher's object interface. 201 * 202 * @param {WordArray|string} message The message to hash. 203 * 204 * @return {WordArray} The hash. 205 * 206 * @static 207 * 208 * @example 209 * 210 * var hash = CryptoJS.SHA384('message'); 211 * var hash = CryptoJS.SHA384(wordArray); 212 */ 213 C.SHA384 = SHA512._createHelper(SHA384); 214 215 /** 216 * Shortcut function to the HMAC's object interface. 217 * 218 * @param {WordArray|string} message The message to hash. 219 * @param {WordArray|string} key The secret key. 220 * 221 * @return {WordArray} The HMAC. 222 * 223 * @static 224 * 225 * @example 226 * 227 * var hmac = CryptoJS.HmacSHA384(message, key); 228 */ 229 C.HmacSHA384 = SHA512._createHmacHelper(SHA384); 230 }()); 231 232 233 return CryptoJS.SHA384; 234 235})); 236 237/***/ }), 238 239/***/ 173: 240/***/ (function(module, exports, __webpack_require__) { 241 242;(function (root, factory, undef) { 243 if (true) { 244 // CommonJS 245 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(32)); 246 } 247 else {} 248}(this, function (CryptoJS) { 249 250 (function (Math) { 251 // Shortcuts 252 var C = CryptoJS; 253 var C_lib = C.lib; 254 var WordArray = C_lib.WordArray; 255 var Hasher = C_lib.Hasher; 256 var C_x64 = C.x64; 257 var X64Word = C_x64.Word; 258 var C_algo = C.algo; 259 260 // Constants tables 261 var RHO_OFFSETS = []; 262 var PI_INDEXES = []; 263 var ROUND_CONSTANTS = []; 264 265 // Compute Constants 266 (function () { 267 // Compute rho offset constants 268 var x = 1, y = 0; 269 for (var t = 0; t < 24; t++) { 270 RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; 271 272 var newX = y % 5; 273 var newY = (2 * x + 3 * y) % 5; 274 x = newX; 275 y = newY; 276 } 277 278 // Compute pi index constants 279 for (var x = 0; x < 5; x++) { 280 for (var y = 0; y < 5; y++) { 281 PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; 282 } 283 } 284 285 // Compute round constants 286 var LFSR = 0x01; 287 for (var i = 0; i < 24; i++) { 288 var roundConstantMsw = 0; 289 var roundConstantLsw = 0; 290 291 for (var j = 0; j < 7; j++) { 292 if (LFSR & 0x01) { 293 var bitPosition = (1 << j) - 1; 294 if (bitPosition < 32) { 295 roundConstantLsw ^= 1 << bitPosition; 296 } else /* if (bitPosition >= 32) */ { 297 roundConstantMsw ^= 1 << (bitPosition - 32); 298 } 299 } 300 301 // Compute next LFSR 302 if (LFSR & 0x80) { 303 // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 304 LFSR = (LFSR << 1) ^ 0x71; 305 } else { 306 LFSR <<= 1; 307 } 308 } 309 310 ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); 311 } 312 }()); 313 314 // Reusable objects for temporary values 315 var T = []; 316 (function () { 317 for (var i = 0; i < 25; i++) { 318 T[i] = X64Word.create(); 319 } 320 }()); 321 322 /** 323 * SHA-3 hash algorithm. 324 */ 325 var SHA3 = C_algo.SHA3 = Hasher.extend({ 326 /** 327 * Configuration options. 328 * 329 * @property {number} outputLength 330 * The desired number of bits in the output hash. 331 * Only values permitted are: 224, 256, 384, 512. 332 * Default: 512 333 */ 334 cfg: Hasher.cfg.extend({ 335 outputLength: 512 336 }), 337 338 _doReset: function () { 339 var state = this._state = [] 340 for (var i = 0; i < 25; i++) { 341 state[i] = new X64Word.init(); 342 } 343 344 this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; 345 }, 346 347 _doProcessBlock: function (M, offset) { 348 // Shortcuts 349 var state = this._state; 350 var nBlockSizeLanes = this.blockSize / 2; 351 352 // Absorb 353 for (var i = 0; i < nBlockSizeLanes; i++) { 354 // Shortcuts 355 var M2i = M[offset + 2 * i]; 356 var M2i1 = M[offset + 2 * i + 1]; 357 358 // Swap endian 359 M2i = ( 360 (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | 361 (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) 362 ); 363 M2i1 = ( 364 (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | 365 (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) 366 ); 367 368 // Absorb message into state 369 var lane = state[i]; 370 lane.high ^= M2i1; 371 lane.low ^= M2i; 372 } 373 374 // Rounds 375 for (var round = 0; round < 24; round++) { 376 // Theta 377 for (var x = 0; x < 5; x++) { 378 // Mix column lanes 379 var tMsw = 0, tLsw = 0; 380 for (var y = 0; y < 5; y++) { 381 var lane = state[x + 5 * y]; 382 tMsw ^= lane.high; 383 tLsw ^= lane.low; 384 } 385 386 // Temporary values 387 var Tx = T[x]; 388 Tx.high = tMsw; 389 Tx.low = tLsw; 390 } 391 for (var x = 0; x < 5; x++) { 392 // Shortcuts 393 var Tx4 = T[(x + 4) % 5]; 394 var Tx1 = T[(x + 1) % 5]; 395 var Tx1Msw = Tx1.high; 396 var Tx1Lsw = Tx1.low; 397 398 // Mix surrounding columns 399 var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); 400 var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); 401 for (var y = 0; y < 5; y++) { 402 var lane = state[x + 5 * y]; 403 lane.high ^= tMsw; 404 lane.low ^= tLsw; 405 } 406 } 407 408 // Rho Pi 409 for (var laneIndex = 1; laneIndex < 25; laneIndex++) { 410 var tMsw; 411 var tLsw; 412 413 // Shortcuts 414 var lane = state[laneIndex]; 415 var laneMsw = lane.high; 416 var laneLsw = lane.low; 417 var rhoOffset = RHO_OFFSETS[laneIndex]; 418 419 // Rotate lanes 420 if (rhoOffset < 32) { 421 tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); 422 tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); 423 } else /* if (rhoOffset >= 32) */ { 424 tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); 425 tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); 426 } 427 428 // Transpose lanes 429 var TPiLane = T[PI_INDEXES[laneIndex]]; 430 TPiLane.high = tMsw; 431 TPiLane.low = tLsw; 432 } 433 434 // Rho pi at x = y = 0 435 var T0 = T[0]; 436 var state0 = state[0]; 437 T0.high = state0.high; 438 T0.low = state0.low; 439 440 // Chi 441 for (var x = 0; x < 5; x++) { 442 for (var y = 0; y < 5; y++) { 443 // Shortcuts 444 var laneIndex = x + 5 * y; 445 var lane = state[laneIndex]; 446 var TLane = T[laneIndex]; 447 var Tx1Lane = T[((x + 1) % 5) + 5 * y]; 448 var Tx2Lane = T[((x + 2) % 5) + 5 * y]; 449 450 // Mix rows 451 lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); 452 lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); 453 } 454 } 455 456 // Iota 457 var lane = state[0]; 458 var roundConstant = ROUND_CONSTANTS[round]; 459 lane.high ^= roundConstant.high; 460 lane.low ^= roundConstant.low; 461 } 462 }, 463 464 _doFinalize: function () { 465 // Shortcuts 466 var data = this._data; 467 var dataWords = data.words; 468 var nBitsTotal = this._nDataBytes * 8; 469 var nBitsLeft = data.sigBytes * 8; 470 var blockSizeBits = this.blockSize * 32; 471 472 // Add padding 473 dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); 474 dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; 475 data.sigBytes = dataWords.length * 4; 476 477 // Hash final blocks 478 this._process(); 479 480 // Shortcuts 481 var state = this._state; 482 var outputLengthBytes = this.cfg.outputLength / 8; 483 var outputLengthLanes = outputLengthBytes / 8; 484 485 // Squeeze 486 var hashWords = []; 487 for (var i = 0; i < outputLengthLanes; i++) { 488 // Shortcuts 489 var lane = state[i]; 490 var laneMsw = lane.high; 491 var laneLsw = lane.low; 492 493 // Swap endian 494 laneMsw = ( 495 (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | 496 (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) 497 ); 498 laneLsw = ( 499 (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | 500 (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) 501 ); 502 503 // Squeeze state to retrieve hash 504 hashWords.push(laneLsw); 505 hashWords.push(laneMsw); 506 } 507 508 // Return final computed hash 509 return new WordArray.init(hashWords, outputLengthBytes); 510 }, 511 512 clone: function () { 513 var clone = Hasher.clone.call(this); 514 515 var state = clone._state = this._state.slice(0); 516 for (var i = 0; i < 25; i++) { 517 state[i] = state[i].clone(); 518 } 519 520 return clone; 521 } 522 }); 523 524 /** 525 * Shortcut function to the hasher's object interface. 526 * 527 * @param {WordArray|string} message The message to hash. 528 * 529 * @return {WordArray} The hash. 530 * 531 * @static 532 * 533 * @example 534 * 535 * var hash = CryptoJS.SHA3('message'); 536 * var hash = CryptoJS.SHA3(wordArray); 537 */ 538 C.SHA3 = Hasher._createHelper(SHA3); 539 540 /** 541 * Shortcut function to the HMAC's object interface. 542 * 543 * @param {WordArray|string} message The message to hash. 544 * @param {WordArray|string} key The secret key. 545 * 546 * @return {WordArray} The HMAC. 547 * 548 * @static 549 * 550 * @example 551 * 552 * var hmac = CryptoJS.HmacSHA3(message, key); 553 */ 554 C.HmacSHA3 = Hasher._createHmacHelper(SHA3); 555 }(Math)); 556 557 558 return CryptoJS.SHA3; 559 560})); 561 562/***/ }), 563 564/***/ 174: 565/***/ (function(module, exports, __webpack_require__) { 566 567;(function (root, factory) { 568 if (true) { 569 // CommonJS 570 module.exports = exports = factory(__webpack_require__(3)); 571 } 572 else {} 573}(this, function (CryptoJS) { 574 575 /** @preserve 576 (c) 2012 by Cédric Mesnil. All rights reserved. 577 578 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 579 580 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 581 - 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. 582 583 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. 584 */ 585 586 (function (Math) { 587 // Shortcuts 588 var C = CryptoJS; 589 var C_lib = C.lib; 590 var WordArray = C_lib.WordArray; 591 var Hasher = C_lib.Hasher; 592 var C_algo = C.algo; 593 594 // Constants table 595 var _zl = WordArray.create([ 596 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 597 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 598 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 599 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 600 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); 601 var _zr = WordArray.create([ 602 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 603 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 604 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 605 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 606 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); 607 var _sl = WordArray.create([ 608 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 609 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 610 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 611 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 612 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); 613 var _sr = WordArray.create([ 614 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 615 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 616 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 617 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 618 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); 619 620 var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); 621 var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); 622 623 /** 624 * RIPEMD160 hash algorithm. 625 */ 626 var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ 627 _doReset: function () { 628 this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); 629 }, 630 631 _doProcessBlock: function (M, offset) { 632 633 // Swap endian 634 for (var i = 0; i < 16; i++) { 635 // Shortcuts 636 var offset_i = offset + i; 637 var M_offset_i = M[offset_i]; 638 639 // Swap 640 M[offset_i] = ( 641 (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | 642 (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) 643 ); 644 } 645 // Shortcut 646 var H = this._hash.words; 647 var hl = _hl.words; 648 var hr = _hr.words; 649 var zl = _zl.words; 650 var zr = _zr.words; 651 var sl = _sl.words; 652 var sr = _sr.words; 653 654 // Working variables 655 var al, bl, cl, dl, el; 656 var ar, br, cr, dr, er; 657 658 ar = al = H[0]; 659 br = bl = H[1]; 660 cr = cl = H[2]; 661 dr = dl = H[3]; 662 er = el = H[4]; 663 // Computation 664 var t; 665 for (var i = 0; i < 80; i += 1) { 666 t = (al + M[offset+zl[i]])|0; 667 if (i<16){ 668 t += f1(bl,cl,dl) + hl[0]; 669 } else if (i<32) { 670 t += f2(bl,cl,dl) + hl[1]; 671 } else if (i<48) { 672 t += f3(bl,cl,dl) + hl[2]; 673 } else if (i<64) { 674 t += f4(bl,cl,dl) + hl[3]; 675 } else {// if (i<80) { 676 t += f5(bl,cl,dl) + hl[4]; 677 } 678 t = t|0; 679 t = rotl(t,sl[i]); 680 t = (t+el)|0; 681 al = el; 682 el = dl; 683 dl = rotl(cl, 10); 684 cl = bl; 685 bl = t; 686 687 t = (ar + M[offset+zr[i]])|0; 688 if (i<16){ 689 t += f5(br,cr,dr) + hr[0]; 690 } else if (i<32) { 691 t += f4(br,cr,dr) + hr[1]; 692 } else if (i<48) { 693 t += f3(br,cr,dr) + hr[2]; 694 } else if (i<64) { 695 t += f2(br,cr,dr) + hr[3]; 696 } else {// if (i<80) { 697 t += f1(br,cr,dr) + hr[4]; 698 } 699 t = t|0; 700 t = rotl(t,sr[i]) ; 701 t = (t+er)|0; 702 ar = er; 703 er = dr; 704 dr = rotl(cr, 10); 705 cr = br; 706 br = t; 707 } 708 // Intermediate hash value 709 t = (H[1] + cl + dr)|0; 710 H[1] = (H[2] + dl + er)|0; 711 H[2] = (H[3] + el + ar)|0; 712 H[3] = (H[4] + al + br)|0; 713 H[4] = (H[0] + bl + cr)|0; 714 H[0] = t; 715 }, 716 717 _doFinalize: function () { 718 // Shortcuts 719 var data = this._data; 720 var dataWords = data.words; 721 722 var nBitsTotal = this._nDataBytes * 8; 723 var nBitsLeft = data.sigBytes * 8; 724 725 // Add padding 726 dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 727 dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( 728 (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | 729 (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) 730 ); 731 data.sigBytes = (dataWords.length + 1) * 4; 732 733 // Hash final blocks 734 this._process(); 735 736 // Shortcuts 737 var hash = this._hash; 738 var H = hash.words; 739 740 // Swap endian 741 for (var i = 0; i < 5; i++) { 742 // Shortcut 743 var H_i = H[i]; 744 745 // Swap 746 H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | 747 (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); 748 } 749 750 // Return final computed hash 751 return hash; 752 }, 753 754 clone: function () { 755 var clone = Hasher.clone.call(this); 756 clone._hash = this._hash.clone(); 757 758 return clone; 759 } 760 }); 761 762 763 function f1(x, y, z) { 764 return ((x) ^ (y) ^ (z)); 765 766 } 767 768 function f2(x, y, z) { 769 return (((x)&(y)) | ((~x)&(z))); 770 } 771 772 function f3(x, y, z) { 773 return (((x) | (~(y))) ^ (z)); 774 } 775 776 function f4(x, y, z) { 777 return (((x) & (z)) | ((y)&(~(z)))); 778 } 779 780 function f5(x, y, z) { 781 return ((x) ^ ((y) |(~(z)))); 782 783 } 784 785 function rotl(x,n) { 786 return (x<<n) | (x>>>(32-n)); 787 } 788 789 790 /** 791 * Shortcut function to the hasher's object interface. 792 * 793 * @param {WordArray|string} message The message to hash. 794 * 795 * @return {WordArray} The hash. 796 * 797 * @static 798 * 799 * @example 800 * 801 * var hash = CryptoJS.RIPEMD160('message'); 802 * var hash = CryptoJS.RIPEMD160(wordArray); 803 */ 804 C.RIPEMD160 = Hasher._createHelper(RIPEMD160); 805 806 /** 807 * Shortcut function to the HMAC's object interface. 808 * 809 * @param {WordArray|string} message The message to hash. 810 * @param {WordArray|string} key The secret key. 811 * 812 * @return {WordArray} The HMAC. 813 * 814 * @static 815 * 816 * @example 817 * 818 * var hmac = CryptoJS.HmacRIPEMD160(message, key); 819 */ 820 C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); 821 }(Math)); 822 823 824 return CryptoJS.RIPEMD160; 825 826})); 827 828/***/ }), 829 830/***/ 175: 831/***/ (function(module, exports, __webpack_require__) { 832 833;(function (root, factory, undef) { 834 if (true) { 835 // CommonJS 836 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(45), __webpack_require__(46)); 837 } 838 else {} 839}(this, function (CryptoJS) { 840 841 (function () { 842 // Shortcuts 843 var C = CryptoJS; 844 var C_lib = C.lib; 845 var Base = C_lib.Base; 846 var WordArray = C_lib.WordArray; 847 var C_algo = C.algo; 848 var SHA256 = C_algo.SHA256; 849 var HMAC = C_algo.HMAC; 850 851 /** 852 * Password-Based Key Derivation Function 2 algorithm. 853 */ 854 var PBKDF2 = C_algo.PBKDF2 = Base.extend({ 855 /** 856 * Configuration options. 857 * 858 * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) 859 * @property {Hasher} hasher The hasher to use. Default: SHA256 860 * @property {number} iterations The number of iterations to perform. Default: 250000 861 */ 862 cfg: Base.extend({ 863 keySize: 128/32, 864 hasher: SHA256, 865 iterations: 250000 866 }), 867 868 /** 869 * Initializes a newly created key derivation function. 870 * 871 * @param {Object} cfg (Optional) The configuration options to use for the derivation. 872 * 873 * @example 874 * 875 * var kdf = CryptoJS.algo.PBKDF2.create(); 876 * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); 877 * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); 878 */ 879 init: function (cfg) { 880 this.cfg = this.cfg.extend(cfg); 881 }, 882 883 /** 884 * Computes the Password-Based Key Derivation Function 2. 885 * 886 * @param {WordArray|string} password The password. 887 * @param {WordArray|string} salt A salt. 888 * 889 * @return {WordArray} The derived key. 890 * 891 * @example 892 * 893 * var key = kdf.compute(password, salt); 894 */ 895 compute: function (password, salt) { 896 // Shortcut 897 var cfg = this.cfg; 898 899 // Init HMAC 900 var hmac = HMAC.create(cfg.hasher, password); 901 902 // Initial values 903 var derivedKey = WordArray.create(); 904 var blockIndex = WordArray.create([0x00000001]); 905 906 // Shortcuts 907 var derivedKeyWords = derivedKey.words; 908 var blockIndexWords = blockIndex.words; 909 var keySize = cfg.keySize; 910 var iterations = cfg.iterations; 911 912 // Generate key 913 while (derivedKeyWords.length < keySize) { 914 var block = hmac.update(salt).finalize(blockIndex); 915 hmac.reset(); 916 917 // Shortcuts 918 var blockWords = block.words; 919 var blockWordsLength = blockWords.length; 920 921 // Iterations 922 var intermediate = block; 923 for (var i = 1; i < iterations; i++) { 924 intermediate = hmac.finalize(intermediate); 925 hmac.reset(); 926 927 // Shortcut 928 var intermediateWords = intermediate.words; 929 930 // XOR intermediate with block 931 for (var j = 0; j < blockWordsLength; j++) { 932 blockWords[j] ^= intermediateWords[j]; 933 } 934 } 935 936 derivedKey.concat(block); 937 blockIndexWords[0]++; 938 } 939 derivedKey.sigBytes = keySize * 4; 940 941 return derivedKey; 942 } 943 }); 944 945 /** 946 * Computes the Password-Based Key Derivation Function 2. 947 * 948 * @param {WordArray|string} password The password. 949 * @param {WordArray|string} salt A salt. 950 * @param {Object} cfg (Optional) The configuration options to use for this computation. 951 * 952 * @return {WordArray} The derived key. 953 * 954 * @static 955 * 956 * @example 957 * 958 * var key = CryptoJS.PBKDF2(password, salt); 959 * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); 960 * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); 961 */ 962 C.PBKDF2 = function (password, salt, cfg) { 963 return PBKDF2.create(cfg).compute(password, salt); 964 }; 965 }()); 966 967 968 return CryptoJS.PBKDF2; 969 970})); 971 972/***/ }), 973 974/***/ 176: 975/***/ (function(module, exports, __webpack_require__) { 976 977;(function (root, factory, undef) { 978 if (true) { 979 // CommonJS 980 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 981 } 982 else {} 983}(this, function (CryptoJS) { 984 985 /** 986 * Cipher Feedback block mode. 987 */ 988 CryptoJS.mode.CFB = (function () { 989 var CFB = CryptoJS.lib.BlockCipherMode.extend(); 990 991 CFB.Encryptor = CFB.extend({ 992 processBlock: function (words, offset) { 993 // Shortcuts 994 var cipher = this._cipher; 995 var blockSize = cipher.blockSize; 996 997 generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); 998 999 // Remember this block to use with next block 1000 this._prevBlock = words.slice(offset, offset + blockSize); 1001 } 1002 }); 1003 1004 CFB.Decryptor = CFB.extend({ 1005 processBlock: function (words, offset) { 1006 // Shortcuts 1007 var cipher = this._cipher; 1008 var blockSize = cipher.blockSize; 1009 1010 // Remember this block to use with next block 1011 var thisBlock = words.slice(offset, offset + blockSize); 1012 1013 generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); 1014 1015 // This block becomes the previous block 1016 this._prevBlock = thisBlock; 1017 } 1018 }); 1019 1020 function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { 1021 var keystream; 1022 1023 // Shortcut 1024 var iv = this._iv; 1025 1026 // Generate keystream 1027 if (iv) { 1028 keystream = iv.slice(0); 1029 1030 // Remove IV for subsequent blocks 1031 this._iv = undefined; 1032 } else { 1033 keystream = this._prevBlock; 1034 } 1035 cipher.encryptBlock(keystream, 0); 1036 1037 // Encrypt 1038 for (var i = 0; i < blockSize; i++) { 1039 words[offset + i] ^= keystream[i]; 1040 } 1041 } 1042 1043 return CFB; 1044 }()); 1045 1046 1047 return CryptoJS.mode.CFB; 1048 1049})); 1050 1051/***/ }), 1052 1053/***/ 177: 1054/***/ (function(module, exports, __webpack_require__) { 1055 1056;(function (root, factory, undef) { 1057 if (true) { 1058 // CommonJS 1059 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1060 } 1061 else {} 1062}(this, function (CryptoJS) { 1063 1064 /** 1065 * Counter block mode. 1066 */ 1067 CryptoJS.mode.CTR = (function () { 1068 var CTR = CryptoJS.lib.BlockCipherMode.extend(); 1069 1070 var Encryptor = CTR.Encryptor = CTR.extend({ 1071 processBlock: function (words, offset) { 1072 // Shortcuts 1073 var cipher = this._cipher 1074 var blockSize = cipher.blockSize; 1075 var iv = this._iv; 1076 var counter = this._counter; 1077 1078 // Generate keystream 1079 if (iv) { 1080 counter = this._counter = iv.slice(0); 1081 1082 // Remove IV for subsequent blocks 1083 this._iv = undefined; 1084 } 1085 var keystream = counter.slice(0); 1086 cipher.encryptBlock(keystream, 0); 1087 1088 // Increment counter 1089 counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 1090 1091 // Encrypt 1092 for (var i = 0; i < blockSize; i++) { 1093 words[offset + i] ^= keystream[i]; 1094 } 1095 } 1096 }); 1097 1098 CTR.Decryptor = Encryptor; 1099 1100 return CTR; 1101 }()); 1102 1103 1104 return CryptoJS.mode.CTR; 1105 1106})); 1107 1108/***/ }), 1109 1110/***/ 178: 1111/***/ (function(module, exports, __webpack_require__) { 1112 1113;(function (root, factory, undef) { 1114 if (true) { 1115 // CommonJS 1116 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1117 } 1118 else {} 1119}(this, function (CryptoJS) { 1120 1121 /** @preserve 1122 * Counter block mode compatible with Dr Brian Gladman fileenc.c 1123 * derived from CryptoJS.mode.CTR 1124 * Jan Hruby [email protected] 1125 */ 1126 CryptoJS.mode.CTRGladman = (function () { 1127 var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); 1128 1129 function incWord(word) 1130 { 1131 if (((word >> 24) & 0xff) === 0xff) { //overflow 1132 var b1 = (word >> 16)&0xff; 1133 var b2 = (word >> 8)&0xff; 1134 var b3 = word & 0xff; 1135 1136 if (b1 === 0xff) // overflow b1 1137 { 1138 b1 = 0; 1139 if (b2 === 0xff) 1140 { 1141 b2 = 0; 1142 if (b3 === 0xff) 1143 { 1144 b3 = 0; 1145 } 1146 else 1147 { 1148 ++b3; 1149 } 1150 } 1151 else 1152 { 1153 ++b2; 1154 } 1155 } 1156 else 1157 { 1158 ++b1; 1159 } 1160 1161 word = 0; 1162 word += (b1 << 16); 1163 word += (b2 << 8); 1164 word += b3; 1165 } 1166 else 1167 { 1168 word += (0x01 << 24); 1169 } 1170 return word; 1171 } 1172 1173 function incCounter(counter) 1174 { 1175 if ((counter[0] = incWord(counter[0])) === 0) 1176 { 1177 // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 1178 counter[1] = incWord(counter[1]); 1179 } 1180 return counter; 1181 } 1182 1183 var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ 1184 processBlock: function (words, offset) { 1185 // Shortcuts 1186 var cipher = this._cipher 1187 var blockSize = cipher.blockSize; 1188 var iv = this._iv; 1189 var counter = this._counter; 1190 1191 // Generate keystream 1192 if (iv) { 1193 counter = this._counter = iv.slice(0); 1194 1195 // Remove IV for subsequent blocks 1196 this._iv = undefined; 1197 } 1198 1199 incCounter(counter); 1200 1201 var keystream = counter.slice(0); 1202 cipher.encryptBlock(keystream, 0); 1203 1204 // Encrypt 1205 for (var i = 0; i < blockSize; i++) { 1206 words[offset + i] ^= keystream[i]; 1207 } 1208 } 1209 }); 1210 1211 CTRGladman.Decryptor = Encryptor; 1212 1213 return CTRGladman; 1214 }()); 1215 1216 1217 1218 1219 return CryptoJS.mode.CTRGladman; 1220 1221})); 1222 1223/***/ }), 1224 1225/***/ 179: 1226/***/ (function(module, exports, __webpack_require__) { 1227 1228;(function (root, factory, undef) { 1229 if (true) { 1230 // CommonJS 1231 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1232 } 1233 else {} 1234}(this, function (CryptoJS) { 1235 1236 /** 1237 * Output Feedback block mode. 1238 */ 1239 CryptoJS.mode.OFB = (function () { 1240 var OFB = CryptoJS.lib.BlockCipherMode.extend(); 1241 1242 var Encryptor = OFB.Encryptor = OFB.extend({ 1243 processBlock: function (words, offset) { 1244 // Shortcuts 1245 var cipher = this._cipher 1246 var blockSize = cipher.blockSize; 1247 var iv = this._iv; 1248 var keystream = this._keystream; 1249 1250 // Generate keystream 1251 if (iv) { 1252 keystream = this._keystream = iv.slice(0); 1253 1254 // Remove IV for subsequent blocks 1255 this._iv = undefined; 1256 } 1257 cipher.encryptBlock(keystream, 0); 1258 1259 // Encrypt 1260 for (var i = 0; i < blockSize; i++) { 1261 words[offset + i] ^= keystream[i]; 1262 } 1263 } 1264 }); 1265 1266 OFB.Decryptor = Encryptor; 1267 1268 return OFB; 1269 }()); 1270 1271 1272 return CryptoJS.mode.OFB; 1273 1274})); 1275 1276/***/ }), 1277 1278/***/ 180: 1279/***/ (function(module, exports, __webpack_require__) { 1280 1281;(function (root, factory, undef) { 1282 if (true) { 1283 // CommonJS 1284 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1285 } 1286 else {} 1287}(this, function (CryptoJS) { 1288 1289 /** 1290 * Electronic Codebook block mode. 1291 */ 1292 CryptoJS.mode.ECB = (function () { 1293 var ECB = CryptoJS.lib.BlockCipherMode.extend(); 1294 1295 ECB.Encryptor = ECB.extend({ 1296 processBlock: function (words, offset) { 1297 this._cipher.encryptBlock(words, offset); 1298 } 1299 }); 1300 1301 ECB.Decryptor = ECB.extend({ 1302 processBlock: function (words, offset) { 1303 this._cipher.decryptBlock(words, offset); 1304 } 1305 }); 1306 1307 return ECB; 1308 }()); 1309 1310 1311 return CryptoJS.mode.ECB; 1312 1313})); 1314 1315/***/ }), 1316 1317/***/ 181: 1318/***/ (function(module, exports, __webpack_require__) { 1319 1320;(function (root, factory, undef) { 1321 if (true) { 1322 // CommonJS 1323 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1324 } 1325 else {} 1326}(this, function (CryptoJS) { 1327 1328 /** 1329 * ANSI X.923 padding strategy. 1330 */ 1331 CryptoJS.pad.AnsiX923 = { 1332 pad: function (data, blockSize) { 1333 // Shortcuts 1334 var dataSigBytes = data.sigBytes; 1335 var blockSizeBytes = blockSize * 4; 1336 1337 // Count padding bytes 1338 var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; 1339 1340 // Compute last byte position 1341 var lastBytePos = dataSigBytes + nPaddingBytes - 1; 1342 1343 // Pad 1344 data.clamp(); 1345 data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); 1346 data.sigBytes += nPaddingBytes; 1347 }, 1348 1349 unpad: function (data) { 1350 // Get number of padding bytes from last byte 1351 var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; 1352 1353 // Remove padding 1354 data.sigBytes -= nPaddingBytes; 1355 } 1356 }; 1357 1358 1359 return CryptoJS.pad.Ansix923; 1360 1361})); 1362 1363/***/ }), 1364 1365/***/ 182: 1366/***/ (function(module, exports, __webpack_require__) { 1367 1368;(function (root, factory, undef) { 1369 if (true) { 1370 // CommonJS 1371 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1372 } 1373 else {} 1374}(this, function (CryptoJS) { 1375 1376 /** 1377 * ISO 10126 padding strategy. 1378 */ 1379 CryptoJS.pad.Iso10126 = { 1380 pad: function (data, blockSize) { 1381 // Shortcut 1382 var blockSizeBytes = blockSize * 4; 1383 1384 // Count padding bytes 1385 var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; 1386 1387 // Pad 1388 data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). 1389 concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); 1390 }, 1391 1392 unpad: function (data) { 1393 // Get number of padding bytes from last byte 1394 var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; 1395 1396 // Remove padding 1397 data.sigBytes -= nPaddingBytes; 1398 } 1399 }; 1400 1401 1402 return CryptoJS.pad.Iso10126; 1403 1404})); 1405 1406/***/ }), 1407 1408/***/ 183: 1409/***/ (function(module, exports, __webpack_require__) { 1410 1411;(function (root, factory, undef) { 1412 if (true) { 1413 // CommonJS 1414 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1415 } 1416 else {} 1417}(this, function (CryptoJS) { 1418 1419 /** 1420 * ISO/IEC 9797-1 Padding Method 2. 1421 */ 1422 CryptoJS.pad.Iso97971 = { 1423 pad: function (data, blockSize) { 1424 // Add 0x80 byte 1425 data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); 1426 1427 // Zero pad the rest 1428 CryptoJS.pad.ZeroPadding.pad(data, blockSize); 1429 }, 1430 1431 unpad: function (data) { 1432 // Remove zero padding 1433 CryptoJS.pad.ZeroPadding.unpad(data); 1434 1435 // Remove one more byte -- the 0x80 byte 1436 data.sigBytes--; 1437 } 1438 }; 1439 1440 1441 return CryptoJS.pad.Iso97971; 1442 1443})); 1444 1445/***/ }), 1446 1447/***/ 184: 1448/***/ (function(module, exports, __webpack_require__) { 1449 1450;(function (root, factory, undef) { 1451 if (true) { 1452 // CommonJS 1453 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1454 } 1455 else {} 1456}(this, function (CryptoJS) { 1457 1458 /** 1459 * Zero padding strategy. 1460 */ 1461 CryptoJS.pad.ZeroPadding = { 1462 pad: function (data, blockSize) { 1463 // Shortcut 1464 var blockSizeBytes = blockSize * 4; 1465 1466 // Pad 1467 data.clamp(); 1468 data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); 1469 }, 1470 1471 unpad: function (data) { 1472 // Shortcut 1473 var dataWords = data.words; 1474 1475 // Unpad 1476 var i = data.sigBytes - 1; 1477 for (var i = data.sigBytes - 1; i >= 0; i--) { 1478 if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { 1479 data.sigBytes = i + 1; 1480 break; 1481 } 1482 } 1483 } 1484 }; 1485 1486 1487 return CryptoJS.pad.ZeroPadding; 1488 1489})); 1490 1491/***/ }), 1492 1493/***/ 185: 1494/***/ (function(module, exports, __webpack_require__) { 1495 1496;(function (root, factory, undef) { 1497 if (true) { 1498 // CommonJS 1499 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(5)); 1500 } 1501 else {} 1502}(this, function (CryptoJS) { 1503 1504 /** 1505 * A noop padding strategy. 1506 */ 1507 CryptoJS.pad.NoPadding = { 1508 pad: function () { 1509 }, 1510 1511 unpad: function () { 1512 } 1513 }; 1514 1515 1516 return CryptoJS.pad.NoPadding; 1517 1518})); 1519 1520/***/ }), 1521 1522/***/ 188: 1523/***/ (function(module, exports, __webpack_require__) { 1524 1525;(function (root, factory, undef) { 1526 if (true) { 1527 // CommonJS 1528 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(20), __webpack_require__(21), __webpack_require__(18), __webpack_require__(5)); 1529 } 1530 else {} 1531}(this
vendor: 24,425 bytes, lines 1531-2296
1531, function (CryptoJS) { 1532 1533 (function () { 1534 // Shortcuts 1535 var C = CryptoJS; 1536 var C_lib = C.lib; 1537 var WordArray = C_lib.WordArray; 1538 var BlockCipher = C_lib.BlockCipher; 1539 var C_algo = C.algo; 1540 1541 // Permuted Choice 1 constants 1542 var PC1 = [ 1543 57, 49, 41, 33, 25, 17, 9, 1, 1544 58, 50, 42, 34, 26, 18, 10, 2, 1545 59, 51, 43, 35, 27, 19, 11, 3, 1546 60, 52, 44, 36, 63, 55, 47, 39, 1547 31, 23, 15, 7, 62, 54, 46, 38, 1548 30, 22, 14, 6, 61, 53, 45, 37, 1549 29, 21, 13, 5, 28, 20, 12, 4 1550 ]; 1551 1552 // Permuted Choice 2 constants 1553 var PC2 = [ 1554 14, 17, 11, 24, 1, 5, 1555 3, 28, 15, 6, 21, 10, 1556 23, 19, 12, 4, 26, 8, 1557 16, 7, 27, 20, 13, 2, 1558 41, 52, 31, 37, 47, 55, 1559 30, 40, 51, 45, 33, 48, 1560 44, 49, 39, 56, 34, 53, 1561 46, 42, 50, 36, 29, 32 1562 ]; 1563 1564 // Cumulative bit shift constants 1565 var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; 1566 1567 // SBOXes and round permutation constants 1568 var SBOX_P = [ 1569 { 1570 0x0: 0x808200, 1571 0x10000000: 0x8000, 1572 0x20000000: 0x808002, 1573 0x30000000: 0x2, 1574 0x40000000: 0x200, 1575 0x50000000: 0x808202, 1576 0x60000000: 0x800202, 1577 0x70000000: 0x800000, 1578 0x80000000: 0x202, 1579 0x90000000: 0x800200, 1580 0xa0000000: 0x8200, 1581 0xb0000000: 0x808000, 1582 0xc0000000: 0x8002, 1583 0xd0000000: 0x800002, 1584 0xe0000000: 0x0, 1585 0xf0000000: 0x8202, 1586 0x8000000: 0x0, 1587 0x18000000: 0x808202, 1588 0x28000000: 0x8202, 1589 0x38000000: 0x8000, 1590 0x48000000: 0x808200, 1591 0x58000000: 0x200, 1592 0x68000000: 0x808002, 1593 0x78000000: 0x2, 1594 0x88000000: 0x800200, 1595 0x98000000: 0x8200, 1596 0xa8000000: 0x808000, 1597 0xb8000000: 0x800202, 1598 0xc8000000: 0x800002, 1599 0xd8000000: 0x8002, 1600 0xe8000000: 0x202, 1601 0xf8000000: 0x800000, 1602 0x1: 0x8000, 1603 0x10000001: 0x2, 1604 0x20000001: 0x808200, 1605 0x30000001: 0x800000, 1606 0x40000001: 0x808002, 1607 0x50000001: 0x8200, 1608 0x60000001: 0x200, 1609 0x70000001: 0x800202, 1610 0x80000001: 0x808202, 1611 0x90000001: 0x808000, 1612 0xa0000001: 0x800002, 1613 0xb0000001: 0x8202, 1614 0xc0000001: 0x202, 1615 0xd0000001: 0x800200, 1616 0xe0000001: 0x8002, 1617 0xf0000001: 0x0, 1618 0x8000001: 0x808202, 1619 0x18000001: 0x808000, 1620 0x28000001: 0x800000, 1621 0x38000001: 0x200, 1622 0x48000001: 0x8000, 1623 0x58000001: 0x800002, 1624 0x68000001: 0x2, 1625 0x78000001: 0x8202, 1626 0x88000001: 0x8002, 1627 0x98000001: 0x800202, 1628 0xa8000001: 0x202, 1629 0xb8000001: 0x808200, 1630 0xc8000001: 0x800200, 1631 0xd8000001: 0x0, 1632 0xe8000001: 0x8200, 1633 0xf8000001: 0x808002 1634 }, 1635 { 1636 0x0: 0x40084010, 1637 0x1000000: 0x4000, 1638 0x2000000: 0x80000, 1639 0x3000000: 0x40080010, 1640 0x4000000: 0x40000010, 1641 0x5000000: 0x40084000, 1642 0x6000000: 0x40004000, 1643 0x7000000: 0x10, 1644 0x8000000: 0x84000, 1645 0x9000000: 0x40004010, 1646 0xa000000: 0x40000000, 1647 0xb000000: 0x84010, 1648 0xc000000: 0x80010, 1649 0xd000000: 0x0, 1650 0xe000000: 0x4010, 1651 0xf000000: 0x40080000, 1652 0x800000: 0x40004000, 1653 0x1800000: 0x84010, 1654 0x2800000: 0x10, 1655 0x3800000: 0x40004010, 1656 0x4800000: 0x40084010, 1657 0x5800000: 0x40000000, 1658 0x6800000: 0x80000, 1659 0x7800000: 0x40080010, 1660 0x8800000: 0x80010, 1661 0x9800000: 0x0, 1662 0xa800000: 0x4000, 1663 0xb800000: 0x40080000, 1664 0xc800000: 0x40000010, 1665 0xd800000: 0x84000, 1666 0xe800000: 0x40084000, 1667 0xf800000: 0x4010, 1668 0x10000000: 0x0, 1669 0x11000000: 0x40080010, 1670 0x12000000: 0x40004010, 1671 0x13000000: 0x40084000, 1672 0x14000000: 0x40080000, 1673 0x15000000: 0x10, 1674 0x16000000: 0x84010, 1675 0x17000000: 0x4000, 1676 0x18000000: 0x4010, 1677 0x19000000: 0x80000, 1678 0x1a000000: 0x80010, 1679 0x1b000000: 0x40000010, 1680 0x1c000000: 0x84000, 1681 0x1d000000: 0x40004000, 1682 0x1e000000: 0x40000000, 1683 0x1f000000: 0x40084010, 1684 0x10800000: 0x84010, 1685 0x11800000: 0x80000, 1686 0x12800000: 0x40080000, 1687 0x13800000: 0x4000, 1688 0x14800000: 0x40004000, 1689 0x15800000: 0x40084010, 1690 0x16800000: 0x10, 1691 0x17800000: 0x40000000, 1692 0x18800000: 0x40084000, 1693 0x19800000: 0x40000010, 1694 0x1a800000: 0x40004010, 1695 0x1b800000: 0x80010, 1696 0x1c800000: 0x0, 1697 0x1d800000: 0x4010, 1698 0x1e800000: 0x40080010, 1699 0x1f800000: 0x84000 1700 }, 1701 { 1702 0x0: 0x104, 1703 0x100000: 0x0, 1704 0x200000: 0x4000100, 1705 0x300000: 0x10104, 1706 0x400000: 0x10004, 1707 0x500000: 0x4000004, 1708 0x600000: 0x4010104, 1709 0x700000: 0x4010000, 1710 0x800000: 0x4000000, 1711 0x900000: 0x4010100, 1712 0xa00000: 0x10100, 1713 0xb00000: 0x4010004, 1714 0xc00000: 0x4000104, 1715 0xd00000: 0x10000, 1716 0xe00000: 0x4, 1717 0xf00000: 0x100, 1718 0x80000: 0x4010100, 1719 0x180000: 0x4010004, 1720 0x280000: 0x0, 1721 0x380000: 0x4000100, 1722 0x480000: 0x4000004, 1723 0x580000: 0x10000, 1724 0x680000: 0x10004, 1725 0x780000: 0x104, 1726 0x880000: 0x4, 1727 0x980000: 0x100, 1728 0xa80000: 0x4010000, 1729 0xb80000: 0x10104, 1730 0xc80000: 0x10100, 1731 0xd80000: 0x4000104, 1732 0xe80000: 0x4010104, 1733 0xf80000: 0x4000000, 1734 0x1000000: 0x4010100, 1735 0x1100000: 0x10004, 1736 0x1200000: 0x10000, 1737 0x1300000: 0x4000100, 1738 0x1400000: 0x100, 1739 0x1500000: 0x4010104, 1740 0x1600000: 0x4000004, 1741 0x1700000: 0x0, 1742 0x1800000: 0x4000104, 1743 0x1900000: 0x4000000, 1744 0x1a00000: 0x4, 1745 0x1b00000: 0x10100, 1746 0x1c00000: 0x4010000, 1747 0x1d00000: 0x104, 1748 0x1e00000: 0x10104, 1749 0x1f00000: 0x4010004, 1750 0x1080000: 0x4000000, 1751 0x1180000: 0x104, 1752 0x1280000: 0x4010100, 1753 0x1380000: 0x0, 1754 0x1480000: 0x10004, 1755 0x1580000: 0x4000100, 1756 0x1680000: 0x100, 1757 0x1780000: 0x4010004, 1758 0x1880000: 0x10000, 1759 0x1980000: 0x4010104, 1760 0x1a80000: 0x10104, 1761 0x1b80000: 0x4000004, 1762 0x1c80000: 0x4000104, 1763 0x1d80000: 0x4010000, 1764 0x1e80000: 0x4, 1765 0x1f80000: 0x10100 1766 }, 1767 { 1768 0x0: 0x80401000, 1769 0x10000: 0x80001040, 1770 0x20000: 0x401040, 1771 0x30000: 0x80400000, 1772 0x40000: 0x0, 1773 0x50000: 0x401000, 1774 0x60000: 0x80000040, 1775 0x70000: 0x400040, 1776 0x80000: 0x80000000, 1777 0x90000: 0x400000, 1778 0xa0000: 0x40, 1779 0xb0000: 0x80001000, 1780 0xc0000: 0x80400040, 1781 0xd0000: 0x1040, 1782 0xe0000: 0x1000, 1783 0xf0000: 0x80401040, 1784 0x8000: 0x80001040, 1785 0x18000: 0x40, 1786 0x28000: 0x80400040, 1787 0x38000: 0x80001000, 1788 0x48000: 0x401000, 1789 0x58000: 0x80401040, 1790 0x68000: 0x0, 1791 0x78000: 0x80400000, 1792 0x88000: 0x1000, 1793 0x98000: 0x80401000, 1794 0xa8000: 0x400000, 1795 0xb8000: 0x1040, 1796 0xc8000: 0x80000000, 1797 0xd8000: 0x400040, 1798 0xe8000: 0x401040, 1799 0xf8000: 0x80000040, 1800 0x100000: 0x400040, 1801 0x110000: 0x401000, 1802 0x120000: 0x80000040, 1803 0x130000: 0x0, 1804 0x140000: 0x1040, 1805 0x150000: 0x80400040, 1806 0x160000: 0x80401000, 1807 0x170000: 0x80001040, 1808 0x180000: 0x80401040, 1809 0x190000: 0x80000000, 1810 0x1a0000: 0x80400000, 1811 0x1b0000: 0x401040, 1812 0x1c0000: 0x80001000, 1813 0x1d0000: 0x400000, 1814 0x1e0000: 0x40, 1815 0x1f0000: 0x1000, 1816 0x108000: 0x80400000, 1817 0x118000: 0x80401040, 1818 0x128000: 0x0, 1819 0x138000: 0x401000, 1820 0x148000: 0x400040, 1821 0x158000: 0x80000000, 1822 0x168000: 0x80001040, 1823 0x178000: 0x40, 1824 0x188000: 0x80000040, 1825 0x198000: 0x1000, 1826 0x1a8000: 0x80001000, 1827 0x1b8000: 0x80400040, 1828 0x1c8000: 0x1040, 1829 0x1d8000: 0x80401000, 1830 0x1e8000: 0x400000, 1831 0x1f8000: 0x401040 1832 }, 1833 { 1834 0x0: 0x80, 1835 0x1000: 0x1040000, 1836 0x2000: 0x40000, 1837 0x3000: 0x20000000, 1838 0x4000: 0x20040080, 1839 0x5000: 0x1000080, 1840 0x6000: 0x21000080, 1841 0x7000: 0x40080, 1842 0x8000: 0x1000000, 1843 0x9000: 0x20040000, 1844 0xa000: 0x20000080, 1845 0xb000: 0x21040080, 1846 0xc000: 0x21040000, 1847 0xd000: 0x0, 1848 0xe000: 0x1040080, 1849 0xf000: 0x21000000, 1850 0x800: 0x1040080, 1851 0x1800: 0x21000080, 1852 0x2800: 0x80, 1853 0x3800: 0x1040000, 1854 0x4800: 0x40000, 1855 0x5800: 0x20040080, 1856 0x6800: 0x21040000, 1857 0x7800: 0x20000000, 1858 0x8800: 0x20040000, 1859 0x9800: 0x0, 1860 0xa800: 0x21040080, 1861 0xb800: 0x1000080, 1862 0xc800: 0x20000080, 1863 0xd800: 0x21000000, 1864 0xe800: 0x1000000, 1865 0xf800: 0x40080, 1866 0x10000: 0x40000, 1867 0x11000: 0x80, 1868 0x12000: 0x20000000, 1869 0x13000: 0x21000080, 1870 0x14000: 0x1000080, 1871 0x15000: 0x21040000, 1872 0x16000: 0x20040080, 1873 0x17000: 0x1000000, 1874 0x18000: 0x21040080, 1875 0x19000: 0x21000000, 1876 0x1a000: 0x1040000, 1877 0x1b000: 0x20040000, 1878 0x1c000: 0x40080, 1879 0x1d000: 0x20000080, 1880 0x1e000: 0x0, 1881 0x1f000: 0x1040080, 1882 0x10800: 0x21000080, 1883 0x11800: 0x1000000, 1884 0x12800: 0x1040000, 1885 0x13800: 0x20040080, 1886 0x14800: 0x20000000, 1887 0x15800: 0x1040080, 1888 0x16800: 0x80, 1889 0x17800: 0x21040000, 1890 0x18800: 0x40080, 1891 0x19800: 0x21040080, 1892 0x1a800: 0x0, 1893 0x1b800: 0x21000000, 1894 0x1c800: 0x1000080, 1895 0x1d800: 0x40000, 1896 0x1e800: 0x20040000, 1897 0x1f800: 0x20000080 1898 }, 1899 { 1900 0x0: 0x10000008, 1901 0x100: 0x2000, 1902 0x200: 0x10200000, 1903 0x300: 0x10202008, 1904 0x400: 0x10002000, 1905 0x500: 0x200000, 1906 0x600: 0x200008, 1907 0x700: 0x10000000, 1908 0x800: 0x0, 1909 0x900: 0x10002008, 1910 0xa00: 0x202000, 1911 0xb00: 0x8, 1912 0xc00: 0x10200008, 1913 0xd00: 0x202008, 1914 0xe00: 0x2008, 1915 0xf00: 0x10202000, 1916 0x80: 0x10200000, 1917 0x180: 0x10202008, 1918 0x280: 0x8, 1919 0x380: 0x200000, 1920 0x480: 0x202008, 1921 0x580: 0x10000008, 1922 0x680: 0x10002000, 1923 0x780: 0x2008, 1924 0x880: 0x200008, 1925 0x980: 0x2000, 1926 0xa80: 0x10002008, 1927 0xb80: 0x10200008, 1928 0xc80: 0x0, 1929 0xd80: 0x10202000, 1930 0xe80: 0x202000, 1931 0xf80: 0x10000000, 1932 0x1000: 0x10002000, 1933 0x1100: 0x10200008, 1934 0x1200: 0x10202008, 1935 0x1300: 0x2008, 1936 0x1400: 0x200000, 1937 0x1500: 0x10000000, 1938 0x1600: 0x10000008, 1939 0x1700: 0x202000, 1940 0x1800: 0x202008, 1941 0x1900: 0x0, 1942 0x1a00: 0x8, 1943 0x1b00: 0x10200000, 1944 0x1c00: 0x2000, 1945 0x1d00: 0x10002008, 1946 0x1e00: 0x10202000, 1947 0x1f00: 0x200008, 1948 0x1080: 0x8, 1949 0x1180: 0x202000, 1950 0x1280: 0x200000, 1951 0x1380: 0x10000008, 1952 0x1480: 0x10002000, 1953 0x1580: 0x2008, 1954 0x1680: 0x10202008, 1955 0x1780: 0x10200000, 1956 0x1880: 0x10202000, 1957 0x1980: 0x10200008, 1958 0x1a80: 0x2000, 1959 0x1b80: 0x202008, 1960 0x1c80: 0x200008, 1961 0x1d80: 0x0, 1962 0x1e80: 0x10000000, 1963 0x1f80: 0x10002008 1964 }, 1965 { 1966 0x0: 0x100000, 1967 0x10: 0x2000401, 1968 0x20: 0x400, 1969 0x30: 0x100401, 1970 0x40: 0x2100401, 1971 0x50: 0x0, 1972 0x60: 0x1, 1973 0x70: 0x2100001, 1974 0x80: 0x2000400, 1975 0x90: 0x100001, 1976 0xa0: 0x2000001, 1977 0xb0: 0x2100400, 1978 0xc0: 0x2100000, 1979 0xd0: 0x401, 1980 0xe0: 0x100400, 1981 0xf0: 0x2000000, 1982 0x8: 0x2100001, 1983 0x18: 0x0, 1984 0x28: 0x2000401, 1985 0x38: 0x2100400, 1986 0x48: 0x100000, 1987 0x58: 0x2000001, 1988 0x68: 0x2000000, 1989 0x78: 0x401, 1990 0x88: 0x100401, 1991 0x98: 0x2000400, 1992 0xa8: 0x2100000, 1993 0xb8: 0x100001, 1994 0xc8: 0x400, 1995 0xd8: 0x2100401, 1996 0xe8: 0x1, 1997 0xf8: 0x100400, 1998 0x100: 0x2000000, 1999 0x110: 0x100000, 2000 0x120: 0x2000401, 2001 0x130: 0x2100001, 2002 0x140: 0x100001, 2003 0x150: 0x2000400, 2004 0x160: 0x2100400, 2005 0x170: 0x100401, 2006 0x180: 0x401, 2007 0x190: 0x2100401, 2008 0x1a0: 0x100400, 2009 0x1b0: 0x1, 2010 0x1c0: 0x0, 2011 0x1d0: 0x2100000, 2012 0x1e0: 0x2000001, 2013 0x1f0: 0x400, 2014 0x108: 0x100400, 2015 0x118: 0x2000401, 2016 0x128: 0x2100001, 2017 0x138: 0x1, 2018 0x148: 0x2000000, 2019 0x158: 0x100000, 2020 0x168: 0x401, 2021 0x178: 0x2100400, 2022 0x188: 0x2000001, 2023 0x198: 0x2100000, 2024 0x1a8: 0x0, 2025 0x1b8: 0x2100401, 2026 0x1c8: 0x100401, 2027 0x1d8: 0x400, 2028 0x1e8: 0x2000400, 2029 0x1f8: 0x100001 2030 }, 2031 { 2032 0x0: 0x8000820, 2033 0x1: 0x20000, 2034 0x2: 0x8000000, 2035 0x3: 0x20, 2036 0x4: 0x20020, 2037 0x5: 0x8020820, 2038 0x6: 0x8020800, 2039 0x7: 0x800, 2040 0x8: 0x8020000, 2041 0x9: 0x8000800, 2042 0xa: 0x20800, 2043 0xb: 0x8020020, 2044 0xc: 0x820, 2045 0xd: 0x0, 2046 0xe: 0x8000020, 2047 0xf: 0x20820, 2048 0x80000000: 0x800, 2049 0x80000001: 0x8020820, 2050 0x80000002: 0x8000820, 2051 0x80000003: 0x8000000, 2052 0x80000004: 0x8020000, 2053 0x80000005: 0x20800, 2054 0x80000006: 0x20820, 2055 0x80000007: 0x20, 2056 0x80000008: 0x8000020, 2057 0x80000009: 0x820, 2058 0x8000000a: 0x20020, 2059 0x8000000b: 0x8020800, 2060 0x8000000c: 0x0, 2061 0x8000000d: 0x8020020, 2062 0x8000000e: 0x8000800, 2063 0x8000000f: 0x20000, 2064 0x10: 0x20820, 2065 0x11: 0x8020800, 2066 0x12: 0x20, 2067 0x13: 0x800, 2068 0x14: 0x8000800, 2069 0x15: 0x8000020, 2070 0x16: 0x8020020, 2071 0x17: 0x20000, 2072 0x18: 0x0, 2073 0x19: 0x20020, 2074 0x1a: 0x8020000, 2075 0x1b: 0x8000820, 2076 0x1c: 0x8020820, 2077 0x1d: 0x20800, 2078 0x1e: 0x820, 2079 0x1f: 0x8000000, 2080 0x80000010: 0x20000, 2081 0x80000011: 0x800, 2082 0x80000012: 0x8020020, 2083 0x80000013: 0x20820, 2084 0x80000014: 0x20, 2085 0x80000015: 0x8020000, 2086 0x80000016: 0x8000000, 2087 0x80000017: 0x8000820, 2088 0x80000018: 0x8020820, 2089 0x80000019: 0x8000020, 2090 0x8000001a: 0x8000800, 2091 0x8000001b: 0x0, 2092 0x8000001c: 0x20800, 2093 0x8000001d: 0x820, 2094 0x8000001e: 0x20020, 2095 0x8000001f: 0x8020800 2096 } 2097 ]; 2098 2099 // Masks that select the SBOX input 2100 var SBOX_MASK = [ 2101 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, 2102 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f 2103 ]; 2104 2105 /** 2106 * DES block cipher algorithm. 2107 */ 2108 var DES = C_algo.DES = BlockCipher.extend({ 2109 _doReset: function () { 2110 // Shortcuts 2111 var key = this._key; 2112 var keyWords = key.words; 2113 2114 // Select 56 bits according to PC1 2115 var keyBits = []; 2116 for (var i = 0; i < 56; i++) { 2117 var keyBitPos = PC1[i] - 1; 2118 keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; 2119 } 2120 2121 // Assemble 16 subkeys 2122 var subKeys = this._subKeys = []; 2123 for (var nSubKey = 0; nSubKey < 16; nSubKey++) { 2124 // Create subkey 2125 var subKey = subKeys[nSubKey] = []; 2126 2127 // Shortcut 2128 var bitShift = BIT_SHIFTS[nSubKey]; 2129 2130 // Select 48 bits according to PC2 2131 for (var i = 0; i < 24; i++) { 2132 // Select from the left 28 key bits 2133 subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); 2134 2135 // Select from the right 28 key bits 2136 subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); 2137 } 2138 2139 // Since each subkey is applied to an expanded 32-bit input, 2140 // the subkey can be broken into 8 values scaled to 32-bits, 2141 // which allows the key to be used without expansion 2142 subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); 2143 for (var i = 1; i < 7; i++) { 2144 subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); 2145 } 2146 subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); 2147 } 2148 2149 // Compute inverse subkeys 2150 var invSubKeys = this._invSubKeys = []; 2151 for (var i = 0; i < 16; i++) { 2152 invSubKeys[i] = subKeys[15 - i]; 2153 } 2154 }, 2155 2156 encryptBlock: function (M, offset) { 2157 this._doCryptBlock(M, offset, this._subKeys); 2158 }, 2159 2160 decryptBlock: function (M, offset) { 2161 this._doCryptBlock(M, offset, this._invSubKeys); 2162 }, 2163 2164 _doCryptBlock: function (M, offset, subKeys) { 2165 // Get input 2166 this._lBlock = M[offset]; 2167 this._rBlock = M[offset + 1]; 2168 2169 // Initial permutation 2170 exchangeLR.call(this, 4, 0x0f0f0f0f); 2171 exchangeLR.call(this, 16, 0x0000ffff); 2172 exchangeRL.call(this, 2, 0x33333333); 2173 exchangeRL.call(this, 8, 0x00ff00ff); 2174 exchangeLR.call(this, 1, 0x55555555); 2175 2176 // Rounds 2177 for (var round = 0; round < 16; round++) { 2178 // Shortcuts 2179 var subKey = subKeys[round]; 2180 var lBlock = this._lBlock; 2181 var rBlock = this._rBlock; 2182 2183 // Feistel function 2184 var f = 0; 2185 for (var i = 0; i < 8; i++) { 2186 f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; 2187 } 2188 this._lBlock = rBlock; 2189 this._rBlock = lBlock ^ f; 2190 } 2191 2192 // Undo swap from last round 2193 var t = this._lBlock; 2194 this._lBlock = this._rBlock; 2195 this._rBlock = t; 2196 2197 // Final permutation 2198 exchangeLR.call(this, 1, 0x55555555); 2199 exchangeRL.call(this, 8, 0x00ff00ff); 2200 exchangeRL.call(this, 2, 0x33333333); 2201 exchangeLR.call(this, 16, 0x0000ffff); 2202 exchangeLR.call(this, 4, 0x0f0f0f0f); 2203 2204 // Set output 2205 M[offset] = this._lBlock; 2206 M[offset + 1] = this._rBlock; 2207 }, 2208 2209 keySize: 64/32, 2210 2211 ivSize: 64/32, 2212 2213 blockSize: 64/32 2214 }); 2215 2216 // Swap bits across the left and right words 2217 function exchangeLR(offset, mask) { 2218 var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; 2219 this._rBlock ^= t; 2220 this._lBlock ^= t << offset; 2221 } 2222 2223 function exchangeRL(offset, mask) { 2224 var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; 2225 this._lBlock ^= t; 2226 this._rBlock ^= t << offset; 2227 } 2228 2229 /** 2230 * Shortcut functions to the cipher's object interface. 2231 * 2232 * @example 2233 * 2234 * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); 2235 * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); 2236 */ 2237 C.DES = BlockCipher._createHelper(DES); 2238 2239 /** 2240 * Triple-DES block cipher algorithm. 2241 */ 2242 var TripleDES = C_algo.TripleDES = BlockCipher.extend({ 2243 _doReset: function () { 2244 // Shortcuts 2245 var key = this._key; 2246 var keyWords = key.words; 2247 // Make sure the key length is valid (64, 128 or >= 192 bit) 2248 if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { 2249 throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); 2250 } 2251 2252 // Extend the key according to the keying options defined in 3DES standard 2253 var key1 = keyWords.slice(0, 2); 2254 var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); 2255 var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); 2256 2257 // Create DES instances 2258 this._des1 = DES.createEncryptor(WordArray.create(key1)); 2259 this._des2 = DES.createEncryptor(WordArray.create(key2)); 2260 this._des3 = DES.createEncryptor(WordArray.create(key3)); 2261 }, 2262 2263 encryptBlock: function (M, offset) { 2264 this._des1.encryptBlock(M, offset); 2265 this._des2.decryptBlock(M, offset); 2266 this._des3.encryptBlock(M, offset); 2267 }, 2268 2269 decryptBlock: function (M, offset) { 2270 this._des3.decryptBlock(M, offset); 2271 this._des2.encryptBlock(M, offset); 2272 this._des1.decryptBlock(M, offset); 2273 }, 2274 2275 keySize: 192/32, 2276 2277 ivSize: 64/32, 2278 2279 blockSize: 64/32 2280 }); 2281 2282 /** 2283 * Shortcut functions to the cipher's object interface. 2284 * 2285 * @example 2286 * 2287 * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); 2288 * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); 2289 */ 2290 C.TripleDES = BlockCipher._createHelper(TripleDES); 2291 }()); 2292 2293 2294 return CryptoJS.TripleDES; 2295 2296}));
vendor: 11,044 bytes, lines 2297-2663
2297 2298/***/ }), 2299 2300/***/ 189: 2301/***/ (function(module, exports, __webpack_require__) { 2302 2303;(function (root, factory, undef) { 2304 if (true) { 2305 // CommonJS 2306 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(20), __webpack_require__(21), __webpack_require__(18), __webpack_require__(5)); 2307 } 2308 else {} 2309}(this, function (CryptoJS) { 2310 2311 (function () { 2312 // Shortcuts 2313 var C = CryptoJS; 2314 var C_lib = C.lib; 2315 var StreamCipher = C_lib.StreamCipher; 2316 var C_algo = C.algo; 2317 2318 /** 2319 * RC4 stream cipher algorithm. 2320 */ 2321 var RC4 = C_algo.RC4 = StreamCipher.extend({ 2322 _doReset: function () { 2323 // Shortcuts 2324 var key = this._key; 2325 var keyWords = key.words; 2326 var keySigBytes = key.sigBytes; 2327 2328 // Init sbox 2329 var S = this._S = []; 2330 for (var i = 0; i < 256; i++) { 2331 S[i] = i; 2332 } 2333 2334 // Key setup 2335 for (var i = 0, j = 0; i < 256; i++) { 2336 var keyByteIndex = i % keySigBytes; 2337 var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; 2338 2339 j = (j + S[i] + keyByte) % 256; 2340 2341 // Swap 2342 var t = S[i]; 2343 S[i] = S[j]; 2344 S[j] = t; 2345 } 2346 2347 // Counters 2348 this._i = this._j = 0; 2349 }, 2350 2351 _doProcessBlock: function (M, offset) { 2352 M[offset] ^= generateKeystreamWord.call(this); 2353 }, 2354 2355 keySize: 256/32, 2356 2357 ivSize: 0 2358 }); 2359 2360 function generateKeystreamWord() { 2361 // Shortcuts 2362 var S = this._S; 2363 var i = this._i; 2364 var j = this._j; 2365 2366 // Generate keystream word 2367 var keystreamWord = 0; 2368 for (var n = 0; n < 4; n++) { 2369 i = (i + 1) % 256; 2370 j = (j + S[i]) % 256; 2371 2372 // Swap 2373 var t = S[i]; 2374 S[i] = S[j]; 2375 S[j] = t; 2376 2377 keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); 2378 } 2379 2380 // Update counters 2381 this._i = i; 2382 this._j = j; 2383 2384 return keystreamWord; 2385 } 2386 2387 /** 2388 * Shortcut functions to the cipher's object interface. 2389 * 2390 * @example 2391 * 2392 * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); 2393 * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); 2394 */ 2395 C.RC4 = StreamCipher._createHelper(RC4); 2396 2397 /** 2398 * Modified RC4 stream cipher algorithm. 2399 */ 2400 var RC4Drop = C_algo.RC4Drop = RC4.extend({ 2401 /** 2402 * Configuration options. 2403 * 2404 * @property {number} drop The number of keystream words to drop. Default 192 2405 */ 2406 cfg: RC4.cfg.extend({ 2407 drop: 192 2408 }), 2409 2410 _doReset: function () { 2411 RC4._doReset.call(this); 2412 2413 // Drop 2414 for (var i = this.cfg.drop; i > 0; i--) { 2415 generateKeystreamWord.call(this); 2416 } 2417 } 2418 }); 2419 2420 /** 2421 * Shortcut functions to the cipher's object interface. 2422 * 2423 * @example 2424 * 2425 * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); 2426 * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); 2427 */ 2428 C.RC4Drop = StreamCipher._createHelper(RC4Drop); 2429 }()); 2430 2431 2432 return CryptoJS.RC4; 2433 2434})); 2435 2436/***/ }), 2437 2438/***/ 190: 2439/***/ (function(module, exports, __webpack_require__) { 2440 2441;(function (root, factory, undef) { 2442 if (true) { 2443 // CommonJS 2444 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(20), __webpack_require__(21), __webpack_require__(18), __webpack_require__(5)); 2445 } 2446 else {} 2447}(this, function (CryptoJS) { 2448 2449 (function () { 2450 // Shortcuts 2451 var C = CryptoJS; 2452 var C_lib = C.lib; 2453 var StreamCipher = C_lib.StreamCipher; 2454 var C_algo = C.algo; 2455 2456 // Reusable objects 2457 var S = []; 2458 var C_ = []; 2459 var G = []; 2460 2461 /** 2462 * Rabbit stream cipher algorithm 2463 */ 2464 var Rabbit = C_algo.Rabbit = StreamCipher.extend({ 2465 _doReset: function () { 2466 // Shortcuts 2467 var K = this._key.words; 2468 var iv = this.cfg.iv; 2469 2470 // Swap endian 2471 for (var i = 0; i < 4; i++) { 2472 K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | 2473 (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); 2474 } 2475 2476 // Generate initial state values 2477 var X = this._X = [ 2478 K[0], (K[3] << 16) | (K[2] >>> 16), 2479 K[1], (K[0] << 16) | (K[3] >>> 16), 2480 K[2], (K[1] << 16) | (K[0] >>> 16), 2481 K[3], (K[2] << 16) | (K[1] >>> 16) 2482 ]; 2483 2484 // Generate initial counter values 2485 var C = this._C = [ 2486 (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), 2487 (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), 2488 (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), 2489 (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) 2490 ]; 2491 2492 // Carry bit 2493 this._b = 0; 2494 2495 // Iterate the system four times 2496 for (var i = 0; i < 4; i++) { 2497 nextState.call(this); 2498 } 2499 2500 // Modify the counters 2501 for (var i = 0; i < 8; i++) { 2502 C[i] ^= X[(i + 4) & 7]; 2503 } 2504 2505 // IV setup 2506 if (iv) { 2507 // Shortcuts 2508 var IV = iv.words; 2509 var IV_0 = IV[0]; 2510 var IV_1 = IV[1]; 2511 2512 // Generate four subvectors 2513 var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); 2514 var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); 2515 var i1 = (i0 >>> 16) | (i2 & 0xffff0000); 2516 var i3 = (i2 << 16) | (i0 & 0x0000ffff); 2517 2518 // Modify counter values 2519 C[0] ^= i0; 2520 C[1] ^= i1; 2521 C[2] ^= i2; 2522 C[3] ^= i3; 2523 C[4] ^= i0; 2524 C[5] ^= i1; 2525 C[6] ^= i2; 2526 C[7] ^= i3; 2527 2528 // Iterate the system four times 2529 for (var i = 0; i < 4; i++) { 2530 nextState.call(this); 2531 } 2532 } 2533 }, 2534 2535 _doProcessBlock: function (M, offset) { 2536 // Shortcut 2537 var X = this._X; 2538 2539 // Iterate the system 2540 nextState.call(this); 2541 2542 // Generate four keystream words 2543 S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); 2544 S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); 2545 S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); 2546 S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); 2547 2548 for (var i = 0; i < 4; i++) { 2549 // Swap endian 2550 S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | 2551 (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); 2552 2553 // Encrypt 2554 M[offset + i] ^= S[i]; 2555 } 2556 }, 2557 2558 blockSize: 128/32, 2559 2560 ivSize: 64/32 2561 }); 2562 2563 function nextState() { 2564 // Shortcuts 2565 var X = this._X; 2566 var C = this._C; 2567 2568 // Save old counter values 2569 for (var i = 0; i < 8; i++) { 2570 C_[i] = C[i]; 2571 } 2572 2573 // Calculate new counter values 2574 C[0] = (C[0] + 0x4d34d34d + this._b) | 0; 2575 C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; 2576 C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; 2577 C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; 2578 C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; 2579 C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; 2580 C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; 2581 C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; 2582 this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; 2583 2584 // Calculate the g-values 2585 for (var i = 0; i < 8; i++) { 2586 var gx = X[i] + C[i]; 2587 2588 // Construct high and low argument for squaring 2589 var ga = gx & 0xffff; 2590 var gb = gx >>> 16; 2591 2592 // Calculate high and low result of squaring 2593 var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; 2594 var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); 2595 2596 // High XOR low 2597 G[i] = gh ^ gl; 2598 } 2599 2600 // Calculate new state values 2601 X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; 2602 X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; 2603 X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; 2604 X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; 2605 X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; 2606 X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; 2607 X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; 2608 X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; 2609 } 2610 2611 /** 2612 * Shortcut functions to the cipher's object interface. 2613 * 2614 * @example 2615 * 2616 * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); 2617 * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); 2618 */ 2619 C.Rabbit = StreamCipher._createHelper(Rabbit); 2620 }()); 2621 2622 2623 return CryptoJS.Rabbit; 2624 2625})); 2626 2627/***/ }), 2628 2629/***/ 191: 2630/***/ (function(module, exports, __webpack_require__) { 2631 2632;(function (root, factory, undef) { 2633 if (true) { 2634 // CommonJS 2635 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(20), __webpack_require__(21), __webpack_require__(18), __webpack_require__(5)); 2636 } 2637 else {} 2638}(this, function (CryptoJS) { 2639 2640 (function () { 2641 // Shortcuts 2642 var C = CryptoJS; 2643 var C_lib = C.lib; 2644 var StreamCipher = C_lib.StreamCipher; 2645 var C_algo = C.algo; 2646 2647 // Reusable objects 2648 var S = []; 2649 var C_ = []; 2650 var G = []; 2651 2652 /** 2653 * Rabbit stream cipher algorithm. 2654 * 2655 * This is a legacy version that neglected to convert the key to little-endian. 2656 * This error doesn't affect the cipher's security, 2657 * but it does affect its compatibility with other implementations. 2658 */ 2659 var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ 2660 _doReset: function () { 2661 // Shortcuts 2662 var K = this._key.words; 2663 var iv = this.cfg.iv;
vendor: 5,524 bytes, lines 2663-2814
2663 2664 2665 // Generate initial state values 2666 var X = this._X = [ 2667 K[0], (K[3] << 16) | (K[2] >>> 16), 2668 K[1], (K[0] << 16) | (K[3] >>> 16), 2669 K[2], (K[1] << 16) | (K[0] >>> 16), 2670 K[3], (K[2] << 16) | (K[1] >>> 16) 2671 ]; 2672 2673 // Generate initial counter values 2674 var C = this._C = [ 2675 (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), 2676 (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), 2677 (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), 2678 (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) 2679 ]; 2680 2681 // Carry bit 2682 this._b = 0; 2683 2684 // Iterate the system four times 2685 for (var i = 0; i < 4; i++) { 2686 nextState.call(this); 2687 } 2688 2689 // Modify the counters 2690 for (var i = 0; i < 8; i++) { 2691 C[i] ^= X[(i + 4) & 7]; 2692 } 2693 2694 // IV setup 2695 if (iv) { 2696 // Shortcuts 2697 var IV = iv.words; 2698 var IV_0 = IV[0]; 2699 var IV_1 = IV[1]; 2700 2701 // Generate four subvectors 2702 var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); 2703 var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); 2704 var i1 = (i0 >>> 16) | (i2 & 0xffff0000); 2705 var i3 = (i2 << 16) | (i0 & 0x0000ffff); 2706 2707 // Modify counter values 2708 C[0] ^= i0; 2709 C[1] ^= i1; 2710 C[2] ^= i2; 2711 C[3] ^= i3; 2712 C[4] ^= i0; 2713 C[5] ^= i1; 2714 C[6] ^= i2; 2715 C[7] ^= i3; 2716 2717 // Iterate the system four times 2718 for (var i = 0; i < 4; i++) { 2719 nextState.call(this); 2720 } 2721 } 2722 }, 2723 2724 _doProcessBlock: function (M, offset) { 2725 // Shortcut 2726 var X = this._X; 2727 2728 // Iterate the system 2729 nextState.call(this); 2730 2731 // Generate four keystream words 2732 S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); 2733 S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); 2734 S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); 2735 S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); 2736 2737 for (var i = 0; i < 4; i++) { 2738 // Swap endian 2739 S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | 2740 (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); 2741 2742 // Encrypt 2743 M[offset + i] ^= S[i]; 2744 } 2745 }, 2746 2747 blockSize: 128/32, 2748 2749 ivSize: 64/32 2750 }); 2751 2752 function nextState() { 2753 // Shortcuts 2754 var X = this._X; 2755 var C = this._C; 2756 2757 // Save old counter values 2758 for (var i = 0; i < 8; i++) { 2759 C_[i] = C[i]; 2760 } 2761 2762 // Calculate new counter values 2763 C[0] = (C[0] + 0x4d34d34d + this._b) | 0; 2764 C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; 2765 C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; 2766 C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; 2767 C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; 2768 C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; 2769 C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; 2770 C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; 2771 this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; 2772 2773 // Calculate the g-values 2774 for (var i = 0; i < 8; i++) { 2775 var gx = X[i] + C[i]; 2776 2777 // Construct high and low argument for squaring 2778 var ga = gx & 0xffff; 2779 var gb = gx >>> 16; 2780 2781 // Calculate high and low result of squaring 2782 var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; 2783 var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); 2784 2785 // High XOR low 2786 G[i] = gh ^ gl; 2787 } 2788 2789 // Calculate new state values 2790 X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; 2791 X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; 2792 X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; 2793 X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; 2794 X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; 2795 X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; 2796 X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; 2797 X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; 2798 } 2799 2800 /** 2801 * Shortcut functions to the cipher's object interface. 2802 * 2803 * @example 2804 * 2805 * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); 2806 * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); 2807 */ 2808 C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); 2809 }()); 2810 2811 2812 return CryptoJS.RabbitLegacy; 2813 2814}));
vendor: 34,843 bytes, lines 2815-3938
2815 2816/***/ }), 2817 2818/***/ 21: 2819/***/ (function(module, exports, __webpack_require__) { 2820 2821;(function (root, factory) { 2822 if (true) { 2823 // CommonJS 2824 module.exports = exports = factory(__webpack_require__(3)); 2825 } 2826 else {} 2827}(this, function (CryptoJS) { 2828 2829 (function (Math) { 2830 // Shortcuts 2831 var C = CryptoJS; 2832 var C_lib = C.lib; 2833 var WordArray = C_lib.WordArray; 2834 var Hasher = C_lib.Hasher; 2835 var C_algo = C.algo; 2836 2837 // Constants table 2838 var T = []; 2839 2840 // Compute constants 2841 (function () { 2842 for (var i = 0; i < 64; i++) { 2843 T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; 2844 } 2845 }()); 2846 2847 /** 2848 * MD5 hash algorithm. 2849 */ 2850 var MD5 = C_algo.MD5 = Hasher.extend({ 2851 _doReset: function () { 2852 this._hash = new WordArray.init([ 2853 0x67452301, 0xefcdab89, 2854 0x98badcfe, 0x10325476 2855 ]); 2856 }, 2857 2858 _doProcessBlock: function (M, offset) { 2859 // Swap endian 2860 for (var i = 0; i < 16; i++) { 2861 // Shortcuts 2862 var offset_i = offset + i; 2863 var M_offset_i = M[offset_i]; 2864 2865 M[offset_i] = ( 2866 (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | 2867 (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) 2868 ); 2869 } 2870 2871 // Shortcuts 2872 var H = this._hash.words; 2873 2874 var M_offset_0 = M[offset + 0]; 2875 var M_offset_1 = M[offset + 1]; 2876 var M_offset_2 = M[offset + 2]; 2877 var M_offset_3 = M[offset + 3]; 2878 var M_offset_4 = M[offset + 4]; 2879 var M_offset_5 = M[offset + 5]; 2880 var M_offset_6 = M[offset + 6]; 2881 var M_offset_7 = M[offset + 7]; 2882 var M_offset_8 = M[offset + 8]; 2883 var M_offset_9 = M[offset + 9]; 2884 var M_offset_10 = M[offset + 10]; 2885 var M_offset_11 = M[offset + 11]; 2886 var M_offset_12 = M[offset + 12]; 2887 var M_offset_13 = M[offset + 13]; 2888 var M_offset_14 = M[offset + 14]; 2889 var M_offset_15 = M[offset + 15]; 2890 2891 // Working variables 2892 var a = H[0]; 2893 var b = H[1]; 2894 var c = H[2]; 2895 var d = H[3]; 2896 2897 // Computation 2898 a = FF(a, b, c, d, M_offset_0, 7, T[0]); 2899 d = FF(d, a, b, c, M_offset_1, 12, T[1]); 2900 c = FF(c, d, a, b, M_offset_2, 17, T[2]); 2901 b = FF(b, c, d, a, M_offset_3, 22, T[3]); 2902 a = FF(a, b, c, d, M_offset_4, 7, T[4]); 2903 d = FF(d, a, b, c, M_offset_5, 12, T[5]); 2904 c = FF(c, d, a, b, M_offset_6, 17, T[6]); 2905 b = FF(b, c, d, a, M_offset_7, 22, T[7]); 2906 a = FF(a, b, c, d, M_offset_8, 7, T[8]); 2907 d = FF(d, a, b, c, M_offset_9, 12, T[9]); 2908 c = FF(c, d, a, b, M_offset_10, 17, T[10]); 2909 b = FF(b, c, d, a, M_offset_11, 22, T[11]); 2910 a = FF(a, b, c, d, M_offset_12, 7, T[12]); 2911 d = FF(d, a, b, c, M_offset_13, 12, T[13]); 2912 c = FF(c, d, a, b, M_offset_14, 17, T[14]); 2913 b = FF(b, c, d, a, M_offset_15, 22, T[15]); 2914 2915 a = GG(a, b, c, d, M_offset_1, 5, T[16]); 2916 d = GG(d, a, b, c, M_offset_6, 9, T[17]); 2917 c = GG(c, d, a, b, M_offset_11, 14, T[18]); 2918 b = GG(b, c, d, a, M_offset_0, 20, T[19]); 2919 a = GG(a, b, c, d, M_offset_5, 5, T[20]); 2920 d = GG(d, a, b, c, M_offset_10, 9, T[21]); 2921 c = GG(c, d, a, b, M_offset_15, 14, T[22]); 2922 b = GG(b, c, d, a, M_offset_4, 20, T[23]); 2923 a = GG(a, b, c, d, M_offset_9, 5, T[24]); 2924 d = GG(d, a, b, c, M_offset_14, 9, T[25]); 2925 c = GG(c, d, a, b, M_offset_3, 14, T[26]); 2926 b = GG(b, c, d, a, M_offset_8, 20, T[27]); 2927 a = GG(a, b, c, d, M_offset_13, 5, T[28]); 2928 d = GG(d, a, b, c, M_offset_2, 9, T[29]); 2929 c = GG(c, d, a, b, M_offset_7, 14, T[30]); 2930 b = GG(b, c, d, a, M_offset_12, 20, T[31]); 2931 2932 a = HH(a, b, c, d, M_offset_5, 4, T[32]); 2933 d = HH(d, a, b, c, M_offset_8, 11, T[33]); 2934 c = HH(c, d, a, b, M_offset_11, 16, T[34]); 2935 b = HH(b, c, d, a, M_offset_14, 23, T[35]); 2936 a = HH(a, b, c, d, M_offset_1, 4, T[36]); 2937 d = HH(d, a, b, c, M_offset_4, 11, T[37]); 2938 c = HH(c, d, a, b, M_offset_7, 16, T[38]); 2939 b = HH(b, c, d, a, M_offset_10, 23, T[39]); 2940 a = HH(a, b, c, d, M_offset_13, 4, T[40]); 2941 d = HH(d, a, b, c, M_offset_0, 11, T[41]); 2942 c = HH(c, d, a, b, M_offset_3, 16, T[42]); 2943 b = HH(b, c, d, a, M_offset_6, 23, T[43]); 2944 a = HH(a, b, c, d, M_offset_9, 4, T[44]); 2945 d = HH(d, a, b, c, M_offset_12, 11, T[45]); 2946 c = HH(c, d, a, b, M_offset_15, 16, T[46]); 2947 b = HH(b, c, d, a, M_offset_2, 23, T[47]); 2948 2949 a = II(a, b, c, d, M_offset_0, 6, T[48]); 2950 d = II(d, a, b, c, M_offset_7, 10, T[49]); 2951 c = II(c, d, a, b, M_offset_14, 15, T[50]); 2952 b = II(b, c, d, a, M_offset_5, 21, T[51]); 2953 a = II(a, b, c, d, M_offset_12, 6, T[52]); 2954 d = II(d, a, b, c, M_offset_3, 10, T[53]); 2955 c = II(c, d, a, b, M_offset_10, 15, T[54]); 2956 b = II(b, c, d, a, M_offset_1, 21, T[55]); 2957 a = II(a, b, c, d, M_offset_8, 6, T[56]); 2958 d = II(d, a, b, c, M_offset_15, 10, T[57]); 2959 c = II(c, d, a, b, M_offset_6, 15, T[58]); 2960 b = II(b, c, d, a, M_offset_13, 21, T[59]); 2961 a = II(a, b, c, d, M_offset_4, 6, T[60]); 2962 d = II(d, a, b, c, M_offset_11, 10, T[61]); 2963 c = II(c, d, a, b, M_offset_2, 15, T[62]); 2964 b = II(b, c, d, a, M_offset_9, 21, T[63]); 2965 2966 // Intermediate hash value 2967 H[0] = (H[0] + a) | 0; 2968 H[1] = (H[1] + b) | 0; 2969 H[2] = (H[2] + c) | 0; 2970 H[3] = (H[3] + d) | 0; 2971 }, 2972 2973 _doFinalize: function () { 2974 // Shortcuts 2975 var data = this._data; 2976 var dataWords = data.words; 2977 2978 var nBitsTotal = this._nDataBytes * 8; 2979 var nBitsLeft = data.sigBytes * 8; 2980 2981 // Add padding 2982 dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 2983 2984 var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); 2985 var nBitsTotalL = nBitsTotal; 2986 dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( 2987 (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | 2988 (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) 2989 ); 2990 dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( 2991 (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | 2992 (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) 2993 ); 2994 2995 data.sigBytes = (dataWords.length + 1) * 4; 2996 2997 // Hash final blocks 2998 this._process(); 2999 3000 // Shortcuts 3001 var hash = this._hash; 3002 var H = hash.words; 3003 3004 // Swap endian 3005 for (var i = 0; i < 4; i++) { 3006 // Shortcut 3007 var H_i = H[i]; 3008 3009 H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | 3010 (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); 3011 } 3012 3013 // Return final computed hash 3014 return hash; 3015 }, 3016 3017 clone: function () { 3018 var clone = Hasher.clone.call(this); 3019 clone._hash = this._hash.clone(); 3020 3021 return clone; 3022 } 3023 }); 3024 3025 function FF(a, b, c, d, x, s, t) { 3026 var n = a + ((b & c) | (~b & d)) + x + t; 3027 return ((n << s) | (n >>> (32 - s))) + b; 3028 } 3029 3030 function GG(a, b, c, d, x, s, t) { 3031 var n = a + ((b & d) | (c & ~d)) + x + t; 3032 return ((n << s) | (n >>> (32 - s))) + b; 3033 } 3034 3035 function HH(a, b, c, d, x, s, t) { 3036 var n = a + (b ^ c ^ d) + x + t; 3037 return ((n << s) | (n >>> (32 - s))) + b; 3038 } 3039 3040 function II(a, b, c, d, x, s, t) { 3041 var n = a + (c ^ (b | ~d)) + x + t; 3042 return ((n << s) | (n >>> (32 - s))) + b; 3043 } 3044 3045 /** 3046 * Shortcut function to the hasher's object interface. 3047 * 3048 * @param {WordArray|string} message The message to hash. 3049 * 3050 * @return {WordArray} The hash. 3051 * 3052 * @static 3053 * 3054 * @example 3055 * 3056 * var hash = CryptoJS.MD5('message'); 3057 * var hash = CryptoJS.MD5(wordArray); 3058 */ 3059 C.MD5 = Hasher._createHelper(MD5); 3060 3061 /** 3062 * Shortcut function to the HMAC's object interface. 3063 * 3064 * @param {WordArray|string} message The message to hash. 3065 * @param {WordArray|string} key The secret key. 3066 * 3067 * @return {WordArray} The HMAC. 3068 * 3069 * @static 3070 * 3071 * @example 3072 * 3073 * var hmac = CryptoJS.HmacMD5(message, key); 3074 */ 3075 C.HmacMD5 = Hasher._createHmacHelper(MD5); 3076 }(Math)); 3077 3078 3079 return CryptoJS.MD5; 3080 3081})); 3082 3083/***/ }), 3084 3085/***/ 22: 3086/***/ (function(module, exports, __webpack_require__) { 3087 3088;(function (root, factory, undef) { 3089 if (true) { 3090 // CommonJS 3091 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(32), __webpack_require__(168), __webpack_require__(169), __webpack_require__(20), __webpack_require__(170), __webpack_require__(21), __webpack_require__(85), __webpack_require__(45), __webpack_require__(171), __webpack_require__(86), __webpack_require__(172), __webpack_require__(173), __webpack_require__(174), __webpack_require__(46), __webpack_require__(175), __webpack_require__(18), __webpack_require__(5), __webpack_require__(176), __webpack_require__(177), __webpack_require__(178), __webpack_require__(179), __webpack_require__(180), __webpack_require__(181), __webpack_require__(182), __webpack_require__(183), __webpack_require__(184), __webpack_require__(185), __webpack_require__(186), __webpack_require__(187), __webpack_require__(188), __webpack_require__(189), __webpack_require__(190), __webpack_require__(191), __webpack_require__(192)); 3092 } 3093 else {} 3094}(this, function (CryptoJS) { 3095 3096 return CryptoJS; 3097 3098})); 3099 3100/***/ }), 3101 3102/***/ 32: 3103/***/ (function(module, exports, __webpack_require__) { 3104 3105;(function (root, factory) { 3106 if (true) { 3107 // CommonJS 3108 module.exports = exports = factory(__webpack_require__(3)); 3109 } 3110 else {} 3111}(this, function (CryptoJS) { 3112 3113 (function (undefined) { 3114 // Shortcuts 3115 var C = CryptoJS; 3116 var C_lib = C.lib; 3117 var Base = C_lib.Base; 3118 var X32WordArray = C_lib.WordArray; 3119 3120 /** 3121 * x64 namespace. 3122 */ 3123 var C_x64 = C.x64 = {}; 3124 3125 /** 3126 * A 64-bit word. 3127 */ 3128 var X64Word = C_x64.Word = Base.extend({ 3129 /** 3130 * Initializes a newly created 64-bit word. 3131 * 3132 * @param {number} high The high 32 bits. 3133 * @param {number} low The low 32 bits. 3134 * 3135 * @example 3136 * 3137 * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); 3138 */ 3139 init: function (high, low) { 3140 this.high = high; 3141 this.low = low; 3142 } 3143 3144 /** 3145 * Bitwise NOTs this word. 3146 * 3147 * @return {X64Word} A new x64-Word object after negating. 3148 * 3149 * @example 3150 * 3151 * var negated = x64Word.not(); 3152 */ 3153 // not: function () { 3154 // var high = ~this.high; 3155 // var low = ~this.low; 3156 3157 // return X64Word.create(high, low); 3158 // }, 3159 3160 /** 3161 * Bitwise ANDs this word with the passed word. 3162 * 3163 * @param {X64Word} word The x64-Word to AND with this word. 3164 * 3165 * @return {X64Word} A new x64-Word object after ANDing. 3166 * 3167 * @example 3168 * 3169 * var anded = x64Word.and(anotherX64Word); 3170 */ 3171 // and: function (word) { 3172 // var high = this.high & word.high; 3173 // var low = this.low & word.low; 3174 3175 // return X64Word.create(high, low); 3176 // }, 3177 3178 /** 3179 * Bitwise ORs this word with the passed word. 3180 * 3181 * @param {X64Word} word The x64-Word to OR with this word. 3182 * 3183 * @return {X64Word} A new x64-Word object after ORing. 3184 * 3185 * @example 3186 * 3187 * var ored = x64Word.or(anotherX64Word); 3188 */ 3189 // or: function (word) { 3190 // var high = this.high | word.high; 3191 // var low = this.low | word.low; 3192 3193 // return X64Word.create(high, low); 3194 // }, 3195 3196 /** 3197 * Bitwise XORs this word with the passed word. 3198 * 3199 * @param {X64Word} word The x64-Word to XOR with this word. 3200 * 3201 * @return {X64Word} A new x64-Word object after XORing. 3202 * 3203 * @example 3204 * 3205 * var xored = x64Word.xor(anotherX64Word); 3206 */ 3207 // xor: function (word) { 3208 // var high = this.high ^ word.high; 3209 // var low = this.low ^ word.low; 3210 3211 // return X64Word.create(high, low); 3212 // }, 3213 3214 /** 3215 * Shifts this word n bits to the left. 3216 * 3217 * @param {number} n The number of bits to shift. 3218 * 3219 * @return {X64Word} A new x64-Word object after shifting. 3220 * 3221 * @example 3222 * 3223 * var shifted = x64Word.shiftL(25); 3224 */ 3225 // shiftL: function (n) { 3226 // if (n < 32) { 3227 // var high = (this.high << n) | (this.low >>> (32 - n)); 3228 // var low = this.low << n; 3229 // } else { 3230 // var high = this.low << (n - 32); 3231 // var low = 0; 3232 // } 3233 3234 // return X64Word.create(high, low); 3235 // }, 3236 3237 /** 3238 * Shifts this word n bits to the right. 3239 * 3240 * @param {number} n The number of bits to shift. 3241 * 3242 * @return {X64Word} A new x64-Word object after shifting. 3243 * 3244 * @example 3245 * 3246 * var shifted = x64Word.shiftR(7); 3247 */ 3248 // shiftR: function (n) { 3249 // if (n < 32) { 3250 // var low = (this.low >>> n) | (this.high << (32 - n)); 3251 // var high = this.high >>> n; 3252 // } else { 3253 // var low = this.high >>> (n - 32); 3254 // var high = 0; 3255 // } 3256 3257 // return X64Word.create(high, low); 3258 // }, 3259 3260 /** 3261 * Rotates this word n bits to the left. 3262 * 3263 * @param {number} n The number of bits to rotate. 3264 * 3265 * @return {X64Word} A new x64-Word object after rotating. 3266 * 3267 * @example 3268 * 3269 * var rotated = x64Word.rotL(25); 3270 */ 3271 // rotL: function (n) { 3272 // return this.shiftL(n).or(this.shiftR(64 - n)); 3273 // }, 3274 3275 /** 3276 * Rotates this word n bits to the right. 3277 * 3278 * @param {number} n The number of bits to rotate. 3279 * 3280 * @return {X64Word} A new x64-Word object after rotating. 3281 * 3282 * @example 3283 * 3284 * var rotated = x64Word.rotR(7); 3285 */ 3286 // rotR: function (n) { 3287 // return this.shiftR(n).or(this.shiftL(64 - n)); 3288 // }, 3289 3290 /** 3291 * Adds this word with the passed word. 3292 * 3293 * @param {X64Word} word The x64-Word to add with this word. 3294 * 3295 * @return {X64Word} A new x64-Word object after adding. 3296 * 3297 * @example 3298 * 3299 * var added = x64Word.add(anotherX64Word); 3300 */ 3301 // add: function (word) { 3302 // var low = (this.low + word.low) | 0; 3303 // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; 3304 // var high = (this.high + word.high + carry) | 0; 3305 3306 // return X64Word.create(high, low); 3307 // } 3308 }); 3309 3310 /** 3311 * An array of 64-bit words. 3312 * 3313 * @property {Array} words The array of CryptoJS.x64.Word objects. 3314 * @property {number} sigBytes The number of significant bytes in this word array. 3315 */ 3316 var X64WordArray = C_x64.WordArray = Base.extend({ 3317 /** 3318 * Initializes a newly created word array. 3319 * 3320 * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. 3321 * @param {number} sigBytes (Optional) The number of significant bytes in the words. 3322 * 3323 * @example 3324 * 3325 * var wordArray = CryptoJS.x64.WordArray.create(); 3326 * 3327 * var wordArray = CryptoJS.x64.WordArray.create([ 3328 * CryptoJS.x64.Word.create(0x00010203, 0x04050607), 3329 * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) 3330 * ]); 3331 * 3332 * var wordArray = CryptoJS.x64.WordArray.create([ 3333 * CryptoJS.x64.Word.create(0x00010203, 0x04050607), 3334 * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) 3335 * ], 10); 3336 */ 3337 init: function (words, sigBytes) { 3338 words = this.words = words || []; 3339 3340 if (sigBytes != undefined) { 3341 this.sigBytes = sigBytes; 3342 } else { 3343 this.sigBytes = words.length * 8; 3344 } 3345 }, 3346 3347 /** 3348 * Converts this 64-bit word array to a 32-bit word array. 3349 * 3350 * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. 3351 * 3352 * @example 3353 * 3354 * var x32WordArray = x64WordArray.toX32(); 3355 */ 3356 toX32: function () { 3357 // Shortcuts 3358 var x64Words = this.words; 3359 var x64WordsLength = x64Words.length; 3360 3361 // Convert 3362 var x32Words = []; 3363 for (var i = 0; i < x64WordsLength; i++) { 3364 var x64Word = x64Words[i]; 3365 x32Words.push(x64Word.high); 3366 x32Words.push(x64Word.low); 3367 } 3368 3369 return X32WordArray.create(x32Words, this.sigBytes); 3370 }, 3371 3372 /** 3373 * Creates a copy of this word array. 3374 * 3375 * @return {X64WordArray} The clone. 3376 * 3377 * @example 3378 * 3379 * var clone = x64WordArray.clone(); 3380 */ 3381 clone: function () { 3382 var clone = Base.clone.call(this); 3383 3384 // Clone "words" array 3385 var words = clone.words = this.words.slice(0); 3386 3387 // Clone each X64Word object 3388 var wordsLength = words.length; 3389 for (var i = 0; i < wordsLength; i++) { 3390 words[i] = words[i].clone(); 3391 } 3392 3393 return clone; 3394 } 3395 }); 3396 }()); 3397 3398 3399 return CryptoJS; 3400 3401})); 3402 3403/***/ }), 3404 3405/***/ 45: 3406/***/ (function(module, exports, __webpack_require__) { 3407 3408;(function (root, factory) { 3409 if (true) { 3410 // CommonJS 3411 module.exports = exports = factory(__webpack_require__(3)); 3412 } 3413 else {} 3414}(this, function (CryptoJS) { 3415 3416 (function (Math) { 3417 // Shortcuts 3418 var C = CryptoJS; 3419 var C_lib = C.lib; 3420 var WordArray = C_lib.WordArray; 3421 var Hasher = C_lib.Hasher; 3422 var C_algo = C.algo; 3423 3424 // Initialization and round constants tables 3425 var H = []; 3426 var K = []; 3427 3428 // Compute constants 3429 (function () { 3430 function isPrime(n) { 3431 var sqrtN = Math.sqrt(n); 3432 for (var factor = 2; factor <= sqrtN; factor++) { 3433 if (!(n % factor)) { 3434 return false; 3435 } 3436 } 3437 3438 return true; 3439 } 3440 3441 function getFractionalBits(n) { 3442 return ((n - (n | 0)) * 0x100000000) | 0; 3443 } 3444 3445 var n = 2; 3446 var nPrime = 0; 3447 while (nPrime < 64) { 3448 if (isPrime(n)) { 3449 if (nPrime < 8) { 3450 H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); 3451 } 3452 K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); 3453 3454 nPrime++; 3455 } 3456 3457 n++; 3458 } 3459 }()); 3460 3461 // Reusable object 3462 var W = []; 3463 3464 /** 3465 * SHA-256 hash algorithm. 3466 */ 3467 var SHA256 = C_algo.SHA256 = Hasher.extend({ 3468 _doReset: function () { 3469 this._hash = new WordArray.init(H.slice(0)); 3470 }, 3471 3472 _doProcessBlock: function (M, offset) { 3473 // Shortcut 3474 var H = this._hash.words; 3475 3476 // Working variables 3477 var a = H[0]; 3478 var b = H[1]; 3479 var c = H[2]; 3480 var d = H[3]; 3481 var e = H[4]; 3482 var f = H[5]; 3483 var g = H[6]; 3484 var h = H[7]; 3485 3486 // Computation 3487 for (var i = 0; i < 64; i++) { 3488 if (i < 16) { 3489 W[i] = M[offset + i] | 0; 3490 } else { 3491 var gamma0x = W[i - 15]; 3492 var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ 3493 ((gamma0x << 14) | (gamma0x >>> 18)) ^ 3494 (gamma0x >>> 3); 3495 3496 var gamma1x = W[i - 2]; 3497 var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ 3498 ((gamma1x << 13) | (gamma1x >>> 19)) ^ 3499 (gamma1x >>> 10); 3500 3501 W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; 3502 } 3503 3504 var ch = (e & f) ^ (~e & g); 3505 var maj = (a & b) ^ (a & c) ^ (b & c); 3506 3507 var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); 3508 var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); 3509 3510 var t1 = h + sigma1 + ch + K[i] + W[i]; 3511 var t2 = sigma0 + maj; 3512 3513 h = g; 3514 g = f; 3515 f = e; 3516 e = (d + t1) | 0; 3517 d = c; 3518 c = b; 3519 b = a; 3520 a = (t1 + t2) | 0; 3521 } 3522 3523 // Intermediate hash value 3524 H[0] = (H[0] + a) | 0; 3525 H[1] = (H[1] + b) | 0; 3526 H[2] = (H[2] + c) | 0; 3527 H[3] = (H[3] + d) | 0; 3528 H[4] = (H[4] + e) | 0; 3529 H[5] = (H[5] + f) | 0; 3530 H[6] = (H[6] + g) | 0; 3531 H[7] = (H[7] + h) | 0; 3532 }, 3533 3534 _doFinalize: function () { 3535 // Shortcuts 3536 var data = this._data; 3537 var dataWords = data.words; 3538 3539 var nBitsTotal = this._nDataBytes * 8; 3540 var nBitsLeft = data.sigBytes * 8; 3541 3542 // Add padding 3543 dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 3544 dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); 3545 dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; 3546 data.sigBytes = dataWords.length * 4; 3547 3548 // Hash final blocks 3549 this._process(); 3550 3551 // Return final computed hash 3552 return this._hash; 3553 }, 3554 3555 clone: function () { 3556 var clone = Hasher.clone.call(this); 3557 clone._hash = this._hash.clone(); 3558 3559 return clone; 3560 } 3561 }); 3562 3563 /** 3564 * Shortcut function to the hasher's object interface. 3565 * 3566 * @param {WordArray|string} message The message to hash. 3567 * 3568 * @return {WordArray} The hash. 3569 * 3570 * @static 3571 * 3572 * @example 3573 * 3574 * var hash = CryptoJS.SHA256('message'); 3575 * var hash = CryptoJS.SHA256(wordArray); 3576 */ 3577 C.SHA256 = Hasher._createHelper(SHA256); 3578 3579 /** 3580 * Shortcut function to the HMAC's object interface. 3581 * 3582 * @param {WordArray|string} message The message to hash. 3583 * @param {WordArray|string} key The secret key. 3584 * 3585 * @return {WordArray} The HMAC. 3586 * 3587 * @static 3588 * 3589 * @example 3590 * 3591 * var hmac = CryptoJS.HmacSHA256(message, key); 3592 */ 3593 C.HmacSHA256 = Hasher._createHmacHelper(SHA256); 3594 }(Math)); 3595 3596 3597 return CryptoJS.SHA256; 3598 3599})); 3600 3601/***/ }), 3602 3603/***/ 46: 3604/***/ (function(module, exports, __webpack_require__) { 3605 3606;(function (root, factory) { 3607 if (true) { 3608 // CommonJS 3609 module.exports = exports = factory(__webpack_require__(3)); 3610 } 3611 else {} 3612}(this, function (CryptoJS) { 3613 3614 (function () { 3615 // Shortcuts 3616 var C = CryptoJS; 3617 var C_lib = C.lib; 3618 var Base = C_lib.Base; 3619 var C_enc = C.enc; 3620 var Utf8 = C_enc.Utf8; 3621 var C_algo = C.algo; 3622 3623 /** 3624 * HMAC algorithm. 3625 */ 3626 var HMAC = C_algo.HMAC = Base.extend({ 3627 /** 3628 * Initializes a newly created HMAC. 3629 * 3630 * @param {Hasher} hasher The hash algorithm to use. 3631 * @param {WordArray|string} key The secret key. 3632 * 3633 * @example 3634 * 3635 * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); 3636 */ 3637 init: function (hasher, key) { 3638 // Init hasher 3639 hasher = this._hasher = new hasher.init(); 3640 3641 // Convert string to WordArray, else assume WordArray already 3642 if (typeof key == 'string') { 3643 key = Utf8.parse(key); 3644 } 3645 3646 // Shortcuts 3647 var hasherBlockSize = hasher.blockSize; 3648 var hasherBlockSizeBytes = hasherBlockSize * 4; 3649 3650 // Allow arbitrary length keys 3651 if (key.sigBytes > hasherBlockSizeBytes) { 3652 key = hasher.finalize(key); 3653 } 3654 3655 // Clamp excess bits 3656 key.clamp(); 3657 3658 // Clone key for inner and outer pads 3659 var oKey = this._oKey = key.clone(); 3660 var iKey = this._iKey = key.clone(); 3661 3662 // Shortcuts 3663 var oKeyWords = oKey.words; 3664 var iKeyWords = iKey.words; 3665 3666 // XOR keys with pad constants 3667 for (var i = 0; i < hasherBlockSize; i++) { 3668 oKeyWords[i] ^= 0x5c5c5c5c; 3669 iKeyWords[i] ^= 0x36363636; 3670 } 3671 oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; 3672 3673 // Set initial values 3674 this.reset(); 3675 }, 3676 3677 /** 3678 * Resets this HMAC to its initial state. 3679 * 3680 * @example 3681 * 3682 * hmacHasher.reset(); 3683 */ 3684 reset: function () { 3685 // Shortcut 3686 var hasher = this._hasher; 3687 3688 // Reset 3689 hasher.reset(); 3690 hasher.update(this._iKey); 3691 }, 3692 3693 /** 3694 * Updates this HMAC with a message. 3695 * 3696 * @param {WordArray|string} messageUpdate The message to append. 3697 * 3698 * @return {HMAC} This HMAC instance. 3699 * 3700 * @example 3701 * 3702 * hmacHasher.update('message'); 3703 * hmacHasher.update(wordArray); 3704 */ 3705 update: function (messageUpdate) { 3706 this._hasher.update(messageUpdate); 3707 3708 // Chainable 3709 return this; 3710 }, 3711 3712 /** 3713 * Finalizes the HMAC computation. 3714 * Note that the finalize operation is effectively a destructive, read-once operation. 3715 * 3716 * @param {WordArray|string} messageUpdate (Optional) A final message update. 3717 * 3718 * @return {WordArray} The HMAC. 3719 * 3720 * @example 3721 * 3722 * var hmac = hmacHasher.finalize(); 3723 * var hmac = hmacHasher.finalize('message'); 3724 * var hmac = hmacHasher.finalize(wordArray); 3725 */ 3726 finalize: function (messageUpdate) { 3727 // Shortcut 3728 var hasher = this._hasher; 3729 3730 // Compute HMAC 3731 var innerHash = hasher.finalize(messageUpdate); 3732 hasher.reset(); 3733 var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); 3734 3735 return hmac; 3736 } 3737 }); 3738 }()); 3739 3740 3741})); 3742 3743/***/ }), 3744 3745/***/ 85: 3746/***/ (function(module, exports, __webpack_require__) { 3747 3748;(function (root, factory) { 3749 if (true) { 3750 // CommonJS 3751 module.exports = exports = factory(__webpack_require__(3)); 3752 } 3753 else {} 3754}(this, function (CryptoJS) { 3755 3756 (function () { 3757 // Shortcuts 3758 var C = CryptoJS; 3759 var C_lib = C.lib; 3760 var WordArray = C_lib.WordArray; 3761 var Hasher = C_lib.Hasher; 3762 var C_algo = C.algo; 3763 3764 // Reusable object 3765 var W = []; 3766 3767 /** 3768 * SHA-1 hash algorithm. 3769 */ 3770 var SHA1 = C_algo.SHA1 = Hasher.extend({ 3771 _doReset: function () { 3772 this._hash = new WordArray.init([ 3773 0x67452301, 0xefcdab89, 3774 0x98badcfe, 0x10325476, 3775 0xc3d2e1f0 3776 ]); 3777 }, 3778 3779 _doProcessBlock: function (M, offset) { 3780 // Shortcut 3781 var H = this._hash.words; 3782 3783 // Working variables 3784 var a = H[0]; 3785 var b = H[1]; 3786 var c = H[2]; 3787 var d = H[3]; 3788 var e = H[4]; 3789 3790 // Computation 3791 for (var i = 0; i < 80; i++) { 3792 if (i < 16) { 3793 W[i] = M[offset + i] | 0; 3794 } else { 3795 var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; 3796 W[i] = (n << 1) | (n >>> 31); 3797 } 3798 3799 var t = ((a << 5) | (a >>> 27)) + e + W[i]; 3800 if (i < 20) { 3801 t += ((b & c) | (~b & d)) + 0x5a827999; 3802 } else if (i < 40) { 3803 t += (b ^ c ^ d) + 0x6ed9eba1; 3804 } else if (i < 60) { 3805 t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; 3806 } else /* if (i < 80) */ { 3807 t += (b ^ c ^ d) - 0x359d3e2a; 3808 } 3809 3810 e = d; 3811 d = c; 3812 c = (b << 30) | (b >>> 2); 3813 b = a; 3814 a = t; 3815 } 3816 3817 // Intermediate hash value 3818 H[0] = (H[0] + a) | 0; 3819 H[1] = (H[1] + b) | 0; 3820 H[2] = (H[2] + c) | 0; 3821 H[3] = (H[3] + d) | 0; 3822 H[4] = (H[4] + e) | 0; 3823 }, 3824 3825 _doFinalize: function () { 3826 // Shortcuts 3827 var data = this._data; 3828 var dataWords = data.words; 3829 3830 var nBitsTotal = this._nDataBytes * 8; 3831 var nBitsLeft = data.sigBytes * 8; 3832 3833 // Add padding 3834 dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 3835 dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); 3836 dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; 3837 data.sigBytes = dataWords.length * 4; 3838 3839 // Hash final blocks 3840 this._process(); 3841 3842 // Return final computed hash 3843 return this._hash; 3844 }, 3845 3846 clone: function () { 3847 var clone = Hasher.clone.call(this); 3848 clone._hash = this._hash.clone(); 3849 3850 return clone; 3851 } 3852 }); 3853 3854 /** 3855 * Shortcut function to the hasher's object interface. 3856 * 3857 * @param {WordArray|string} message The message to hash. 3858 * 3859 * @return {WordArray} The hash. 3860 * 3861 * @static 3862 * 3863 * @example 3864 * 3865 * var hash = CryptoJS.SHA1('message'); 3866 * var hash = CryptoJS.SHA1(wordArray); 3867 */ 3868 C.SHA1 = Hasher._createHelper(SHA1); 3869 3870 /** 3871 * Shortcut function to the HMAC's object interface. 3872 * 3873 * @param {WordArray|string} message The message to hash. 3874 * @param {WordArray|string} key The secret key. 3875 * 3876 * @return {WordArray} The HMAC. 3877 * 3878 * @static 3879 * 3880 * @example 3881 * 3882 * var hmac = CryptoJS.HmacSHA1(message, key); 3883 */ 3884 C.HmacSHA1 = Hasher._createHmacHelper(SHA1); 3885 }()); 3886 3887 3888 return CryptoJS.SHA1; 3889 3890})); 3891 3892/***/ }), 3893 3894/***/ 86: 3895/***/ (function(module, exports, __webpack_require__) { 3896 3897;(function (root, factory, undef) { 3898 if (true) { 3899 // CommonJS 3900 module.exports = exports = factory(__webpack_require__(3), __webpack_require__(32)); 3901 } 3902 else {} 3903}(this, function (CryptoJS) { 3904 3905 (function () { 3906 // Shortcuts 3907 var C = CryptoJS; 3908 var C_lib = C.lib; 3909 var Hasher = C_lib.Hasher; 3910 var C_x64 = C.x64; 3911 var X64Word = C_x64.Word; 3912 var X64WordArray = C_x64.WordArray; 3913 var C_algo = C.algo; 3914 3915 function X64Word_create() { 3916 return X64Word.create.apply(X64Word, arguments); 3917 } 3918 3919 // Constants 3920 var K = [ 3921 X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), 3922 X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), 3923 X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), 3924 X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), 3925 X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), 3926 X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), 3927 X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), 3928 X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), 3929 X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), 3930 X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), 3931 X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), 3932 X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), 3933 X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), 3934 X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), 3935 X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), 3936 X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), 3937 X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), 3938 X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),
vendor: 5,548 bytes, lines 3939-4061
3939 X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), 3940 X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), 3941 X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), 3942 X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), 3943 X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), 3944 X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), 3945 X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), 3946 X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), 3947 X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), 3948 X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), 3949 X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), 3950 X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), 3951 X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), 3952 X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), 3953 X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), 3954 X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), 3955 X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), 3956 X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), 3957 X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), 3958 X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), 3959 X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), 3960 X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) 3961 ]; 3962 3963 // Reusable objects 3964 var W = []; 3965 (function () { 3966 for (var i = 0; i < 80; i++) { 3967 W[i] = X64Word_create(); 3968 } 3969 }()); 3970 3971 /** 3972 * SHA-512 hash algorithm. 3973 */ 3974 var SHA512 = C_algo.SHA512 = Hasher.extend({ 3975 _doReset: function () { 3976 this._hash = new X64WordArray.init([ 3977 new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), 3978 new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), 3979 new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), 3980 new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) 3981 ]); 3982 }, 3983 3984 _doProcessBlock: function (M, offset) { 3985 // Shortcuts 3986 var H = this._hash.words; 3987 3988 var H0 = H[0]; 3989 var H1 = H[1]; 3990 var H2 = H[2]; 3991 var H3 = H[3]; 3992 var H4 = H[4]; 3993 var H5 = H[5]; 3994 var H6 = H[6]; 3995 var H7 = H[7]; 3996 3997 var H0h = H0.high; 3998 var H0l = H0.low; 3999 var H1h = H1.high; 4000 var H1l = H1.low; 4001 var H2h = H2.high; 4002 var H2l = H2.low; 4003 var H3h = H3.high; 4004 var H3l = H3.low; 4005 var H4h = H4.high; 4006 var H4l = H4.low; 4007 var H5h = H5.high; 4008 var H5l = H5.low; 4009 var H6h = H6.high; 4010 var H6l = H6.low; 4011 var H7h = H7.high; 4012 var H7l = H7.low; 4013 4014 // Working variables 4015 var ah = H0h; 4016 var al = H0l; 4017 var bh = H1h; 4018 var bl = H1l; 4019 var ch = H2h; 4020 var cl = H2l; 4021 var dh = H3h; 4022 var dl = H3l; 4023 var eh = H4h; 4024 var el = H4l; 4025 var fh = H5h; 4026 var fl = H5l; 4027 var gh = H6h; 4028 var gl = H6l; 4029 var hh = H7h; 4030 var hl = H7l; 4031 4032 // Rounds 4033 for (var i = 0; i < 80; i++) { 4034 var Wil; 4035 var Wih; 4036 4037 // Shortcut 4038 var Wi = W[i]; 4039 4040 // Extend message 4041 if (i < 16) { 4042 Wih = Wi.high = M[offset + i * 2] | 0; 4043 Wil = Wi.low = M[offset + i * 2 + 1] | 0; 4044 } else { 4045 // Gamma0 4046 var gamma0x = W[i - 15]; 4047 var gamma0xh = gamma0x.high; 4048 var gamma0xl = gamma0x.low; 4049 var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); 4050 var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); 4051 4052 // Gamma1 4053 var gamma1x = W[i - 2]; 4054 var gamma1xh = gamma1x.high; 4055 var gamma1xl = gamma1x.low; 4056 var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); 4057 var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); 4058 4059 // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] 4060 var Wi7 = W[i - 7]; 4061 var Wi7h = Wi7.high;
vendor: 5,595 bytes, lines 4062-4219
4062 var Wi7l = Wi7.low; 4063 4064 var Wi16 = W[i - 16]; 4065 var Wi16h = Wi16.high; 4066 var Wi16l = Wi16.low; 4067 4068 Wil = gamma0l + Wi7l; 4069 Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); 4070 Wil = Wil + gamma1l; 4071 Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); 4072 Wil = Wil + Wi16l; 4073 Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); 4074 4075 Wi.high = Wih; 4076 Wi.low = Wil; 4077 } 4078 4079 var chh = (eh & fh) ^ (~eh & gh); 4080 var chl = (el & fl) ^ (~el & gl); 4081 var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); 4082 var majl = (al & bl) ^ (al & cl) ^ (bl & cl); 4083 4084 var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); 4085 var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); 4086 var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); 4087 var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); 4088 4089 // t1 = h + sigma1 + ch + K[i] + W[i] 4090 var Ki = K[i]; 4091 var Kih = Ki.high; 4092 var Kil = Ki.low; 4093 4094 var t1l = hl + sigma1l; 4095 var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); 4096 var t1l = t1l + chl; 4097 var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); 4098 var t1l = t1l + Kil; 4099 var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); 4100 var t1l = t1l + Wil; 4101 var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); 4102 4103 // t2 = sigma0 + maj 4104 var t2l = sigma0l + majl; 4105 var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); 4106 4107 // Update working variables 4108 hh = gh; 4109 hl = gl; 4110 gh = fh; 4111 gl = fl; 4112 fh = eh; 4113 fl = el; 4114 el = (dl + t1l) | 0; 4115 eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; 4116 dh = ch; 4117 dl = cl; 4118 ch = bh; 4119 cl = bl; 4120 bh = ah; 4121 bl = al; 4122 al = (t1l + t2l) | 0; 4123 ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; 4124 } 4125 4126 // Intermediate hash value 4127 H0l = H0.low = (H0l + al); 4128 H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); 4129 H1l = H1.low = (H1l + bl); 4130 H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); 4131 H2l = H2.low = (H2l + cl); 4132 H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); 4133 H3l = H3.low = (H3l + dl); 4134 H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); 4135 H4l = H4.low = (H4l + el); 4136 H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); 4137 H5l = H5.low = (H5l + fl); 4138 H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); 4139 H6l = H6.low = (H6l + gl); 4140 H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); 4141 H7l = H7.low = (H7l + hl); 4142 H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); 4143 }, 4144 4145 _doFinalize: function () { 4146 // Shortcuts 4147 var data = this._data; 4148 var dataWords = data.words; 4149 4150 var nBitsTotal = this._nDataBytes * 8; 4151 var nBitsLeft = data.sigBytes * 8; 4152 4153 // Add padding 4154 dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 4155 dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); 4156 dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; 4157 data.sigBytes = dataWords.length * 4; 4158 4159 // Hash final blocks 4160 this._process(); 4161 4162 // Convert hash to 32-bit word array before returning 4163 var hash = this._hash.toX32(); 4164 4165 // Return final computed hash 4166 return hash; 4167 }, 4168 4169 clone: function () { 4170 var clone = Hasher.clone.call(this); 4171 clone._hash = this._hash.clone(); 4172 4173 return clone; 4174 }, 4175 4176 blockSize: 1024/32 4177 }); 4178 4179 /** 4180 * Shortcut function to the hasher's object interface. 4181 * 4182 * @param {WordArray|string} message The message to hash. 4183 * 4184 * @return {WordArray} The hash. 4185 * 4186 * @static 4187 * 4188 * @example 4189 * 4190 * var hash = CryptoJS.SHA512('message'); 4191 * var hash = CryptoJS.SHA512(wordArray); 4192 */ 4193 C.SHA512 = Hasher._createHelper(SHA512); 4194 4195 /** 4196 * Shortcut function to the HMAC's object interface. 4197 * 4198 * @param {WordArray|string} message The message to hash. 4199 * @param {WordArray|string} key The secret key. 4200 * 4201 * @return {WordArray} The HMAC. 4202 * 4203 * @static 4204 * 4205 * @example 4206 * 4207 * var hmac = CryptoJS.HmacSHA512(message, key); 4208 */ 4209 C.HmacSHA512 = Hasher._createHmacHelper(SHA512); 4210 }()); 4211 4212 4213 return CryptoJS.SHA512; 4214 4215})); 4216 4217/***/ }) 4218 4219}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.