|
|
6edca3 |
--- a/lib.browser.js 2017-03-01 05:45:46.068206839 -0500
|
|
|
6edca3 |
+++ b/lib/browser.js 2017-03-01 05:45:26.223478637 -0500
|
|
|
6edca3 |
@@ -618,11 +618,394 @@
|
|
|
6edca3 |
// http://code.google.com/p/crypto-js/
|
|
|
6edca3 |
// http://code.google.com/p/crypto-js/wiki/License
|
|
|
6edca3 |
|
|
|
6edca3 |
-var CryptoJS = CryptoJS || function (h, r) { var k = {}, l = k.lib = {}, n = function () { }, f = l.Base = { extend: function (a) { n.prototype = this; var b = new n; a && b.mixIn(a); b.hasOwnProperty("init") || (b.init = function () { b.$super.init.apply(this, arguments) }); b.init.prototype = b; b.$super = this; return b }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (var b in a) a.hasOwnProperty(b) && (this[b] = a[b]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, j = l.WordArray = f.extend({ init: function (a, b) { a = this.words = a || []; this.sigBytes = b != r ? b : 4 * a.length }, toString: function (a) { return (a || s).stringify(this) }, concat: function (a) { var b = this.words, d = a.words, c = this.sigBytes; a = a.sigBytes; this.clamp(); if (c % 4) for (var e = 0; e < a; e++) b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4); else if (65535 < d.length) for (e = 0; e < a; e += 4) b[c + e >>> 2] = d[e >>> 2]; else b.push.apply(b, d); this.sigBytes += a; return this }, clamp: function () { var a = this.words, b = this.sigBytes; a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4); a.length = h.ceil(b / 4) }, clone: function () { var a = f.clone.call(this); a.words = this.words.slice(0); return a }, random: function (a) { for (var b = [], d = 0; d < a; d += 4) b.push(4294967296 * h.random() | 0); return new j.init(b, a) } }), m = k.enc = {}, s = m.Hex = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) { var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255; d.push((e >>> 4).toString(16)); d.push((e & 15).toString(16)) } return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c += 2) d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8); return new j.init(d, b / 2) } }, p = m.Latin1 = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255)); return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c++) d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4); return new j.init(d, b) } }, t = m.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(p.stringify(a))) } catch (b) { throw Error("Malformed UTF-8 data"); } }, parse: function (a) { return p.parse(unescape(encodeURIComponent(a))) } }, q = l.BufferedBlockAlgorithm = f.extend({ reset: function () { this._data = new j.init; this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = t.parse(a)); this._data.concat(a); this._nDataBytes += a.sigBytes }, _process: function (a) { var b = this._data, d = b.words, c = b.sigBytes, e = this.blockSize, f = c / (4 * e), f = a ? h.ceil(f) : h.max((f | 0) - this._minBufferSize, 0); a = f * e; c = h.min(4 * a, c); if (a) { for (var g = 0; g < a; g += e) this._doProcessBlock(d, g); g = d.splice(0, a); b.sigBytes -= c } return new j.init(g, c) }, clone: function () { var a = f.clone.call(this); a._data = this._data.clone(); return a }, _minBufferSize: 0 }); l.Hasher = q.extend({ cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a); this.reset() }, reset: function () { q.reset.call(this); this._doReset() }, update: function (a) { this._append(a); this._process(); return this }, finalize: function (a) { a && this._append(a); return this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, d) { return (new a.init(d)).finalize(b) } }, _createHmacHelper: function (a) { return function (b, d) { return (new u.HMAC.init(a, d)).finalize(b) } } }); var u = k.algo = {}; return k }(Math);
|
|
|
6edca3 |
-(function () { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })();
|
|
|
6edca3 |
-(function (k) { for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function (q) { return 4294967296 * (q - (q | 0)) | 0 }, l = 2, b = 0; 64 > b;) { var d; a: { d = l; for (var w = k.sqrt(d), r = 2; r <= w; r++) if (!(d % r)) { d = !1; break a } d = !0 } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ } var n = [], h = h.SHA256 = j.extend({ _doReset: function () { this._hash = new v.init(s.slice(0)) }, _doProcessBlock: function (q, h) { for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) { if (16 > e) n[e] = q[h + e] | 0; else { var m = n[e - 15], p = n[e - 2]; n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16] } m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e]; p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b); l = j; j = g; g = f; f = k + m | 0; k = b; b = d; d = c; c = m + p | 0 } a[0] = a[0] + c | 0; a[1] = a[1] + d | 0; a[2] = a[2] + b | 0; a[3] = a[3] + k | 0; a[4] = a[4] + f | 0; a[5] = a[5] + g | 0; a[6] = a[6] + j | 0; a[7] = a[7] + l | 0 }, _doFinalize: function () { var d = this._data, b = d.words, a = 8 * this._nDataBytes, c = 8 * d.sigBytes; b[c >>> 5] |= 128 << 24 - c % 32; b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296); b[(c + 64 >>> 9 << 4) + 15] = a; d.sigBytes = 4 * b.length; this._process(); return this._hash }, clone: function () { var b = j.clone.call(this); b._hash = this._hash.clone(); return b } }); g.SHA256 = j._createHelper(h); g.HmacSHA256 = j._createHmacHelper(h) })(Math);
|
|
|
6edca3 |
-(function () { var c = CryptoJS, k = c.enc.Utf8; c.algo.HMAC = c.lib.Base.extend({ init: function (a, b) { a = this._hasher = new a.init; "string" == typeof b && (b = k.parse(b)); var c = a.blockSize, e = 4 * c; b.sigBytes > e && (b = a.finalize(b)); b.clamp(); for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) h[d] ^= 1549556828, j[d] ^= 909522486; f.sigBytes = g.sigBytes = e; this.reset() }, reset: function () { var a = this._hasher; a.reset(); a.update(this._iKey) }, update: function (a) { this._hasher.update(a); return this }, finalize: function (a) { var b = this._hasher; a = b.finalize(a); b.reset(); return b.finalize(this._oKey.clone().concat(a)) } }) })();
|
|
|
6edca3 |
-(function () { var h = CryptoJS, j = h.lib.WordArray; h.enc.Base64 = { stringify: function (b) { var e = b.words, f = b.sigBytes, c = this._map; b.clamp(); b = []; for (var a = 0; a < f; a += 3) for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) b.push(c.charAt(d >>> 6 * (3 - g) & 63)); if (e = c.charAt(64)) for (; b.length % 4;) b.push(e); return b.join("") }, parse: function (b) { var e = b.length, f = this._map, c = f.charAt(64); c && (c = b.indexOf(c), -1 != c && (e = c)); for (var c = [], a = 0, d = 0; d < e; d++) if (d % 4) { var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4), h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4); c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4); a++ } return j.create(c, a) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } })();
|
|
|
6edca3 |
+var CryptoJS = CryptoJS || function (h, r) {
|
|
|
6edca3 |
+ var k = {},
|
|
|
6edca3 |
+ l = k.lib = {},
|
|
|
6edca3 |
+ n = function () { },
|
|
|
6edca3 |
+ f = l.Base = {
|
|
|
6edca3 |
+ extend: function (a) {
|
|
|
6edca3 |
+ n.prototype = this;
|
|
|
6edca3 |
+ var b = new n;
|
|
|
6edca3 |
+ a && b.mixIn(a);
|
|
|
6edca3 |
+ b.hasOwnProperty("init") || (b.init = function () {
|
|
|
6edca3 |
+ b.$super.init.apply(this, arguments)
|
|
|
6edca3 |
+ });
|
|
|
6edca3 |
+ b.init.prototype = b;
|
|
|
6edca3 |
+ b.$super = this;
|
|
|
6edca3 |
+ return b
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ create: function () {
|
|
|
6edca3 |
+ var a = this.extend();
|
|
|
6edca3 |
+ a.init.apply(a, arguments);
|
|
|
6edca3 |
+ return a
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ init: function () { },
|
|
|
6edca3 |
+ mixIn: function (a) {
|
|
|
6edca3 |
+ for (var b in a) a.hasOwnProperty(b) && (this[b] = a[b]);
|
|
|
6edca3 |
+ a.hasOwnProperty("toString") && (this.toString = a.toString)
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ clone: function () {
|
|
|
6edca3 |
+ return this.init.prototype.extend(this)
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ j = l.WordArray = f.extend({
|
|
|
6edca3 |
+ init: function (a, b) {
|
|
|
6edca3 |
+ a = this.words = a || [];
|
|
|
6edca3 |
+ this.sigBytes = b != r ? b : 4 * a.length
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ toString: function (a) {
|
|
|
6edca3 |
+ return (a || s).stringify(this)
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ concat: function (a) {
|
|
|
6edca3 |
+ var b = this.words,
|
|
|
6edca3 |
+ d = a.words,
|
|
|
6edca3 |
+ c = this.sigBytes;
|
|
|
6edca3 |
+ a = a.sigBytes;
|
|
|
6edca3 |
+
|
|
|
6edca3 |
+ this.clamp();
|
|
|
6edca3 |
+
|
|
|
6edca3 |
+ if (c % 4) {
|
|
|
6edca3 |
+ for (var e = 0; e < a; e++) {
|
|
|
6edca3 |
+ b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4);
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ } else if (65535 < d.length) {
|
|
|
6edca3 |
+ for (e = 0; e < a; e += 4) {
|
|
|
6edca3 |
+ b[c + e >>> 2] = d[e >>> 2];
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ } else {
|
|
|
6edca3 |
+ b.push.apply(b, d);
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ this.sigBytes += a;
|
|
|
6edca3 |
+ return this
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ clamp: function () {
|
|
|
6edca3 |
+ var a = this.words,
|
|
|
6edca3 |
+ b = this.sigBytes;
|
|
|
6edca3 |
+ a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4);
|
|
|
6edca3 |
+ a.length = h.ceil(b / 4)
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ clone: function () {
|
|
|
6edca3 |
+ var a = f.clone.call(this);
|
|
|
6edca3 |
+ a.words = this.words.slice(0);
|
|
|
6edca3 |
+ return a
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ random: function (a) {
|
|
|
6edca3 |
+ for (var b = [], d = 0; d < a; d += 4) b.push(4294967296 * h.random() | 0);
|
|
|
6edca3 |
+ return new j.init(b, a)
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ }),
|
|
|
6edca3 |
+ m = k.enc = {},
|
|
|
6edca3 |
+ s = m.Hex = {
|
|
|
6edca3 |
+ stringify: function (a) {
|
|
|
6edca3 |
+ var b = a.words;
|
|
|
6edca3 |
+ a = a.sigBytes;
|
|
|
6edca3 |
+ for (var d = [], c = 0; c < a; c++) {
|
|
|
6edca3 |
+ var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255;
|
|
|
6edca3 |
+ d.push((e >>> 4).toString(16));
|
|
|
6edca3 |
+ d.push((e & 15).toString(16))
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ return d.join("")
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ parse: function (a) {
|
|
|
6edca3 |
+ for (var b = a.length, d = [], c = 0; c < b; c += 2) d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8);
|
|
|
6edca3 |
+ return new j.init(d, b / 2)
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ p = m.Latin1 = {
|
|
|
6edca3 |
+ stringify: function (a) {
|
|
|
6edca3 |
+ var b = a.words;
|
|
|
6edca3 |
+ a = a.sigBytes;
|
|
|
6edca3 |
+ for (var d = [], c = 0; c < a; c++) d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255));
|
|
|
6edca3 |
+ return d.join("")
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ parse: function (a) {
|
|
|
6edca3 |
+ for (var b = a.length, d = [], c = 0; c < b; c++) d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4);
|
|
|
6edca3 |
+ return new j.init(d, b)
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ t = m.Utf8 = {
|
|
|
6edca3 |
+ stringify: function (a) {
|
|
|
6edca3 |
+ try {
|
|
|
6edca3 |
+ return decodeURIComponent(escape(p.stringify(a)))
|
|
|
6edca3 |
+ } catch (b) {
|
|
|
6edca3 |
+ throw Error("Malformed UTF-8 data");
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ parse: function (a) {
|
|
|
6edca3 |
+ return p.parse(unescape(encodeURIComponent(a)))
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ q = l.BufferedBlockAlgorithm = f.extend({
|
|
|
6edca3 |
+ reset: function () {
|
|
|
6edca3 |
+ this._data = new j.init;
|
|
|
6edca3 |
+ this._nDataBytes = 0
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _append: function (a) {
|
|
|
6edca3 |
+ "string" == typeof a && (a = t.parse(a));
|
|
|
6edca3 |
+ this._data.concat(a);
|
|
|
6edca3 |
+ this._nDataBytes += a.sigBytes
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _process: function (a) {
|
|
|
6edca3 |
+ var b = this._data,
|
|
|
6edca3 |
+ d = b.words,
|
|
|
6edca3 |
+ c = b.sigBytes,
|
|
|
6edca3 |
+ e = this.blockSize,
|
|
|
6edca3 |
+ f = c / (4 * e),
|
|
|
6edca3 |
+ f = a ? h.ceil(f) : h.max((f | 0) - this._minBufferSize, 0);
|
|
|
6edca3 |
+ a = f * e;
|
|
|
6edca3 |
+ c = h.min(4 * a, c);
|
|
|
6edca3 |
+ if (a) {
|
|
|
6edca3 |
+ for (var g = 0; g < a; g += e) this._doProcessBlock(d, g);
|
|
|
6edca3 |
+ g = d.splice(0, a); b.sigBytes -= c
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ return new j.init(g, c)
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ clone: function () {
|
|
|
6edca3 |
+ var a = f.clone.call(this);
|
|
|
6edca3 |
+ a._data = this._data.clone();
|
|
|
6edca3 |
+ return a
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _minBufferSize: 0
|
|
|
6edca3 |
+ });
|
|
|
6edca3 |
+ l.Hasher = q.extend({
|
|
|
6edca3 |
+ cfg: f.extend(),
|
|
|
6edca3 |
+ init: function (a) {
|
|
|
6edca3 |
+ this.cfg = this.cfg.extend(a);
|
|
|
6edca3 |
+ this.reset()
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ reset: function () {
|
|
|
6edca3 |
+ q.reset.call(this);
|
|
|
6edca3 |
+ this._doReset()
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ update: function (a) {
|
|
|
6edca3 |
+ this._append(a);
|
|
|
6edca3 |
+ this._process();
|
|
|
6edca3 |
+ return this
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ finalize: function (a) {
|
|
|
6edca3 |
+ a && this._append(a);
|
|
|
6edca3 |
+ return this._doFinalize()
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ blockSize: 16,
|
|
|
6edca3 |
+ _createHelper: function (a) {
|
|
|
6edca3 |
+ return function (b, d) {
|
|
|
6edca3 |
+ return (new a.init(d)).finalize(b)
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _createHmacHelper: function (a) {
|
|
|
6edca3 |
+ return function (b, d) {
|
|
|
6edca3 |
+ return (new u.HMAC.init(a, d)).finalize(b)
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ });
|
|
|
6edca3 |
+ var u = k.algo = {};
|
|
|
6edca3 |
+ return k
|
|
|
6edca3 |
+}(Math);
|
|
|
6edca3 |
+
|
|
|
6edca3 |
+(function () {
|
|
|
6edca3 |
+ var k = CryptoJS,
|
|
|
6edca3 |
+ b = k.lib,
|
|
|
6edca3 |
+ m = b.WordArray,
|
|
|
6edca3 |
+ l = b.Hasher,
|
|
|
6edca3 |
+ d = [],
|
|
|
6edca3 |
+ b = k.algo.SHA1 = l.extend({
|
|
|
6edca3 |
+ _doReset: function () {
|
|
|
6edca3 |
+ this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520])
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _doProcessBlock: function (n, p) {
|
|
|
6edca3 |
+ for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) {
|
|
|
6edca3 |
+ if (16 > c) d[c] = n[p + c] | 0;
|
|
|
6edca3 |
+ else {
|
|
|
6edca3 |
+ var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16];
|
|
|
6edca3 |
+ d[c] = g << 1 | g >>> 31
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ g = (e << 5 | e >>> 27) + b + d[c];
|
|
|
6edca3 |
+ g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514);
|
|
|
6edca3 |
+ b = j;
|
|
|
6edca3 |
+ j = h;
|
|
|
6edca3 |
+ h = f << 30 | f >>> 2;
|
|
|
6edca3 |
+ f = e;
|
|
|
6edca3 |
+ e = g
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ a[0] = a[0] + e | 0;
|
|
|
6edca3 |
+ a[1] = a[1] + f | 0;
|
|
|
6edca3 |
+ a[2] = a[2] + h | 0;
|
|
|
6edca3 |
+ a[3] = a[3] + j | 0;
|
|
|
6edca3 |
+ a[4] = a[4] + b | 0 },
|
|
|
6edca3 |
+ _doFinalize: function () {
|
|
|
6edca3 |
+ var b = this._data,
|
|
|
6edca3 |
+ d = b.words,
|
|
|
6edca3 |
+ a = 8 * this._nDataBytes,
|
|
|
6edca3 |
+ e = 8 * b.sigBytes;
|
|
|
6edca3 |
+ d[e >>> 5] |= 128 << 24 - e % 32;
|
|
|
6edca3 |
+ d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296);
|
|
|
6edca3 |
+ d[(e + 64 >>> 9 << 4) + 15] = a;
|
|
|
6edca3 |
+ b.sigBytes = 4 * d.length;
|
|
|
6edca3 |
+ this._process();
|
|
|
6edca3 |
+ return this._hash
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ clone: function () {
|
|
|
6edca3 |
+ var b = l.clone.call(this);
|
|
|
6edca3 |
+ b._hash = this._hash.clone();
|
|
|
6edca3 |
+ return b
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ });
|
|
|
6edca3 |
+ k.SHA1 = l._createHelper(b);
|
|
|
6edca3 |
+ k.HmacSHA1 = l._createHmacHelper(b)
|
|
|
6edca3 |
+})();
|
|
|
6edca3 |
+(function (k) {
|
|
|
6edca3 |
+ for (var g = CryptoJS,
|
|
|
6edca3 |
+ h = g.lib,
|
|
|
6edca3 |
+ v = h.WordArray,
|
|
|
6edca3 |
+ j = h.Hasher,
|
|
|
6edca3 |
+ h = g.algo,
|
|
|
6edca3 |
+ s = [],
|
|
|
6edca3 |
+ t = [],
|
|
|
6edca3 |
+ u = function (q) {
|
|
|
6edca3 |
+ return 4294967296 * (q - (q | 0)) | 0
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ l = 2,
|
|
|
6edca3 |
+ b = 0; 64 > b;) {
|
|
|
6edca3 |
+ var d;
|
|
|
6edca3 |
+ a: { d = l;
|
|
|
6edca3 |
+ for (var w = k.sqrt(d), r = 2; r <= w; r++)
|
|
|
6edca3 |
+ if (!(d % r)) {
|
|
|
6edca3 |
+ d = !1;
|
|
|
6edca3 |
+ break a
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ d = !0
|
|
|
6edca3 |
+ } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ }
|
|
|
6edca3 |
+ var n = [],
|
|
|
6edca3 |
+ h = h.SHA256 = j.extend({
|
|
|
6edca3 |
+ _doReset: function () {
|
|
|
6edca3 |
+ this._hash = new v.init(s.slice(0))
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _doProcessBlock: function (q, h) {
|
|
|
6edca3 |
+ for (var a = this._hash.words,
|
|
|
6edca3 |
+ c = a[0],
|
|
|
6edca3 |
+ d = a[1],
|
|
|
6edca3 |
+ b = a[2],
|
|
|
6edca3 |
+ k = a[3],
|
|
|
6edca3 |
+ f = a[4],
|
|
|
6edca3 |
+ g = a[5],
|
|
|
6edca3 |
+ j = a[6],
|
|
|
6edca3 |
+ l = a[7], e = 0; 64 > e; e++) {
|
|
|
6edca3 |
+ if (16 > e) n[e] = q[h + e] | 0;
|
|
|
6edca3 |
+ else {
|
|
|
6edca3 |
+ var m = n[e - 15],
|
|
|
6edca3 |
+ p = n[e - 2];
|
|
|
6edca3 |
+ n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16]
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e];
|
|
|
6edca3 |
+ p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b);
|
|
|
6edca3 |
+ l = j;
|
|
|
6edca3 |
+ j = g;
|
|
|
6edca3 |
+ g = f;
|
|
|
6edca3 |
+ f = k + m | 0;
|
|
|
6edca3 |
+ k = b;
|
|
|
6edca3 |
+ b = d;
|
|
|
6edca3 |
+ d = c;
|
|
|
6edca3 |
+ c = m + p | 0
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ a[0] = a[0] + c | 0;
|
|
|
6edca3 |
+ a[1] = a[1] + d | 0;
|
|
|
6edca3 |
+ a[2] = a[2] + b | 0;
|
|
|
6edca3 |
+ a[3] = a[3] + k | 0;
|
|
|
6edca3 |
+ a[4] = a[4] + f | 0;
|
|
|
6edca3 |
+ a[5] = a[5] + g | 0;
|
|
|
6edca3 |
+ a[6] = a[6] + j | 0;
|
|
|
6edca3 |
+ a[7] = a[7] + l | 0
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _doFinalize: function () {
|
|
|
6edca3 |
+ var d = this._data,
|
|
|
6edca3 |
+ b = d.words,
|
|
|
6edca3 |
+ a = 8 * this._nDataBytes,
|
|
|
6edca3 |
+ c = 8 * d.sigBytes;
|
|
|
6edca3 |
+ b[c >>> 5] |= 128 << 24 - c % 32;
|
|
|
6edca3 |
+ b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296);
|
|
|
6edca3 |
+ b[(c + 64 >>> 9 << 4) + 15] = a;
|
|
|
6edca3 |
+ d.sigBytes = 4 * b.length;
|
|
|
6edca3 |
+ this._process();
|
|
|
6edca3 |
+ return this._hash
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ clone: function () {
|
|
|
6edca3 |
+ var b = j.clone.call(this);
|
|
|
6edca3 |
+ b._hash = this._hash.clone();
|
|
|
6edca3 |
+ return b
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ });
|
|
|
6edca3 |
+ g.SHA256 = j._createHelper(h);
|
|
|
6edca3 |
+ g.HmacSHA256 = j._createHmacHelper(h)
|
|
|
6edca3 |
+})(Math);
|
|
|
6edca3 |
+(function () {
|
|
|
6edca3 |
+ var c = CryptoJS,
|
|
|
6edca3 |
+ k = c.enc.Utf8;
|
|
|
6edca3 |
+ c.algo.HMAC = c.lib.Base.extend({
|
|
|
6edca3 |
+ init: function (a, b) {
|
|
|
6edca3 |
+ a = this._hasher = new a.init;
|
|
|
6edca3 |
+ "string" == typeof b && (b = k.parse(b));
|
|
|
6edca3 |
+ var c = a.blockSize,
|
|
|
6edca3 |
+ e = 4 * c;
|
|
|
6edca3 |
+ b.sigBytes > e && (b = a.finalize(b));
|
|
|
6edca3 |
+ b.clamp();
|
|
|
6edca3 |
+ for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) h[d] ^= 1549556828, j[d] ^= 909522486;
|
|
|
6edca3 |
+ f.sigBytes = g.sigBytes = e;
|
|
|
6edca3 |
+ this.reset()
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ reset: function () {
|
|
|
6edca3 |
+ var a = this._hasher;
|
|
|
6edca3 |
+ a.reset();
|
|
|
6edca3 |
+ a.update(this._iKey)
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ update: function (a) {
|
|
|
6edca3 |
+ this._hasher.update(a);
|
|
|
6edca3 |
+ return this
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ finalize: function (a) {
|
|
|
6edca3 |
+ var b = this._hasher;
|
|
|
6edca3 |
+ a = b.finalize(a);
|
|
|
6edca3 |
+ b.reset();
|
|
|
6edca3 |
+ return b.finalize(this._oKey.clone().concat(a))
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ })
|
|
|
6edca3 |
+})();
|
|
|
6edca3 |
+
|
|
|
6edca3 |
+(function () {
|
|
|
6edca3 |
+ var h = CryptoJS,
|
|
|
6edca3 |
+ j = h.lib.WordArray;
|
|
|
6edca3 |
+ h.enc.Base64 = {
|
|
|
6edca3 |
+ stringify: function (b) {
|
|
|
6edca3 |
+ var e = b.words,
|
|
|
6edca3 |
+ f = b.sigBytes,
|
|
|
6edca3 |
+ c = this._map;
|
|
|
6edca3 |
+ b.clamp();
|
|
|
6edca3 |
+ b = [];
|
|
|
6edca3 |
+ for (var a = 0; a < f; a += 3) {
|
|
|
6edca3 |
+ for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) {
|
|
|
6edca3 |
+ b.push(c.charAt(d >>> 6 * (3 - g) & 63));
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+
|
|
|
6edca3 |
+ if (e = c.charAt(64)) for (; b.length % 4;) b.push(e);
|
|
|
6edca3 |
+ return b.join("")
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ parse: function (b) {
|
|
|
6edca3 |
+ var e = b.length,
|
|
|
6edca3 |
+ f = this._map,
|
|
|
6edca3 |
+ c = f.charAt(64);
|
|
|
6edca3 |
+ c && (c = b.indexOf(c), -1 != c && (e = c));
|
|
|
6edca3 |
+ for (var c = [], a = 0, d = 0; d < e; d++) {
|
|
|
6edca3 |
+ if (d % 4) {
|
|
|
6edca3 |
+ var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4),
|
|
|
6edca3 |
+ h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4);
|
|
|
6edca3 |
+ c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4); a++
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+ return j.create(c, a)
|
|
|
6edca3 |
+ },
|
|
|
6edca3 |
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
|
6edca3 |
+ }
|
|
|
6edca3 |
+})();
|
|
|
6edca3 |
|
|
|
6edca3 |
hawk.crypto.internals = CryptoJS;
|
|
|
6edca3 |
|