├── 00-CryptoJS加密库 ├── CryptoJS v3.1.2 │ ├── components │ │ ├── aes-min.js │ │ ├── aes.js │ │ ├── cipher-core-min.js │ │ ├── cipher-core.js │ │ ├── core-min.js │ │ ├── core.js │ │ ├── enc-base64-min.js │ │ ├── enc-base64.js │ │ ├── enc-utf16-min.js │ │ ├── enc-utf16.js │ │ ├── evpkdf-min.js │ │ ├── evpkdf.js │ │ ├── format-hex-min.js │ │ ├── format-hex.js │ │ ├── hmac-min.js │ │ ├── hmac.js │ │ ├── lib-typedarrays-min.js │ │ ├── lib-typedarrays.js │ │ ├── md5-min.js │ │ ├── md5.js │ │ ├── mode-cfb-min.js │ │ ├── mode-cfb.js │ │ ├── mode-ctr-gladman-min.js │ │ ├── mode-ctr-gladman.js │ │ ├── mode-ctr-min.js │ │ ├── mode-ctr.js │ │ ├── mode-ecb-min.js │ │ ├── mode-ecb.js │ │ ├── mode-ofb-min.js │ │ ├── mode-ofb.js │ │ ├── pad-ansix923-min.js │ │ ├── pad-ansix923.js │ │ ├── pad-iso10126-min.js │ │ ├── pad-iso10126.js │ │ ├── pad-iso97971-min.js │ │ ├── pad-iso97971.js │ │ ├── pad-nopadding-min.js │ │ ├── pad-nopadding.js │ │ ├── pad-zeropadding-min.js │ │ ├── pad-zeropadding.js │ │ ├── pbkdf2-min.js │ │ ├── pbkdf2.js │ │ ├── rabbit-legacy-min.js │ │ ├── rabbit-legacy.js │ │ ├── rabbit-min.js │ │ ├── rabbit.js │ │ ├── rc4-min.js │ │ ├── rc4.js │ │ ├── ripemd160-min.js │ │ ├── ripemd160.js │ │ ├── sha1-min.js │ │ ├── sha1.js │ │ ├── sha224-min.js │ │ ├── sha224.js │ │ ├── sha256-min.js │ │ ├── sha256.js │ │ ├── sha3-min.js │ │ ├── sha3.js │ │ ├── sha384-min.js │ │ ├── sha384.js │ │ ├── sha512-min.js │ │ ├── sha512.js │ │ ├── tripledes-min.js │ │ ├── tripledes.js │ │ ├── x64-core-min.js │ │ └── x64-core.js │ └── rollups │ │ ├── aes.js │ │ ├── hmac-md5.js │ │ ├── hmac-ripemd160.js │ │ ├── hmac-sha1.js │ │ ├── hmac-sha224.js │ │ ├── hmac-sha256.js │ │ ├── hmac-sha3.js │ │ ├── hmac-sha384.js │ │ ├── hmac-sha512.js │ │ ├── md5.js │ │ ├── pbkdf2.js │ │ ├── rabbit-legacy.js │ │ ├── rabbit.js │ │ ├── rc4.js │ │ ├── ripemd160.js │ │ ├── sha1.js │ │ ├── sha224.js │ │ ├── sha256.js │ │ ├── sha3.js │ │ ├── sha384.js │ │ ├── sha512.js │ │ └── tripledes.js └── README.md ├── 01-嘟嘟牛逆向Hook ├── Code │ ├── log.txt │ └── x嘟牛.py ├── Doc │ └── 嘟嘟牛分析过程.txt ├── Resource │ └── x嘟牛.apk └── Video │ └── 视频资料.txt └── README.md /00-CryptoJS加密库/CryptoJS v3.1.2/components/aes-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){for(var q=CryptoJS,x=q.lib.BlockCipher,r=q.algo,j=[],y=[],z=[],A=[],B=[],C=[],s=[],u=[],v=[],w=[],g=[],k=0;256>k;k++)g[k]=128>k?k<<1:k<<1^283;for(var n=0,l=0,k=0;256>k;k++){var f=l^l<<1^l<<2^l<<3^l<<4,f=f>>>8^f&255^99;j[n]=f;y[f]=n;var t=g[n],D=g[t],E=g[D],b=257*g[f]^16843008*f;z[n]=b<<24|b>>>8;A[n]=b<<16|b>>>16;B[n]=b<<8|b>>>24;C[n]=b;b=16843009*E^65537*D^257*t^16843008*n;s[f]=b<<24|b>>>8;u[f]=b<<16|b>>>16;v[f]=b<<8|b>>>24;w[f]=b;n?(n=t^g[g[g[E^t]]],l^=g[g[l]]):n=l=1}var F=[0,1,2,4,8, 8 | 16,32,64,128,27,54],r=r.AES=x.extend({_doReset:function(){for(var c=this._key,e=c.words,a=c.sigBytes/4,c=4*((this._nRounds=a+6)+1),b=this._keySchedule=[],h=0;h>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255]):(d=d<<8|d>>>24,d=j[d>>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255],d^=F[h/a|0]<<24);b[h]=b[h-a]^d}e=this._invKeySchedule=[];for(a=0;aa||4>=h?d:s[j[d>>>24]]^u[j[d>>>16&255]]^v[j[d>>> 9 | 8&255]]^w[j[d&255]]},encryptBlock:function(c,e){this._doCryptBlock(c,e,this._keySchedule,z,A,B,C,j)},decryptBlock:function(c,e){var a=c[e+1];c[e+1]=c[e+3];c[e+3]=a;this._doCryptBlock(c,e,this._invKeySchedule,s,u,v,w,y);a=c[e+1];c[e+1]=c[e+3];c[e+3]=a},_doCryptBlock:function(c,e,a,b,h,d,j,m){for(var n=this._nRounds,f=c[e]^a[0],g=c[e+1]^a[1],k=c[e+2]^a[2],p=c[e+3]^a[3],l=4,t=1;t>>24]^h[g>>>16&255]^d[k>>>8&255]^j[p&255]^a[l++],r=b[g>>>24]^h[k>>>16&255]^d[p>>>8&255]^j[f&255]^a[l++],s= 10 | b[k>>>24]^h[p>>>16&255]^d[f>>>8&255]^j[g&255]^a[l++],p=b[p>>>24]^h[f>>>16&255]^d[g>>>8&255]^j[k&255]^a[l++],f=q,g=r,k=s;q=(m[f>>>24]<<24|m[g>>>16&255]<<16|m[k>>>8&255]<<8|m[p&255])^a[l++];r=(m[g>>>24]<<24|m[k>>>16&255]<<16|m[p>>>8&255]<<8|m[f&255])^a[l++];s=(m[k>>>24]<<24|m[p>>>16&255]<<16|m[f>>>8&255]<<8|m[g&255])^a[l++];p=(m[p>>>24]<<24|m[f>>>16&255]<<16|m[g>>>8&255]<<8|m[k&255])^a[l++];c[e]=q;c[e+1]=r;c[e+2]=s;c[e+3]=p},keySize:8});q.AES=x._createHelper(r)})(); 11 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/cipher-core-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.lib.Cipher||function(u){var g=CryptoJS,f=g.lib,k=f.Base,l=f.WordArray,q=f.BufferedBlockAlgorithm,r=g.enc.Base64,v=g.algo.EvpKDF,n=f.Cipher=q.extend({cfg:k.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c);this._xformMode=a;this._key=b;this.reset()},reset:function(){q.reset.call(this);this._doReset()},process:function(a){this._append(a); 8 | return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(a){return{encrypt:function(b,c,d){return("string"==typeof c?s:j).encrypt(a,b,c,d)},decrypt:function(b,c,d){return("string"==typeof c?s:j).decrypt(a,b,c,d)}}}});f.StreamCipher=n.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var m=g.mode={},t=function(a,b,c){var d=this._iv;d?this._iv=u:d=this._prevBlock;for(var e= 9 | 0;e>>2]&255}};f.BlockCipher=n.extend({cfg:n.cfg.extend({mode:m,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1; 11 | this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var p=f.CipherParams=k.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),m=(g.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt; 12 | return(a?l.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=l.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return p.create({ciphertext:a,salt:c})}},j=f.SerializableCipher=k.extend({cfg:k.extend({format:m}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return p.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding, 13 | blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),g=(g.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=l.random(8));a=v.create({keySize:b+c}).compute(a,d);c=l.create(a.words.slice(b),4*c);a.sigBytes=4*b;return p.create({key:a,iv:c,salt:d})}},s=f.PasswordBasedCipher=j.extend({cfg:j.cfg.extend({kdf:g}),encrypt:function(a, 14 | b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=j.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return j.decrypt.call(this,a,b,c.key,d)}})}(); 15 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/core-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | 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)}}, 8 | 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>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535>>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<< 9 | 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>>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>>3]|=parseInt(a.substr(c, 10 | 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>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;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)))}}, 11 | 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>>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>>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< 8 | 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+/="}})(); 9 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/enc-base64.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var C_enc = C.enc; 13 | 14 | /** 15 | * Base64 encoding strategy. 16 | */ 17 | var Base64 = C_enc.Base64 = { 18 | /** 19 | * Converts a word array to a Base64 string. 20 | * 21 | * @param {WordArray} wordArray The word array. 22 | * 23 | * @return {string} The Base64 string. 24 | * 25 | * @static 26 | * 27 | * @example 28 | * 29 | * var base64String = CryptoJS.enc.Base64.stringify(wordArray); 30 | */ 31 | stringify: function (wordArray) { 32 | // Shortcuts 33 | var words = wordArray.words; 34 | var sigBytes = wordArray.sigBytes; 35 | var map = this._map; 36 | 37 | // Clamp excess bits 38 | wordArray.clamp(); 39 | 40 | // Convert 41 | var base64Chars = []; 42 | for (var i = 0; i < sigBytes; i += 3) { 43 | var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; 44 | var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; 45 | var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; 46 | 47 | var triplet = (byte1 << 16) | (byte2 << 8) | byte3; 48 | 49 | for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { 50 | base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); 51 | } 52 | } 53 | 54 | // Add padding 55 | var paddingChar = map.charAt(64); 56 | if (paddingChar) { 57 | while (base64Chars.length % 4) { 58 | base64Chars.push(paddingChar); 59 | } 60 | } 61 | 62 | return base64Chars.join(''); 63 | }, 64 | 65 | /** 66 | * Converts a Base64 string to a word array. 67 | * 68 | * @param {string} base64Str The Base64 string. 69 | * 70 | * @return {WordArray} The word array. 71 | * 72 | * @static 73 | * 74 | * @example 75 | * 76 | * var wordArray = CryptoJS.enc.Base64.parse(base64String); 77 | */ 78 | parse: function (base64Str) { 79 | // Shortcuts 80 | var base64StrLength = base64Str.length; 81 | var map = this._map; 82 | 83 | // Ignore padding 84 | var paddingChar = map.charAt(64); 85 | if (paddingChar) { 86 | var paddingIndex = base64Str.indexOf(paddingChar); 87 | if (paddingIndex != -1) { 88 | base64StrLength = paddingIndex; 89 | } 90 | } 91 | 92 | // Convert 93 | var words = []; 94 | var nBytes = 0; 95 | for (var i = 0; i < base64StrLength; i++) { 96 | if (i % 4) { 97 | var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2); 98 | var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2); 99 | words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); 100 | nBytes++; 101 | } 102 | } 103 | 104 | return WordArray.create(words, nBytes); 105 | }, 106 | 107 | _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' 108 | }; 109 | }()); 110 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/enc-utf16-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var e=CryptoJS,f=e.lib.WordArray,e=e.enc;e.Utf16=e.Utf16BE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1]|=b.charCodeAt(a)<<16-16*(a%2);return f.create(c,2*d)}};e.Utf16LE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535)<<8&4278255360|(d[a>>> 8 | 2]>>>16-8*(a%4)&65535)>>>8&16711935));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1,j=e[g],h=b.charCodeAt(a)<<16-16*(a%2);e[g]=j|h<<8&4278255360|h>>>8&16711935}return f.create(c,2*d)}}})(); 9 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/enc-utf16.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var C_enc = C.enc; 13 | 14 | /** 15 | * UTF-16 BE encoding strategy. 16 | */ 17 | var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { 18 | /** 19 | * Converts a word array to a UTF-16 BE string. 20 | * 21 | * @param {WordArray} wordArray The word array. 22 | * 23 | * @return {string} The UTF-16 BE string. 24 | * 25 | * @static 26 | * 27 | * @example 28 | * 29 | * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); 30 | */ 31 | stringify: function (wordArray) { 32 | // Shortcuts 33 | var words = wordArray.words; 34 | var sigBytes = wordArray.sigBytes; 35 | 36 | // Convert 37 | var utf16Chars = []; 38 | for (var i = 0; i < sigBytes; i += 2) { 39 | var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; 40 | utf16Chars.push(String.fromCharCode(codePoint)); 41 | } 42 | 43 | return utf16Chars.join(''); 44 | }, 45 | 46 | /** 47 | * Converts a UTF-16 BE string to a word array. 48 | * 49 | * @param {string} utf16Str The UTF-16 BE string. 50 | * 51 | * @return {WordArray} The word array. 52 | * 53 | * @static 54 | * 55 | * @example 56 | * 57 | * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); 58 | */ 59 | parse: function (utf16Str) { 60 | // Shortcut 61 | var utf16StrLength = utf16Str.length; 62 | 63 | // Convert 64 | var words = []; 65 | for (var i = 0; i < utf16StrLength; i++) { 66 | words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); 67 | } 68 | 69 | return WordArray.create(words, utf16StrLength * 2); 70 | } 71 | }; 72 | 73 | /** 74 | * UTF-16 LE encoding strategy. 75 | */ 76 | C_enc.Utf16LE = { 77 | /** 78 | * Converts a word array to a UTF-16 LE string. 79 | * 80 | * @param {WordArray} wordArray The word array. 81 | * 82 | * @return {string} The UTF-16 LE string. 83 | * 84 | * @static 85 | * 86 | * @example 87 | * 88 | * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); 89 | */ 90 | stringify: function (wordArray) { 91 | // Shortcuts 92 | var words = wordArray.words; 93 | var sigBytes = wordArray.sigBytes; 94 | 95 | // Convert 96 | var utf16Chars = []; 97 | for (var i = 0; i < sigBytes; i += 2) { 98 | var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); 99 | utf16Chars.push(String.fromCharCode(codePoint)); 100 | } 101 | 102 | return utf16Chars.join(''); 103 | }, 104 | 105 | /** 106 | * Converts a UTF-16 LE string to a word array. 107 | * 108 | * @param {string} utf16Str The UTF-16 LE string. 109 | * 110 | * @return {WordArray} The word array. 111 | * 112 | * @static 113 | * 114 | * @example 115 | * 116 | * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); 117 | */ 118 | parse: function (utf16Str) { 119 | // Shortcut 120 | var utf16StrLength = utf16Str.length; 121 | 122 | // Convert 123 | var words = []; 124 | for (var i = 0; i < utf16StrLength; i++) { 125 | words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); 126 | } 127 | 128 | return WordArray.create(words, utf16StrLength * 2); 129 | } 130 | }; 131 | 132 | function swapEndian(word) { 133 | return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); 134 | } 135 | }()); 136 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/evpkdf-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var b=CryptoJS,a=b.lib,f=a.Base,k=a.WordArray,a=b.algo,l=a.EvpKDF=f.extend({cfg:f.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),g=k.create(),f=g.words,h=c.keySize,c=c.iterations;f.lengthe&&(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 hasherBlockSizeBytes) { 45 | key = hasher.finalize(key); 46 | } 47 | 48 | // Clamp excess bits 49 | key.clamp(); 50 | 51 | // Clone key for inner and outer pads 52 | var oKey = this._oKey = key.clone(); 53 | var iKey = this._iKey = key.clone(); 54 | 55 | // Shortcuts 56 | var oKeyWords = oKey.words; 57 | var iKeyWords = iKey.words; 58 | 59 | // XOR keys with pad constants 60 | for (var i = 0; i < hasherBlockSize; i++) { 61 | oKeyWords[i] ^= 0x5c5c5c5c; 62 | iKeyWords[i] ^= 0x36363636; 63 | } 64 | oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; 65 | 66 | // Set initial values 67 | this.reset(); 68 | }, 69 | 70 | /** 71 | * Resets this HMAC to its initial state. 72 | * 73 | * @example 74 | * 75 | * hmacHasher.reset(); 76 | */ 77 | reset: function () { 78 | // Shortcut 79 | var hasher = this._hasher; 80 | 81 | // Reset 82 | hasher.reset(); 83 | hasher.update(this._iKey); 84 | }, 85 | 86 | /** 87 | * Updates this HMAC with a message. 88 | * 89 | * @param {WordArray|string} messageUpdate The message to append. 90 | * 91 | * @return {HMAC} This HMAC instance. 92 | * 93 | * @example 94 | * 95 | * hmacHasher.update('message'); 96 | * hmacHasher.update(wordArray); 97 | */ 98 | update: function (messageUpdate) { 99 | this._hasher.update(messageUpdate); 100 | 101 | // Chainable 102 | return this; 103 | }, 104 | 105 | /** 106 | * Finalizes the HMAC computation. 107 | * Note that the finalize operation is effectively a destructive, read-once operation. 108 | * 109 | * @param {WordArray|string} messageUpdate (Optional) A final message update. 110 | * 111 | * @return {WordArray} The HMAC. 112 | * 113 | * @example 114 | * 115 | * var hmac = hmacHasher.finalize(); 116 | * var hmac = hmacHasher.finalize('message'); 117 | * var hmac = hmacHasher.finalize(wordArray); 118 | */ 119 | finalize: function (messageUpdate) { 120 | // Shortcut 121 | var hasher = this._hasher; 122 | 123 | // Compute HMAC 124 | var innerHash = hasher.finalize(messageUpdate); 125 | hasher.reset(); 126 | var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); 127 | 128 | return hmac; 129 | } 130 | }); 131 | }()); 132 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/lib-typedarrays-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){if("function"==typeof ArrayBuffer){var b=CryptoJS.lib.WordArray,e=b.init;(b.init=function(a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));if(a instanceof Int8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);if(a instanceof Uint8Array){for(var b=a.byteLength,d=[],c=0;c>>2]|=a[c]<< 8 | 24-8*(c%4);e.call(this,d,b)}else e.apply(this,arguments)}).prototype=b}})(); 9 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/lib-typedarrays.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Check if typed arrays are supported 9 | if (typeof ArrayBuffer != 'function') { 10 | return; 11 | } 12 | 13 | // Shortcuts 14 | var C = CryptoJS; 15 | var C_lib = C.lib; 16 | var WordArray = C_lib.WordArray; 17 | 18 | // Reference original init 19 | var superInit = WordArray.init; 20 | 21 | // Augment WordArray.init to handle typed arrays 22 | var subInit = WordArray.init = function (typedArray) { 23 | // Convert buffers to uint8 24 | if (typedArray instanceof ArrayBuffer) { 25 | typedArray = new Uint8Array(typedArray); 26 | } 27 | 28 | // Convert other array views to uint8 29 | if ( 30 | typedArray instanceof Int8Array || 31 | typedArray instanceof Uint8ClampedArray || 32 | typedArray instanceof Int16Array || 33 | typedArray instanceof Uint16Array || 34 | typedArray instanceof Int32Array || 35 | typedArray instanceof Uint32Array || 36 | typedArray instanceof Float32Array || 37 | typedArray instanceof Float64Array 38 | ) { 39 | typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); 40 | } 41 | 42 | // Handle Uint8Array 43 | if (typedArray instanceof Uint8Array) { 44 | // Shortcut 45 | var typedArrayByteLength = typedArray.byteLength; 46 | 47 | // Extract bytes 48 | var words = []; 49 | for (var i = 0; i < typedArrayByteLength; i++) { 50 | words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); 51 | } 52 | 53 | // Initialize this word array 54 | superInit.call(this, words, typedArrayByteLength); 55 | } else { 56 | // Else call normal init 57 | superInit.apply(this, arguments); 58 | } 59 | }; 60 | 61 | subInit.prototype = WordArray; 62 | }()); 63 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/md5-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(E){function h(a,f,g,j,p,h,k){a=a+(f&g|~f&j)+p+k;return(a<>>32-h)+f}function k(a,f,g,j,p,h,k){a=a+(f&j|g&~j)+p+k;return(a<>>32-h)+f}function l(a,f,g,j,h,k,l){a=a+(f^g^j)+h+l;return(a<>>32-k)+f}function n(a,f,g,j,h,k,l){a=a+(g^(f|~j))+h+l;return(a<>>32-k)+f}for(var r=CryptoJS,q=r.lib,F=q.WordArray,s=q.Hasher,q=r.algo,a=[],t=0;64>t;t++)a[t]=4294967296*E.abs(E.sin(t+1))|0;q=q.MD5=s.extend({_doReset:function(){this._hash=new F.init([1732584193,4023233417,2562383102,271733878])}, 8 | _doProcessBlock:function(m,f){for(var g=0;16>g;g++){var j=f+g,p=m[j];m[j]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}var g=this._hash.words,j=m[f+0],p=m[f+1],q=m[f+2],r=m[f+3],s=m[f+4],t=m[f+5],u=m[f+6],v=m[f+7],w=m[f+8],x=m[f+9],y=m[f+10],z=m[f+11],A=m[f+12],B=m[f+13],C=m[f+14],D=m[f+15],b=g[0],c=g[1],d=g[2],e=g[3],b=h(b,c,d,e,j,7,a[0]),e=h(e,b,c,d,p,12,a[1]),d=h(d,e,b,c,q,17,a[2]),c=h(c,d,e,b,r,22,a[3]),b=h(b,c,d,e,s,7,a[4]),e=h(e,b,c,d,t,12,a[5]),d=h(d,e,b,c,u,17,a[6]),c=h(c,d,e,b,v,22,a[7]), 9 | b=h(b,c,d,e,w,7,a[8]),e=h(e,b,c,d,x,12,a[9]),d=h(d,e,b,c,y,17,a[10]),c=h(c,d,e,b,z,22,a[11]),b=h(b,c,d,e,A,7,a[12]),e=h(e,b,c,d,B,12,a[13]),d=h(d,e,b,c,C,17,a[14]),c=h(c,d,e,b,D,22,a[15]),b=k(b,c,d,e,p,5,a[16]),e=k(e,b,c,d,u,9,a[17]),d=k(d,e,b,c,z,14,a[18]),c=k(c,d,e,b,j,20,a[19]),b=k(b,c,d,e,t,5,a[20]),e=k(e,b,c,d,y,9,a[21]),d=k(d,e,b,c,D,14,a[22]),c=k(c,d,e,b,s,20,a[23]),b=k(b,c,d,e,x,5,a[24]),e=k(e,b,c,d,C,9,a[25]),d=k(d,e,b,c,r,14,a[26]),c=k(c,d,e,b,w,20,a[27]),b=k(b,c,d,e,B,5,a[28]),e=k(e,b, 10 | c,d,q,9,a[29]),d=k(d,e,b,c,v,14,a[30]),c=k(c,d,e,b,A,20,a[31]),b=l(b,c,d,e,t,4,a[32]),e=l(e,b,c,d,w,11,a[33]),d=l(d,e,b,c,z,16,a[34]),c=l(c,d,e,b,C,23,a[35]),b=l(b,c,d,e,p,4,a[36]),e=l(e,b,c,d,s,11,a[37]),d=l(d,e,b,c,v,16,a[38]),c=l(c,d,e,b,y,23,a[39]),b=l(b,c,d,e,B,4,a[40]),e=l(e,b,c,d,j,11,a[41]),d=l(d,e,b,c,r,16,a[42]),c=l(c,d,e,b,u,23,a[43]),b=l(b,c,d,e,x,4,a[44]),e=l(e,b,c,d,A,11,a[45]),d=l(d,e,b,c,D,16,a[46]),c=l(c,d,e,b,q,23,a[47]),b=n(b,c,d,e,j,6,a[48]),e=n(e,b,c,d,v,10,a[49]),d=n(d,e,b,c, 11 | C,15,a[50]),c=n(c,d,e,b,t,21,a[51]),b=n(b,c,d,e,A,6,a[52]),e=n(e,b,c,d,r,10,a[53]),d=n(d,e,b,c,y,15,a[54]),c=n(c,d,e,b,p,21,a[55]),b=n(b,c,d,e,w,6,a[56]),e=n(e,b,c,d,D,10,a[57]),d=n(d,e,b,c,u,15,a[58]),c=n(c,d,e,b,B,21,a[59]),b=n(b,c,d,e,s,6,a[60]),e=n(e,b,c,d,z,10,a[61]),d=n(d,e,b,c,q,15,a[62]),c=n(c,d,e,b,x,21,a[63]);g[0]=g[0]+b|0;g[1]=g[1]+c|0;g[2]=g[2]+d|0;g[3]=g[3]+e|0},_doFinalize:function(){var a=this._data,f=a.words,g=8*this._nDataBytes,j=8*a.sigBytes;f[j>>>5]|=128<<24-j%32;var h=E.floor(g/ 12 | 4294967296);f[(j+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;f[(j+64>>>9<<4)+14]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;a.sigBytes=4*(f.length+1);this._process();a=this._hash;f=a.words;for(g=0;4>g;g++)j=f[g],f[g]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=s.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=s._createHelper(q);r.HmacMD5=s._createHmacHelper(q)})(Math); 13 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-cfb-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.mode.CFB=function(){function g(c,b,e,a){var d=this._iv;d?(d=d.slice(0),this._iv=void 0):d=this._prevBlock;a.encryptBlock(d,0);for(a=0;a>24&255)){var c=a>>16&255,b=a>>8&255,e=a&255;255===c?(c=0,255===b?(b=0,255===e?e=0:++e):++b):++c;a=0+(c<<16)+(b<<8);a+=e}else a+=16777216;return a}var g=CryptoJS.lib.BlockCipherMode.extend(),j=g.Encryptor=g.extend({processBlock:function(a,c){var b=this._cipher,e=b.blockSize,d=this._iv,f=this._counter;d&&(f=this._counter=d.slice(0),this._iv=void 0);d=f;if(0===(d[0]=h(d[0])))d[1]=h(d[1]);f=f.slice(0);b.encryptBlock(f,0);for(b=0;b> 24) & 0xff) === 0xff) { //overflow 18 | var b1 = (word >> 16)&0xff; 19 | var b2 = (word >> 8)&0xff; 20 | var b3 = word & 0xff; 21 | 22 | if (b1 === 0xff) // overflow b1 23 | { 24 | b1 = 0; 25 | if (b2 === 0xff) 26 | { 27 | b2 = 0; 28 | if (b3 === 0xff) 29 | { 30 | b3 = 0; 31 | } 32 | else 33 | { 34 | ++b3; 35 | } 36 | } 37 | else 38 | { 39 | ++b2; 40 | } 41 | } 42 | else 43 | { 44 | ++b1; 45 | } 46 | 47 | word = 0; 48 | word += (b1 << 16); 49 | word += (b2 << 8); 50 | word += b3; 51 | } 52 | else 53 | { 54 | word += (0x01 << 24); 55 | } 56 | return word; 57 | } 58 | 59 | function incCounter(counter) 60 | { 61 | if ((counter[0] = incWord(counter[0])) === 0) 62 | { 63 | // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 64 | counter[1] = incWord(counter[1]); 65 | } 66 | return counter; 67 | } 68 | 69 | var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ 70 | processBlock: function (words, offset) { 71 | // Shortcuts 72 | var cipher = this._cipher 73 | var blockSize = cipher.blockSize; 74 | var iv = this._iv; 75 | var counter = this._counter; 76 | 77 | // Generate keystream 78 | if (iv) { 79 | counter = this._counter = iv.slice(0); 80 | 81 | // Remove IV for subsequent blocks 82 | this._iv = undefined; 83 | } 84 | 85 | incCounter(counter); 86 | 87 | var keystream = counter.slice(0); 88 | cipher.encryptBlock(keystream, 0); 89 | 90 | // Encrypt 91 | for (var i = 0; i < blockSize; i++) { 92 | words[offset + i] ^= keystream[i]; 93 | } 94 | } 95 | }); 96 | 97 | CTRGladman.Decryptor = Encryptor; 98 | 99 | return CTRGladman; 100 | }()); 101 | 102 | 103 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/mode-ctr-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.mode.CTR=function(){var b=CryptoJS.lib.BlockCipherMode.extend(),g=b.Encryptor=b.extend({processBlock:function(b,f){var a=this._cipher,e=a.blockSize,c=this._iv,d=this._counter;c&&(d=this._counter=c.slice(0),this._iv=void 0);c=d.slice(0);a.encryptBlock(c,0);d[e-1]=d[e-1]+1|0;for(a=0;a>>2]|=c<<24-8*(b%4);a.sigBytes+=c},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-ansix923.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * ANSI X.923 padding strategy. 9 | */ 10 | CryptoJS.pad.AnsiX923 = { 11 | pad: function (data, blockSize) { 12 | // Shortcuts 13 | var dataSigBytes = data.sigBytes; 14 | var blockSizeBytes = blockSize * 4; 15 | 16 | // Count padding bytes 17 | var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; 18 | 19 | // Compute last byte position 20 | var lastBytePos = dataSigBytes + nPaddingBytes - 1; 21 | 22 | // Pad 23 | data.clamp(); 24 | data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); 25 | data.sigBytes += nPaddingBytes; 26 | }, 27 | 28 | unpad: function (data) { 29 | // Get number of padding bytes from last byte 30 | var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; 31 | 32 | // Remove padding 33 | data.sigBytes -= nPaddingBytes; 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-iso10126-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.Iso10126={pad:function(a,c){var b=4*c,b=b-a.sigBytes%b;a.concat(CryptoJS.lib.WordArray.random(b-1)).concat(CryptoJS.lib.WordArray.create([b<<24],1))},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-iso10126.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * ISO 10126 padding strategy. 9 | */ 10 | CryptoJS.pad.Iso10126 = { 11 | pad: function (data, blockSize) { 12 | // Shortcut 13 | var blockSizeBytes = blockSize * 4; 14 | 15 | // Count padding bytes 16 | var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; 17 | 18 | // Pad 19 | data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). 20 | concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); 21 | }, 22 | 23 | unpad: function (data) { 24 | // Get number of padding bytes from last byte 25 | var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; 26 | 27 | // Remove padding 28 | data.sigBytes -= nPaddingBytes; 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-iso97971-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.Iso97971={pad:function(a,b){a.concat(CryptoJS.lib.WordArray.create([2147483648],1));CryptoJS.pad.ZeroPadding.pad(a,b)},unpad:function(a){CryptoJS.pad.ZeroPadding.unpad(a);a.sigBytes--}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-iso97971.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * ISO/IEC 9797-1 Padding Method 2. 9 | */ 10 | CryptoJS.pad.Iso97971 = { 11 | pad: function (data, blockSize) { 12 | // Add 0x80 byte 13 | data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); 14 | 15 | // Zero pad the rest 16 | CryptoJS.pad.ZeroPadding.pad(data, blockSize); 17 | }, 18 | 19 | unpad: function (data) { 20 | // Remove zero padding 21 | CryptoJS.pad.ZeroPadding.unpad(data); 22 | 23 | // Remove one more byte -- the 0x80 byte 24 | data.sigBytes--; 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-nopadding-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.NoPadding={pad:function(){},unpad:function(){}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-nopadding.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * A noop padding strategy. 9 | */ 10 | CryptoJS.pad.NoPadding = { 11 | pad: function () { 12 | }, 13 | 14 | unpad: function () { 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-zeropadding-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.pad.ZeroPadding={pad:function(a,c){var b=4*c;a.clamp();a.sigBytes+=b-(a.sigBytes%b||b)},unpad:function(a){for(var c=a.words,b=a.sigBytes-1;!(c[b>>>2]>>>24-8*(b%4)&255);)b--;a.sigBytes=b+1}}; 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pad-zeropadding.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * Zero padding strategy. 9 | */ 10 | CryptoJS.pad.ZeroPadding = { 11 | pad: function (data, blockSize) { 12 | // Shortcut 13 | var blockSizeBytes = blockSize * 4; 14 | 15 | // Pad 16 | data.clamp(); 17 | data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); 18 | }, 19 | 20 | unpad: function (data) { 21 | // Shortcut 22 | var dataWords = data.words; 23 | 24 | // Unpad 25 | var i = data.sigBytes - 1; 26 | while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { 27 | i--; 28 | } 29 | data.sigBytes = i + 1; 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/pbkdf2-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var b=CryptoJS,a=b.lib,d=a.Base,m=a.WordArray,a=b.algo,q=a.HMAC,l=a.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,f=q.create(c.hasher,a),g=m.create(),d=m.create([1]),l=g.words,r=d.words,n=c.keySize,c=c.iterations;l.lengthc;c++)f[c]=d[c];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(c=0;8>c;c++){var h=a[c]+d[c],e=h&65535, 8 | g=h>>>16;b[c]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}a[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0;a[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0;a[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0;a[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0;a[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0;a[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0;a[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0;a[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],b=[],l=j.algo.RabbitLegacy= 9 | k.extend({_doReset:function(){for(var a=this._key.words,d=this.cfg.iv,c=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],a=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535],b=this._b=0;4>b;b++)g.call(this);for(b=0;8>b;b++)a[b]^=c[b+4&7];if(d){var c=d.words,d=c[0],c=c[1],d=(d<<8|d>>>24)&16711935|(d<< 10 | 24|d>>>8)&4278255360,c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,b=d>>>16|c&4294901760,e=c<<16|d&65535;a[0]^=d;a[1]^=b;a[2]^=c;a[3]^=e;a[4]^=d;a[5]^=b;a[6]^=c;a[7]^=e;for(b=0;4>b;b++)g.call(this)}},_doProcessBlock:function(a,b){var c=this._X;g.call(this);e[0]=c[0]^c[5]>>>16^c[3]<<16;e[1]=c[2]^c[7]>>>16^c[5]<<16;e[2]=c[4]^c[1]>>>16^c[7]<<16;e[3]=c[6]^c[3]>>>16^c[1]<<16;for(c=0;4>c;c++)e[c]=(e[c]<<8|e[c]>>>24)&16711935|(e[c]<<24|e[c]>>>8)&4278255360,a[b+c]^=e[c]},blockSize:4,ivSize:2});j.RabbitLegacy= 11 | k._createHelper(l)})(); 12 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/rabbit-legacy.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var StreamCipher = C_lib.StreamCipher; 12 | var C_algo = C.algo; 13 | 14 | // Reusable objects 15 | var S = []; 16 | var C_ = []; 17 | var G = []; 18 | 19 | /** 20 | * Rabbit stream cipher algorithm. 21 | * 22 | * This is a legacy version that neglected to convert the key to little-endian. 23 | * This error doesn't affect the cipher's security, 24 | * but it does affect its compatibility with other implementations. 25 | */ 26 | var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ 27 | _doReset: function () { 28 | // Shortcuts 29 | var K = this._key.words; 30 | var iv = this.cfg.iv; 31 | 32 | // Generate initial state values 33 | var X = this._X = [ 34 | K[0], (K[3] << 16) | (K[2] >>> 16), 35 | K[1], (K[0] << 16) | (K[3] >>> 16), 36 | K[2], (K[1] << 16) | (K[0] >>> 16), 37 | K[3], (K[2] << 16) | (K[1] >>> 16) 38 | ]; 39 | 40 | // Generate initial counter values 41 | var C = this._C = [ 42 | (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), 43 | (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), 44 | (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), 45 | (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) 46 | ]; 47 | 48 | // Carry bit 49 | this._b = 0; 50 | 51 | // Iterate the system four times 52 | for (var i = 0; i < 4; i++) { 53 | nextState.call(this); 54 | } 55 | 56 | // Modify the counters 57 | for (var i = 0; i < 8; i++) { 58 | C[i] ^= X[(i + 4) & 7]; 59 | } 60 | 61 | // IV setup 62 | if (iv) { 63 | // Shortcuts 64 | var IV = iv.words; 65 | var IV_0 = IV[0]; 66 | var IV_1 = IV[1]; 67 | 68 | // Generate four subvectors 69 | var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); 70 | var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); 71 | var i1 = (i0 >>> 16) | (i2 & 0xffff0000); 72 | var i3 = (i2 << 16) | (i0 & 0x0000ffff); 73 | 74 | // Modify counter values 75 | C[0] ^= i0; 76 | C[1] ^= i1; 77 | C[2] ^= i2; 78 | C[3] ^= i3; 79 | C[4] ^= i0; 80 | C[5] ^= i1; 81 | C[6] ^= i2; 82 | C[7] ^= i3; 83 | 84 | // Iterate the system four times 85 | for (var i = 0; i < 4; i++) { 86 | nextState.call(this); 87 | } 88 | } 89 | }, 90 | 91 | _doProcessBlock: function (M, offset) { 92 | // Shortcut 93 | var X = this._X; 94 | 95 | // Iterate the system 96 | nextState.call(this); 97 | 98 | // Generate four keystream words 99 | S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); 100 | S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); 101 | S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); 102 | S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); 103 | 104 | for (var i = 0; i < 4; i++) { 105 | // Swap endian 106 | S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | 107 | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); 108 | 109 | // Encrypt 110 | M[offset + i] ^= S[i]; 111 | } 112 | }, 113 | 114 | blockSize: 128/32, 115 | 116 | ivSize: 64/32 117 | }); 118 | 119 | function nextState() { 120 | // Shortcuts 121 | var X = this._X; 122 | var C = this._C; 123 | 124 | // Save old counter values 125 | for (var i = 0; i < 8; i++) { 126 | C_[i] = C[i]; 127 | } 128 | 129 | // Calculate new counter values 130 | C[0] = (C[0] + 0x4d34d34d + this._b) | 0; 131 | C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; 132 | C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; 133 | C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; 134 | C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; 135 | C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; 136 | C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; 137 | C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; 138 | this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; 139 | 140 | // Calculate the g-values 141 | for (var i = 0; i < 8; i++) { 142 | var gx = X[i] + C[i]; 143 | 144 | // Construct high and low argument for squaring 145 | var ga = gx & 0xffff; 146 | var gb = gx >>> 16; 147 | 148 | // Calculate high and low result of squaring 149 | var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; 150 | var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); 151 | 152 | // High XOR low 153 | G[i] = gh ^ gl; 154 | } 155 | 156 | // Calculate new state values 157 | X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; 158 | X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; 159 | X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; 160 | X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; 161 | X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; 162 | X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; 163 | X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; 164 | X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; 165 | } 166 | 167 | /** 168 | * Shortcut functions to the cipher's object interface. 169 | * 170 | * @example 171 | * 172 | * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); 173 | * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); 174 | */ 175 | C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); 176 | }()); 177 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/rabbit-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){function g(){for(var b=this._X,d=this._C,a=0;8>a;a++)f[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var h=b[a]+d[a],e=h&65535, 8 | g=h>>>16;c[a]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],c=[],l=j.algo.Rabbit= 9 | k.extend({_doReset:function(){for(var b=this._key.words,d=this.cfg.iv,a=0;4>a;a++)b[a]=(b[a]<<8|b[a]>>>24)&16711935|(b[a]<<24|b[a]>>>8)&4278255360;for(var c=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],a=this._b=0;4>a;a++)g.call(this);for(a=0;8> 10 | a;a++)b[a]^=c[a+4&7];if(d){var a=d.words,d=a[0],a=a[1],d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,c=d>>>16|a&4294901760,e=a<<16|d&65535;b[0]^=d;b[1]^=c;b[2]^=a;b[3]^=e;b[4]^=d;b[5]^=c;b[6]^=a;b[7]^=e;for(a=0;4>a;a++)g.call(this)}},_doProcessBlock:function(b,c){var a=this._X;g.call(this);e[0]=a[0]^a[5]>>>16^a[3]<<16;e[1]=a[2]^a[7]>>>16^a[5]<<16;e[2]=a[4]^a[1]>>>16^a[7]<<16;e[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)e[a]=(e[a]<<8|e[a]>>>24)& 11 | 16711935|(e[a]<<24|e[a]>>>8)&4278255360,b[c+a]^=e[a]},blockSize:4,ivSize:2});j.Rabbit=k._createHelper(l)})(); 12 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/rabbit.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var StreamCipher = C_lib.StreamCipher; 12 | var C_algo = C.algo; 13 | 14 | // Reusable objects 15 | var S = []; 16 | var C_ = []; 17 | var G = []; 18 | 19 | /** 20 | * Rabbit stream cipher algorithm 21 | */ 22 | var Rabbit = C_algo.Rabbit = StreamCipher.extend({ 23 | _doReset: function () { 24 | // Shortcuts 25 | var K = this._key.words; 26 | var iv = this.cfg.iv; 27 | 28 | // Swap endian 29 | for (var i = 0; i < 4; i++) { 30 | K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | 31 | (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); 32 | } 33 | 34 | // Generate initial state values 35 | var X = this._X = [ 36 | K[0], (K[3] << 16) | (K[2] >>> 16), 37 | K[1], (K[0] << 16) | (K[3] >>> 16), 38 | K[2], (K[1] << 16) | (K[0] >>> 16), 39 | K[3], (K[2] << 16) | (K[1] >>> 16) 40 | ]; 41 | 42 | // Generate initial counter values 43 | var C = this._C = [ 44 | (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), 45 | (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), 46 | (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), 47 | (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) 48 | ]; 49 | 50 | // Carry bit 51 | this._b = 0; 52 | 53 | // Iterate the system four times 54 | for (var i = 0; i < 4; i++) { 55 | nextState.call(this); 56 | } 57 | 58 | // Modify the counters 59 | for (var i = 0; i < 8; i++) { 60 | C[i] ^= X[(i + 4) & 7]; 61 | } 62 | 63 | // IV setup 64 | if (iv) { 65 | // Shortcuts 66 | var IV = iv.words; 67 | var IV_0 = IV[0]; 68 | var IV_1 = IV[1]; 69 | 70 | // Generate four subvectors 71 | var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); 72 | var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); 73 | var i1 = (i0 >>> 16) | (i2 & 0xffff0000); 74 | var i3 = (i2 << 16) | (i0 & 0x0000ffff); 75 | 76 | // Modify counter values 77 | C[0] ^= i0; 78 | C[1] ^= i1; 79 | C[2] ^= i2; 80 | C[3] ^= i3; 81 | C[4] ^= i0; 82 | C[5] ^= i1; 83 | C[6] ^= i2; 84 | C[7] ^= i3; 85 | 86 | // Iterate the system four times 87 | for (var i = 0; i < 4; i++) { 88 | nextState.call(this); 89 | } 90 | } 91 | }, 92 | 93 | _doProcessBlock: function (M, offset) { 94 | // Shortcut 95 | var X = this._X; 96 | 97 | // Iterate the system 98 | nextState.call(this); 99 | 100 | // Generate four keystream words 101 | S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); 102 | S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); 103 | S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); 104 | S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); 105 | 106 | for (var i = 0; i < 4; i++) { 107 | // Swap endian 108 | S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | 109 | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); 110 | 111 | // Encrypt 112 | M[offset + i] ^= S[i]; 113 | } 114 | }, 115 | 116 | blockSize: 128/32, 117 | 118 | ivSize: 64/32 119 | }); 120 | 121 | function nextState() { 122 | // Shortcuts 123 | var X = this._X; 124 | var C = this._C; 125 | 126 | // Save old counter values 127 | for (var i = 0; i < 8; i++) { 128 | C_[i] = C[i]; 129 | } 130 | 131 | // Calculate new counter values 132 | C[0] = (C[0] + 0x4d34d34d + this._b) | 0; 133 | C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; 134 | C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; 135 | C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; 136 | C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; 137 | C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; 138 | C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; 139 | C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; 140 | this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; 141 | 142 | // Calculate the g-values 143 | for (var i = 0; i < 8; i++) { 144 | var gx = X[i] + C[i]; 145 | 146 | // Construct high and low argument for squaring 147 | var ga = gx & 0xffff; 148 | var gb = gx >>> 16; 149 | 150 | // Calculate high and low result of squaring 151 | var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; 152 | var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); 153 | 154 | // High XOR low 155 | G[i] = gh ^ gl; 156 | } 157 | 158 | // Calculate new state values 159 | X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; 160 | X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; 161 | X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; 162 | X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; 163 | X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; 164 | X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; 165 | X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; 166 | X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; 167 | } 168 | 169 | /** 170 | * Shortcut functions to the cipher's object interface. 171 | * 172 | * @example 173 | * 174 | * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); 175 | * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); 176 | */ 177 | C.Rabbit = StreamCipher._createHelper(Rabbit); 178 | }()); 179 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/rc4-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){function l(){for(var a=this._S,d=this._i,c=this._j,b=0,e=0;4>e;e++){var d=(d+1)%256,c=(c+a[d])%256,f=a[d];a[d]=a[c];a[c]=f;b|=a[(a[d]+a[c])%256]<<24-8*e}this._i=d;this._j=c;return b}var g=CryptoJS,k=g.lib.StreamCipher,h=g.algo,j=h.RC4=k.extend({_doReset:function(){for(var a=this._key,d=a.words,a=a.sigBytes,c=this._S=[],b=0;256>b;b++)c[b]=b;for(var e=b=0;256>b;b++){var f=b%a,e=(e+c[b]+(d[f>>>2]>>>24-8*(f%4)&255))%256,f=c[b];c[b]=c[e];c[e]=f}this._i=this._j=0},_doProcessBlock:function(a, 8 | d){a[d]^=l.call(this)},keySize:8,ivSize:0});g.RC4=k._createHelper(j);h=h.RC4Drop=j.extend({cfg:j.cfg.extend({drop:192}),_doReset:function(){j._doReset.call(this);for(var a=this.cfg.drop;0>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; 34 | 35 | j = (j + S[i] + keyByte) % 256; 36 | 37 | // Swap 38 | var t = S[i]; 39 | S[i] = S[j]; 40 | S[j] = t; 41 | } 42 | 43 | // Counters 44 | this._i = this._j = 0; 45 | }, 46 | 47 | _doProcessBlock: function (M, offset) { 48 | M[offset] ^= generateKeystreamWord.call(this); 49 | }, 50 | 51 | keySize: 256/32, 52 | 53 | ivSize: 0 54 | }); 55 | 56 | function generateKeystreamWord() { 57 | // Shortcuts 58 | var S = this._S; 59 | var i = this._i; 60 | var j = this._j; 61 | 62 | // Generate keystream word 63 | var keystreamWord = 0; 64 | for (var n = 0; n < 4; n++) { 65 | i = (i + 1) % 256; 66 | j = (j + S[i]) % 256; 67 | 68 | // Swap 69 | var t = S[i]; 70 | S[i] = S[j]; 71 | S[j] = t; 72 | 73 | keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); 74 | } 75 | 76 | // Update counters 77 | this._i = i; 78 | this._j = j; 79 | 80 | return keystreamWord; 81 | } 82 | 83 | /** 84 | * Shortcut functions to the cipher's object interface. 85 | * 86 | * @example 87 | * 88 | * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); 89 | * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); 90 | */ 91 | C.RC4 = StreamCipher._createHelper(RC4); 92 | 93 | /** 94 | * Modified RC4 stream cipher algorithm. 95 | */ 96 | var RC4Drop = C_algo.RC4Drop = RC4.extend({ 97 | /** 98 | * Configuration options. 99 | * 100 | * @property {number} drop The number of keystream words to drop. Default 192 101 | */ 102 | cfg: RC4.cfg.extend({ 103 | drop: 192 104 | }), 105 | 106 | _doReset: function () { 107 | RC4._doReset.call(this); 108 | 109 | // Drop 110 | for (var i = this.cfg.drop; i > 0; i--) { 111 | generateKeystreamWord.call(this); 112 | } 113 | } 114 | }); 115 | 116 | /** 117 | * Shortcut functions to the cipher's object interface. 118 | * 119 | * @example 120 | * 121 | * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); 122 | * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); 123 | */ 124 | C.RC4Drop = StreamCipher._createHelper(RC4Drop); 125 | }()); 126 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/ripemd160-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /* 8 | 9 | (c) 2012 by C?dric Mesnil. All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 12 | 13 | - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 14 | - 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. 15 | 16 | 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. 17 | */ 18 | (function(){var q=CryptoJS,d=q.lib,n=d.WordArray,p=d.Hasher,d=q.algo,x=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),y=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),z=n.create([11,14,15,12, 19 | 5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),A=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),B=n.create([0,1518500249,1859775393,2400959708,2840853838]),C=n.create([1352829926,1548603684,1836072691, 20 | 2053994217,0]),d=d.RIPEMD160=p.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,v){for(var b=0;16>b;b++){var c=v+b,f=e[c];e[c]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var c=this._hash.words,f=B.words,d=C.words,n=x.words,q=y.words,p=z.words,w=A.words,t,g,h,j,r,u,k,l,m,s;u=t=c[0];k=g=c[1];l=h=c[2];m=j=c[3];s=r=c[4];for(var a,b=0;80>b;b+=1)a=t+e[v+n[b]]|0,a=16>b?a+((g^h^j)+f[0]):32>b?a+((g&h|~g&j)+f[1]):48>b? 21 | a+(((g|~h)^j)+f[2]):64>b?a+((g&j|h&~j)+f[3]):a+((g^(h|~j))+f[4]),a|=0,a=a<>>32-p[b],a=a+r|0,t=r,r=j,j=h<<10|h>>>22,h=g,g=a,a=u+e[v+q[b]]|0,a=16>b?a+((k^(l|~m))+d[0]):32>b?a+((k&m|l&~m)+d[1]):48>b?a+(((k|~l)^m)+d[2]):64>b?a+((k&l|~k&m)+d[3]):a+((k^l^m)+d[4]),a|=0,a=a<>>32-w[b],a=a+s|0,u=s,s=m,m=l<<10|l>>>22,l=k,k=a;a=c[1]+h+m|0;c[1]=c[2]+j+s|0;c[2]=c[3]+r+u|0;c[3]=c[4]+t+k|0;c[4]=c[0]+g+l|0;c[0]=a},_doFinalize:function(){var e=this._data,d=e.words,b=8*this._nDataBytes,c=8*e.sigBytes; 22 | d[c>>>5]|=128<<24-c%32;d[(c+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;e.sigBytes=4*(d.length+1);this._process();e=this._hash;d=e.words;for(b=0;5>b;b++)c=d[b],d[b]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return e},clone:function(){var d=p.clone.call(this);d._hash=this._hash.clone();return d}});q.RIPEMD160=p._createHelper(d);q.HmacRIPEMD160=p._createHmacHelper(d)})(Math); 23 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha1-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (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^ 8 | 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)})(); 9 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha1.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var Hasher = C_lib.Hasher; 13 | var C_algo = C.algo; 14 | 15 | // Reusable object 16 | var W = []; 17 | 18 | /** 19 | * SHA-1 hash algorithm. 20 | */ 21 | var SHA1 = C_algo.SHA1 = Hasher.extend({ 22 | _doReset: function () { 23 | this._hash = new WordArray.init([ 24 | 0x67452301, 0xefcdab89, 25 | 0x98badcfe, 0x10325476, 26 | 0xc3d2e1f0 27 | ]); 28 | }, 29 | 30 | _doProcessBlock: function (M, offset) { 31 | // Shortcut 32 | var H = this._hash.words; 33 | 34 | // Working variables 35 | var a = H[0]; 36 | var b = H[1]; 37 | var c = H[2]; 38 | var d = H[3]; 39 | var e = H[4]; 40 | 41 | // Computation 42 | for (var i = 0; i < 80; i++) { 43 | if (i < 16) { 44 | W[i] = M[offset + i] | 0; 45 | } else { 46 | var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; 47 | W[i] = (n << 1) | (n >>> 31); 48 | } 49 | 50 | var t = ((a << 5) | (a >>> 27)) + e + W[i]; 51 | if (i < 20) { 52 | t += ((b & c) | (~b & d)) + 0x5a827999; 53 | } else if (i < 40) { 54 | t += (b ^ c ^ d) + 0x6ed9eba1; 55 | } else if (i < 60) { 56 | t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; 57 | } else /* if (i < 80) */ { 58 | t += (b ^ c ^ d) - 0x359d3e2a; 59 | } 60 | 61 | e = d; 62 | d = c; 63 | c = (b << 30) | (b >>> 2); 64 | b = a; 65 | a = t; 66 | } 67 | 68 | // Intermediate hash value 69 | H[0] = (H[0] + a) | 0; 70 | H[1] = (H[1] + b) | 0; 71 | H[2] = (H[2] + c) | 0; 72 | H[3] = (H[3] + d) | 0; 73 | H[4] = (H[4] + e) | 0; 74 | }, 75 | 76 | _doFinalize: function () { 77 | // Shortcuts 78 | var data = this._data; 79 | var dataWords = data.words; 80 | 81 | var nBitsTotal = this._nDataBytes * 8; 82 | var nBitsLeft = data.sigBytes * 8; 83 | 84 | // Add padding 85 | dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 86 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); 87 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; 88 | data.sigBytes = dataWords.length * 4; 89 | 90 | // Hash final blocks 91 | this._process(); 92 | 93 | // Return final computed hash 94 | return this._hash; 95 | }, 96 | 97 | clone: function () { 98 | var clone = Hasher.clone.call(this); 99 | clone._hash = this._hash.clone(); 100 | 101 | return clone; 102 | } 103 | }); 104 | 105 | /** 106 | * Shortcut function to the hasher's object interface. 107 | * 108 | * @param {WordArray|string} message The message to hash. 109 | * 110 | * @return {WordArray} The hash. 111 | * 112 | * @static 113 | * 114 | * @example 115 | * 116 | * var hash = CryptoJS.SHA1('message'); 117 | * var hash = CryptoJS.SHA1(wordArray); 118 | */ 119 | C.SHA1 = Hasher._createHelper(SHA1); 120 | 121 | /** 122 | * Shortcut function to the HMAC's object interface. 123 | * 124 | * @param {WordArray|string} message The message to hash. 125 | * @param {WordArray|string} key The secret key. 126 | * 127 | * @return {WordArray} The HMAC. 128 | * 129 | * @static 130 | * 131 | * @example 132 | * 133 | * var hmac = CryptoJS.HmacSHA1(message, key); 134 | */ 135 | C.HmacSHA1 = Hasher._createHmacHelper(SHA1); 136 | }()); 137 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha224-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var b=CryptoJS,d=b.lib.WordArray,a=b.algo,c=a.SHA256,a=a.SHA224=c.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=c._doFinalize.call(this);a.sigBytes-=4;return a}});b.SHA224=c._createHelper(a);b.HmacSHA224=c._createHmacHelper(a)})(); 8 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha224.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var C_algo = C.algo; 13 | var SHA256 = C_algo.SHA256; 14 | 15 | /** 16 | * SHA-224 hash algorithm. 17 | */ 18 | var SHA224 = C_algo.SHA224 = SHA256.extend({ 19 | _doReset: function () { 20 | this._hash = new WordArray.init([ 21 | 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 22 | 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 23 | ]); 24 | }, 25 | 26 | _doFinalize: function () { 27 | var hash = SHA256._doFinalize.call(this); 28 | 29 | hash.sigBytes -= 4; 30 | 31 | return hash; 32 | } 33 | }); 34 | 35 | /** 36 | * Shortcut function to the hasher's object interface. 37 | * 38 | * @param {WordArray|string} message The message to hash. 39 | * 40 | * @return {WordArray} The hash. 41 | * 42 | * @static 43 | * 44 | * @example 45 | * 46 | * var hash = CryptoJS.SHA224('message'); 47 | * var hash = CryptoJS.SHA224(wordArray); 48 | */ 49 | C.SHA224 = SHA256._createHelper(SHA224); 50 | 51 | /** 52 | * Shortcut function to the HMAC's object interface. 53 | * 54 | * @param {WordArray|string} message The message to hash. 55 | * @param {WordArray|string} key The secret key. 56 | * 57 | * @return {WordArray} The HMAC. 58 | * 59 | * @static 60 | * 61 | * @example 62 | * 63 | * var hmac = CryptoJS.HmacSHA224(message, key); 64 | */ 65 | C.HmacSHA224 = SHA256._createHmacHelper(SHA224); 66 | }()); 67 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha256-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (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]= 8 | 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; 9 | 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); 10 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha256.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function (Math) { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_lib = C.lib; 11 | var WordArray = C_lib.WordArray; 12 | var Hasher = C_lib.Hasher; 13 | var C_algo = C.algo; 14 | 15 | // Initialization and round constants tables 16 | var H = []; 17 | var K = []; 18 | 19 | // Compute constants 20 | (function () { 21 | function isPrime(n) { 22 | var sqrtN = Math.sqrt(n); 23 | for (var factor = 2; factor <= sqrtN; factor++) { 24 | if (!(n % factor)) { 25 | return false; 26 | } 27 | } 28 | 29 | return true; 30 | } 31 | 32 | function getFractionalBits(n) { 33 | return ((n - (n | 0)) * 0x100000000) | 0; 34 | } 35 | 36 | var n = 2; 37 | var nPrime = 0; 38 | while (nPrime < 64) { 39 | if (isPrime(n)) { 40 | if (nPrime < 8) { 41 | H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); 42 | } 43 | K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); 44 | 45 | nPrime++; 46 | } 47 | 48 | n++; 49 | } 50 | }()); 51 | 52 | // Reusable object 53 | var W = []; 54 | 55 | /** 56 | * SHA-256 hash algorithm. 57 | */ 58 | var SHA256 = C_algo.SHA256 = Hasher.extend({ 59 | _doReset: function () { 60 | this._hash = new WordArray.init(H.slice(0)); 61 | }, 62 | 63 | _doProcessBlock: function (M, offset) { 64 | // Shortcut 65 | var H = this._hash.words; 66 | 67 | // Working variables 68 | var a = H[0]; 69 | var b = H[1]; 70 | var c = H[2]; 71 | var d = H[3]; 72 | var e = H[4]; 73 | var f = H[5]; 74 | var g = H[6]; 75 | var h = H[7]; 76 | 77 | // Computation 78 | for (var i = 0; i < 64; i++) { 79 | if (i < 16) { 80 | W[i] = M[offset + i] | 0; 81 | } else { 82 | var gamma0x = W[i - 15]; 83 | var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ 84 | ((gamma0x << 14) | (gamma0x >>> 18)) ^ 85 | (gamma0x >>> 3); 86 | 87 | var gamma1x = W[i - 2]; 88 | var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ 89 | ((gamma1x << 13) | (gamma1x >>> 19)) ^ 90 | (gamma1x >>> 10); 91 | 92 | W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; 93 | } 94 | 95 | var ch = (e & f) ^ (~e & g); 96 | var maj = (a & b) ^ (a & c) ^ (b & c); 97 | 98 | var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); 99 | var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); 100 | 101 | var t1 = h + sigma1 + ch + K[i] + W[i]; 102 | var t2 = sigma0 + maj; 103 | 104 | h = g; 105 | g = f; 106 | f = e; 107 | e = (d + t1) | 0; 108 | d = c; 109 | c = b; 110 | b = a; 111 | a = (t1 + t2) | 0; 112 | } 113 | 114 | // Intermediate hash value 115 | H[0] = (H[0] + a) | 0; 116 | H[1] = (H[1] + b) | 0; 117 | H[2] = (H[2] + c) | 0; 118 | H[3] = (H[3] + d) | 0; 119 | H[4] = (H[4] + e) | 0; 120 | H[5] = (H[5] + f) | 0; 121 | H[6] = (H[6] + g) | 0; 122 | H[7] = (H[7] + h) | 0; 123 | }, 124 | 125 | _doFinalize: function () { 126 | // Shortcuts 127 | var data = this._data; 128 | var dataWords = data.words; 129 | 130 | var nBitsTotal = this._nDataBytes * 8; 131 | var nBitsLeft = data.sigBytes * 8; 132 | 133 | // Add padding 134 | dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); 135 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); 136 | dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; 137 | data.sigBytes = dataWords.length * 4; 138 | 139 | // Hash final blocks 140 | this._process(); 141 | 142 | // Return final computed hash 143 | return this._hash; 144 | }, 145 | 146 | clone: function () { 147 | var clone = Hasher.clone.call(this); 148 | clone._hash = this._hash.clone(); 149 | 150 | return clone; 151 | } 152 | }); 153 | 154 | /** 155 | * Shortcut function to the hasher's object interface. 156 | * 157 | * @param {WordArray|string} message The message to hash. 158 | * 159 | * @return {WordArray} The hash. 160 | * 161 | * @static 162 | * 163 | * @example 164 | * 165 | * var hash = CryptoJS.SHA256('message'); 166 | * var hash = CryptoJS.SHA256(wordArray); 167 | */ 168 | C.SHA256 = Hasher._createHelper(SHA256); 169 | 170 | /** 171 | * Shortcut function to the HMAC's object interface. 172 | * 173 | * @param {WordArray|string} message The message to hash. 174 | * @param {WordArray|string} key The secret key. 175 | * 176 | * @return {WordArray} The HMAC. 177 | * 178 | * @static 179 | * 180 | * @example 181 | * 182 | * var hmac = CryptoJS.HmacSHA256(message, key); 183 | */ 184 | C.HmacSHA256 = Hasher._createHmacHelper(SHA256); 185 | }(Math)); 186 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha3-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(y){for(var p=CryptoJS,m=p.lib,z=m.WordArray,q=m.Hasher,s=p.x64.Word,m=p.algo,v=[],w=[],x=[],c=1,d=0,l=0;24>l;l++){v[c+5*d]=(l+1)*(l+2)/2%64;var r=(2*c+3*d)%5,c=d%5,d=r}for(c=0;5>c;c++)for(d=0;5>d;d++)w[c+5*d]=d+5*((2*c+3*d)%5);c=1;for(d=0;24>d;d++){for(var t=r=l=0;7>t;t++){if(c&1){var u=(1<u?r^=1<c;c++)j[c]=s.create();m=m.SHA3=q.extend({cfg:q.cfg.extend({outputLength:512}),_doReset:function(){for(var c=this._state= 8 | [],n=0;25>n;n++)c[n]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(c,n){for(var h=this._state,d=this.blockSize/2,b=0;b>>24)&16711935|(e<<24|e>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,a=h[b];a.high^=f;a.low^=e}for(d=0;24>d;d++){for(b=0;5>b;b++){for(var k=e=0,g=0;5>g;g++)a=h[b+5*g],e^=a.high,k^=a.low;a=j[b];a.high=e;a.low=k}for(b=0;5>b;b++){a=j[(b+4)%5];e=j[(b+1)%5];f=e.high;g=e.low;e=a.high^ 9 | (f<<1|g>>>31);k=a.low^(g<<1|f>>>31);for(g=0;5>g;g++)a=h[b+5*g],a.high^=e,a.low^=k}for(f=1;25>f;f++)a=h[f],b=a.high,a=a.low,g=v[f],32>g?(e=b<>>32-g,k=a<>>32-g):(e=a<>>64-g,k=b<>>64-g),a=j[w[f]],a.high=e,a.low=k;a=j[0];b=h[0];a.high=b.high;a.low=b.low;for(b=0;5>b;b++)for(g=0;5>g;g++)f=b+5*g,a=h[f],e=j[f],f=j[(b+1)%5+5*g],k=j[(b+2)%5+5*g],a.high=e.high^~f.high&k.high,a.low=e.low^~f.low&k.low;a=h[0];b=x[d];a.high^=b.high;a.low^=b.low}},_doFinalize:function(){var c=this._data, 10 | d=c.words,h=8*c.sigBytes,j=32*this.blockSize;d[h>>>5]|=1<<24-h%32;d[(y.ceil((h+1)/j)*j>>>5)-1]|=128;c.sigBytes=4*d.length;this._process();for(var c=this._state,d=this.cfg.outputLength/8,h=d/8,j=[],b=0;b>>24)&16711935|(f<<24|f>>>8)&4278255360,e=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;j.push(e);j.push(f)}return new z.init(j,d)},clone:function(){for(var c=q.clone.call(this),d=c._state=this._state.slice(0),h=0;25>h;h++)d[h]=d[h].clone();return c}}); 11 | p.SHA3=q._createHelper(m);p.HmacSHA3=q._createHmacHelper(m)})(Math); 12 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha384-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var c=CryptoJS,a=c.x64,b=a.Word,e=a.WordArray,a=c.algo,d=a.SHA512,a=a.SHA384=d.extend({_doReset:function(){this._hash=new e.init([new b.init(3418070365,3238371032),new b.init(1654270250,914150663),new b.init(2438529370,812702999),new b.init(355462360,4144912697),new b.init(1731405415,4290775857),new b.init(2394180231,1750603025),new b.init(3675008525,1694076839),new b.init(1203062813,3204075428)])},_doFinalize:function(){var a=d._doFinalize.call(this);a.sigBytes-=16;return a}});c.SHA384= 8 | d._createHelper(a);c.HmacSHA384=d._createHmacHelper(a)})(); 9 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha384.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function () { 8 | // Shortcuts 9 | var C = CryptoJS; 10 | var C_x64 = C.x64; 11 | var X64Word = C_x64.Word; 12 | var X64WordArray = C_x64.WordArray; 13 | var C_algo = C.algo; 14 | var SHA512 = C_algo.SHA512; 15 | 16 | /** 17 | * SHA-384 hash algorithm. 18 | */ 19 | var SHA384 = C_algo.SHA384 = SHA512.extend({ 20 | _doReset: function () { 21 | this._hash = new X64WordArray.init([ 22 | new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), 23 | new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), 24 | new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), 25 | new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) 26 | ]); 27 | }, 28 | 29 | _doFinalize: function () { 30 | var hash = SHA512._doFinalize.call(this); 31 | 32 | hash.sigBytes -= 16; 33 | 34 | return hash; 35 | } 36 | }); 37 | 38 | /** 39 | * Shortcut function to the hasher's object interface. 40 | * 41 | * @param {WordArray|string} message The message to hash. 42 | * 43 | * @return {WordArray} The hash. 44 | * 45 | * @static 46 | * 47 | * @example 48 | * 49 | * var hash = CryptoJS.SHA384('message'); 50 | * var hash = CryptoJS.SHA384(wordArray); 51 | */ 52 | C.SHA384 = SHA512._createHelper(SHA384); 53 | 54 | /** 55 | * Shortcut function to the HMAC's object interface. 56 | * 57 | * @param {WordArray|string} message The message to hash. 58 | * @param {WordArray|string} key The secret key. 59 | * 60 | * @return {WordArray} The HMAC. 61 | * 62 | * @static 63 | * 64 | * @example 65 | * 66 | * var hmac = CryptoJS.HmacSHA384(message, key); 67 | */ 68 | C.HmacSHA384 = SHA512._createHmacHelper(SHA384); 69 | }()); 70 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/sha512-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){function a(){return d.create.apply(d,arguments)}for(var n=CryptoJS,r=n.lib.Hasher,e=n.x64,d=e.Word,T=e.WordArray,e=n.algo,ea=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317), 8 | a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291, 9 | 2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899), 10 | a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470, 11 | 3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],v=[],w=0;80>w;w++)v[w]=a();e=e.SHA512=r.extend({_doReset:function(){this._hash=new T.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,d){for(var f=this._hash.words, 12 | F=f[0],e=f[1],n=f[2],r=f[3],G=f[4],H=f[5],I=f[6],f=f[7],w=F.high,J=F.low,X=e.high,K=e.low,Y=n.high,L=n.low,Z=r.high,M=r.low,$=G.high,N=G.low,aa=H.high,O=H.low,ba=I.high,P=I.low,ca=f.high,Q=f.low,k=w,g=J,z=X,x=K,A=Y,y=L,U=Z,B=M,l=$,h=N,R=aa,C=O,S=ba,D=P,V=ca,E=Q,m=0;80>m;m++){var s=v[m];if(16>m)var j=s.high=a[d+2*m]|0,b=s.low=a[d+2*m+1]|0;else{var j=v[m-15],b=j.high,p=j.low,j=(b>>>1|p<<31)^(b>>>8|p<<24)^b>>>7,p=(p>>>1|b<<31)^(p>>>8|b<<24)^(p>>>7|b<<25),u=v[m-2],b=u.high,c=u.low,u=(b>>>19|c<<13)^(b<< 13 | 3|c>>>29)^b>>>6,c=(c>>>19|b<<13)^(c<<3|b>>>29)^(c>>>6|b<<26),b=v[m-7],W=b.high,t=v[m-16],q=t.high,t=t.low,b=p+b.low,j=j+W+(b>>>0

>>0?1:0),b=b+c,j=j+u+(b>>>0>>0?1:0),b=b+t,j=j+q+(b>>>0>>0?1:0);s.high=j;s.low=b}var W=l&R^~l&S,t=h&C^~h&D,s=k&z^k&A^z&A,T=g&x^g&y^x&y,p=(k>>>28|g<<4)^(k<<30|g>>>2)^(k<<25|g>>>7),u=(g>>>28|k<<4)^(g<<30|k>>>2)^(g<<25|k>>>7),c=ea[m],fa=c.high,da=c.low,c=E+((h>>>14|l<<18)^(h>>>18|l<<14)^(h<<23|l>>>9)),q=V+((l>>>14|h<<18)^(l>>>18|h<<14)^(l<<23|h>>>9))+(c>>>0>>0?1: 14 | 0),c=c+t,q=q+W+(c>>>0>>0?1:0),c=c+da,q=q+fa+(c>>>0>>0?1:0),c=c+b,q=q+j+(c>>>0>>0?1:0),b=u+T,s=p+s+(b>>>0>>0?1:0),V=S,E=D,S=R,D=C,R=l,C=h,h=B+c|0,l=U+q+(h>>>0>>0?1:0)|0,U=A,B=y,A=z,y=x,z=k,x=g,g=c+b|0,k=q+s+(g>>>0>>0?1:0)|0}J=F.low=J+g;F.high=w+k+(J>>>0>>0?1:0);K=e.low=K+x;e.high=X+z+(K>>>0>>0?1:0);L=n.low=L+y;n.high=Y+A+(L>>>0>>0?1:0);M=r.low=M+B;r.high=Z+U+(M>>>0>>0?1:0);N=G.low=N+h;G.high=$+l+(N>>>0>>0?1:0);O=H.low=O+C;H.high=aa+R+(O>>>0>>0?1:0);P=I.low=P+D; 15 | I.high=ba+S+(P>>>0>>0?1:0);Q=f.low=Q+E;f.high=ca+V+(Q>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,d=a.words,f=8*this._nDataBytes,e=8*a.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+128>>>10<<5)+30]=Math.floor(f/4294967296);d[(e+128>>>10<<5)+31]=f;a.sigBytes=4*d.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});n.SHA512=r._createHelper(e);n.HmacSHA512=r._createHmacHelper(e)})(); 16 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/components/x64-core-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(g){var a=CryptoJS,f=a.lib,e=f.Base,h=f.WordArray,a=a.x64={};a.Word=e.extend({init:function(b,c){this.high=b;this.low=c}});a.WordArray=e.extend({init:function(b,c){b=this.words=b||[];this.sigBytes=c!=g?c:8*b.length},toX32:function(){for(var b=this.words,c=b.length,a=[],d=0;d>>2]|=(a[h>>>2]>>>24-8*(h%4)&255)<<24-8*((l+h)%4);else if(65535>>2]=a[h>>>2];else j.push.apply(j,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,j=this.sigBytes;b[j>>>2]&=4294967295<< 9 | 32-8*(j%4);b.length=q.ceil(j/4)},clone:function(){var b=t.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var j=[],a=0;a>>2]>>>24-8*(l%4)&255;h.push((m>>>4).toString(16));h.push((m&15).toString(16))}return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>3]|=parseInt(b.substr(l, 10 | 2),16)<<24-4*(l%8);return new n.init(h,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var h=[],l=0;l>>2]>>>24-8*(l%4)&255));return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>2]|=(b.charCodeAt(l)&255)<<24-8*(l%4);return new n.init(h,a)}},s=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(h){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, 11 | h=g.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=s.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,h=a.words,l=a.sigBytes,m=this.blockSize,k=l/(4*m),k=b?q.ceil(k):q.max((k|0)-this._minBufferSize,0);b=k*m;l=q.min(4*b,l);if(b){for(var g=0;g>>32-l)+m}function k(a,m,b,j,g,l,k){a=a+(m&j|b&~j)+g+k;return(a<>>32-l)+m}function g(a,m,b,j,g,l,k){a=a+(m^b^j)+g+k;return(a<>>32-l)+m}function p(a,g,b,j,k,l,p){a=a+(b^(g|~j))+k+p;return(a<>>32-l)+g}for(var t=CryptoJS,n=t.lib,v=n.WordArray,u=n.Hasher,n=t.algo,a=[],s=0;64>s;s++)a[s]=4294967296*q.abs(q.sin(s+1))|0;n=n.MD5=u.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, 15 | _doProcessBlock:function(h,m){for(var b=0;16>b;b++){var j=m+b,n=h[j];h[j]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var b=this._hash.words,j=h[m+0],n=h[m+1],l=h[m+2],q=h[m+3],t=h[m+4],s=h[m+5],u=h[m+6],v=h[m+7],w=h[m+8],x=h[m+9],y=h[m+10],z=h[m+11],A=h[m+12],B=h[m+13],C=h[m+14],D=h[m+15],c=b[0],d=b[1],e=b[2],f=b[3],c=r(c,d,e,f,j,7,a[0]),f=r(f,c,d,e,n,12,a[1]),e=r(e,f,c,d,l,17,a[2]),d=r(d,e,f,c,q,22,a[3]),c=r(c,d,e,f,t,7,a[4]),f=r(f,c,d,e,s,12,a[5]),e=r(e,f,c,d,u,17,a[6]),d=r(d,e,f,c,v,22,a[7]), 16 | c=r(c,d,e,f,w,7,a[8]),f=r(f,c,d,e,x,12,a[9]),e=r(e,f,c,d,y,17,a[10]),d=r(d,e,f,c,z,22,a[11]),c=r(c,d,e,f,A,7,a[12]),f=r(f,c,d,e,B,12,a[13]),e=r(e,f,c,d,C,17,a[14]),d=r(d,e,f,c,D,22,a[15]),c=k(c,d,e,f,n,5,a[16]),f=k(f,c,d,e,u,9,a[17]),e=k(e,f,c,d,z,14,a[18]),d=k(d,e,f,c,j,20,a[19]),c=k(c,d,e,f,s,5,a[20]),f=k(f,c,d,e,y,9,a[21]),e=k(e,f,c,d,D,14,a[22]),d=k(d,e,f,c,t,20,a[23]),c=k(c,d,e,f,x,5,a[24]),f=k(f,c,d,e,C,9,a[25]),e=k(e,f,c,d,q,14,a[26]),d=k(d,e,f,c,w,20,a[27]),c=k(c,d,e,f,B,5,a[28]),f=k(f,c, 17 | d,e,l,9,a[29]),e=k(e,f,c,d,v,14,a[30]),d=k(d,e,f,c,A,20,a[31]),c=g(c,d,e,f,s,4,a[32]),f=g(f,c,d,e,w,11,a[33]),e=g(e,f,c,d,z,16,a[34]),d=g(d,e,f,c,C,23,a[35]),c=g(c,d,e,f,n,4,a[36]),f=g(f,c,d,e,t,11,a[37]),e=g(e,f,c,d,v,16,a[38]),d=g(d,e,f,c,y,23,a[39]),c=g(c,d,e,f,B,4,a[40]),f=g(f,c,d,e,j,11,a[41]),e=g(e,f,c,d,q,16,a[42]),d=g(d,e,f,c,u,23,a[43]),c=g(c,d,e,f,x,4,a[44]),f=g(f,c,d,e,A,11,a[45]),e=g(e,f,c,d,D,16,a[46]),d=g(d,e,f,c,l,23,a[47]),c=p(c,d,e,f,j,6,a[48]),f=p(f,c,d,e,v,10,a[49]),e=p(e,f,c,d, 18 | C,15,a[50]),d=p(d,e,f,c,s,21,a[51]),c=p(c,d,e,f,A,6,a[52]),f=p(f,c,d,e,q,10,a[53]),e=p(e,f,c,d,y,15,a[54]),d=p(d,e,f,c,n,21,a[55]),c=p(c,d,e,f,w,6,a[56]),f=p(f,c,d,e,D,10,a[57]),e=p(e,f,c,d,u,15,a[58]),d=p(d,e,f,c,B,21,a[59]),c=p(c,d,e,f,t,6,a[60]),f=p(f,c,d,e,z,10,a[61]),e=p(e,f,c,d,l,15,a[62]),d=p(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,g=a.words,b=8*this._nDataBytes,j=8*a.sigBytes;g[j>>>5]|=128<<24-j%32;var k=q.floor(b/ 19 | 4294967296);g[(j+64>>>9<<4)+15]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;g[(j+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(g.length+1);this._process();a=this._hash;g=a.words;for(b=0;4>b;b++)j=g[b],g[b]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=u.clone.call(this);a._hash=this._hash.clone();return a}});t.MD5=u._createHelper(n);t.HmacMD5=u._createHmacHelper(n)})(Math); 20 | (function(){var q=CryptoJS,r=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(k,g){k=this._hasher=new k.init;"string"==typeof g&&(g=r.parse(g));var p=k.blockSize,q=4*p;g.sigBytes>q&&(g=k.finalize(g));g.clamp();for(var n=this._oKey=g.clone(),v=this._iKey=g.clone(),u=n.words,a=v.words,s=0;s>>2]|=(B[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=B[b>>>2];else d.push.apply(d,B);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<< 20 | 32-8*(d%4);a.length=h.ceil(d/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var d=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, 21 | 2),16)<<24-4*(f%8);return new m.init(b,d/2)}},w=v.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var b=a.length,c=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new m.init(c,b)}},k=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(w.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return w.parse(unescape(encodeURIComponent(a)))}}, 22 | u=e.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new m.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,f=b.sigBytes,e=this.blockSize,k=f/(4*e),k=a?h.ceil(k):h.max((k|0)-this._minBufferSize,0);a=k*e;f=h.min(4*a,f);if(a){for(var u=0;ub;b++){var a=e+b,d=c[a];c[a]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}var a=this._hash.words,d=x.words,h=w.words,f=A.words,j=l.words,E=m.words,F=v.words,C,n,p,q,y,D,r,s,t,z;D=C=a[0];r=n=a[1];s=p=a[2];t=q=a[3];z=y=a[4];for(var g,b=0;80>b;b+=1)g=C+c[e+f[b]]|0,g=16>b?g+((n^p^q)+d[0]):32>b?g+((n&p|~n&q)+d[1]):48>b? 28 | g+(((n|~p)^q)+d[2]):64>b?g+((n&q|p&~q)+d[3]):g+((n^(p|~q))+d[4]),g|=0,g=g<>>32-E[b],g=g+y|0,C=y,y=q,q=p<<10|p>>>22,p=n,n=g,g=D+c[e+j[b]]|0,g=16>b?g+((r^(s|~t))+h[0]):32>b?g+((r&t|s&~t)+h[1]):48>b?g+(((r|~s)^t)+h[2]):64>b?g+((r&s|~r&t)+h[3]):g+((r^s^t)+h[4]),g|=0,g=g<>>32-F[b],g=g+z|0,D=z,z=t,t=s<<10|s>>>22,s=r,r=g;g=a[1]+p+t|0;a[1]=a[2]+q+z|0;a[2]=a[3]+y+D|0;a[3]=a[4]+C+r|0;a[4]=a[0]+n+s|0;a[0]=g},_doFinalize:function(){var c=this._data,e=c.words,b=8*this._nDataBytes,a=8*c.sigBytes; 29 | e[a>>>5]|=128<<24-a%32;e[(a+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;c.sigBytes=4*(e.length+1);this._process();c=this._hash;e=c.words;for(b=0;5>b;b++)a=e[b],e[b]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;return c},clone:function(){var c=e.clone.call(this);c._hash=this._hash.clone();return c}});h.RIPEMD160=e._createHelper(j);h.HmacRIPEMD160=e._createHmacHelper(j)})(Math); 30 | (function(){var h=CryptoJS,j=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(c,e){c=this._hasher=new c.init;"string"==typeof e&&(e=j.parse(e));var h=c.blockSize,l=4*h;e.sigBytes>l&&(e=c.finalize(e));e.clamp();for(var m=this._oKey=e.clone(),v=this._iKey=e.clone(),x=m.words,w=v.words,k=0;k>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=k.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, 10 | 2),16)<<24-4*(f%8);return new p.init(b,c/2)}},j=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new p.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}}, 11 | r=d.BufferedBlockAlgorithm=k.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,f=c.sigBytes,d=this.blockSize,e=f/(4*d),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*d;f=g.min(4*a,f);if(a){for(var k=0;ka;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(n<<5|n>>>27)+l+m[a];c=20>a?c+((j&h|~j&g)+1518500249):40>a?c+((j^h^g)+1859775393):60>a?c+((j&h|j&g|h&g)-1894007588):c+((j^h^ 15 | g)-899497514);l=g;g=h;h=j<<30|j>>>2;j=n;n=c}b[0]=b[0]+n|0;b[1]=b[1]+j|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+l|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,g=8*d.sigBytes;e[g>>>5]|=128<<24-g%32;e[(g+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(g+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(l);g.HmacSHA1=d._createHmacHelper(l)})(); 16 | (function(){var g=CryptoJS,l=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=l.parse(d));var g=e.blockSize,k=4*g;d.sigBytes>k&&(d=e.finalize(d));d.clamp();for(var p=this._oKey=d.clone(),b=this._iKey=d.clone(),n=p.words,j=b.words,h=0;h>>2]|=(f[g>>>2]>>>24-8*(g%4)&255)<<24-8*((b+g)%4);else if(65535>>2]=f[g>>>2];else d.push.apply(d,f);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<< 9 | 32-8*(d%4);a.length=j.ceil(d/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],f=0;f>>2]>>>24-8*(b%4)&255;f.push((g>>>4).toString(16));f.push((g&15).toString(16))}return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new r.init(f,d/2)}},n=s.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var f=[],b=0;b>>2]>>>24-8*(b%4)&255));return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(f,d)}},h=s.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(d){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, 11 | u=e.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var d=this._data,f=d.words,b=d.sigBytes,g=this.blockSize,c=b/(4*g),c=a?j.ceil(c):j.max((c|0)-this._minBufferSize,0);a=c*g;b=j.min(4*a,b);if(a){for(var e=0;en;){var h;a:{h=l;for(var u=j.sqrt(h),t=2;t<=u;t++)if(!(h%t)){h=!1;break a}h=!0}h&&(8>n&&(m[n]=s(j.pow(l,0.5))),r[n]=s(j.pow(l,1/3)),n++);l++}var a=[],c=c.SHA256=p.extend({_doReset:function(){this._hash=new e.init(m.slice(0))},_doProcessBlock:function(d,f){for(var b=this._hash.words,g=b[0],c=b[1],e=b[2],j=b[3],h=b[4],p=b[5],m=b[6],n=b[7],q=0;64>q;q++){if(16>q)a[q]= 15 | d[f+q]|0;else{var k=a[q-15],l=a[q-2];a[q]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[q-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[q-16]}k=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&p^~h&m)+r[q]+a[q];l=((g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22))+(g&c^g&e^c&e);n=m;m=p;p=h;h=j+k|0;j=e;e=c;c=g;g=k+l|0}b[0]=b[0]+g|0;b[1]=b[1]+c|0;b[2]=b[2]+e|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+p|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,c=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | c[e>>>5]|=128<<24-e%32;c[(e+64>>>9<<4)+14]=j.floor(b/4294967296);c[(e+64>>>9<<4)+15]=b;a.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=p.clone.call(this);a._hash=this._hash.clone();return a}});k.SHA256=p._createHelper(c);k.HmacSHA256=p._createHmacHelper(c)})(Math); 17 | (function(){var j=CryptoJS,k=j.lib.WordArray,c=j.algo,e=c.SHA256,c=c.SHA224=e.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=e._doFinalize.call(this);c.sigBytes-=4;return c}});j.SHA224=e._createHelper(c);j.HmacSHA224=e._createHmacHelper(c)})(); 18 | (function(){var j=CryptoJS,k=j.enc.Utf8;j.algo.HMAC=j.lib.Base.extend({init:function(c,e){c=this._hasher=new c.init;"string"==typeof e&&(e=k.parse(e));var j=c.blockSize,m=4*j;e.sigBytes>m&&(e=c.finalize(e));e.clamp();for(var r=this._oKey=e.clone(),s=this._iKey=e.clone(),l=r.words,n=s.words,h=0;h>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new r.init(d,c/2)}},n=l.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(d,c)}},j=l.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, 11 | u=g.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var g=0;gn;){var j;a:{j=k;for(var u=h.sqrt(j),t=2;t<=u;t++)if(!(j%t)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=l(h.pow(k,0.5))),r[n]=l(h.pow(k,1/3)),n++);k++}var a=[],f=f.SHA256=q.extend({_doReset:function(){this._hash=new g.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],j=b[3],h=b[4],m=b[5],n=b[6],q=b[7],p=0;64>p;p++){if(16>p)a[p]= 15 | c[d+p]|0;else{var k=a[p-15],l=a[p-2];a[p]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[p-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[p-16]}k=q+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&m^~h&n)+r[p]+a[p];l=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);q=n;n=m;m=h;h=j+k|0;j=g;g=f;f=e;e=k+l|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+m|0;b[6]=b[6]+n|0;b[7]=b[7]+q|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=q._createHelper(f);s.HmacSHA256=q._createHmacHelper(f)})(Math); 17 | (function(){var h=CryptoJS,s=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(f,g){f=this._hasher=new f.init;"string"==typeof g&&(g=s.parse(g));var h=f.blockSize,m=4*h;g.sigBytes>m&&(g=f.finalize(g));g.clamp();for(var r=this._oKey=g.clone(),l=this._iKey=g.clone(),k=r.words,n=l.words,j=0;j>>2]|=(e[p>>>2]>>>24-8*(p%4)&255)<<24-8*((j+p)%4);else if(65535>>2]=e[p>>>2];else b.push.apply(b,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< 9 | 32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],e=0;e>>2]>>>24-8*(j%4)&255;e.push((p>>>4).toString(16));e.push((p&15).toString(16))}return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>3]|=parseInt(a.substr(j, 10 | 2),16)<<24-4*(j%8);return new t.init(e,b/2)}},g=w.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var e=[],j=0;j>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new t.init(e,b)}},n=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, 11 | u=d.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new t.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=n.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,e=b.words,j=b.sigBytes,p=this.blockSize,c=j/(4*p),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*p;j=q.min(4*a,j);if(a){for(var g=0;gu;u++){t[g+5*n]=(u+1)*(u+2)/2%64;var x=(2*g+3*n)%5,g=n%5,n=x}for(g=0;5>g;g++)for(n=0;5>n;n++)w[g+5*n]=n+5*((2*g+3*n)%5);g=1;for(n=0;24>n;n++){for(var a=x=u=0;7>a;a++){if(g&1){var b=(1<b?x^=1<g;g++)e[g]=s.create();c=c.SHA3=v.extend({cfg:v.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= 16 | [],b=0;25>b;b++)a[b]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,g=this.blockSize/2,k=0;k>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,h=c[k];h.high^=l;h.low^=d}for(g=0;24>g;g++){for(k=0;5>k;k++){for(var f=d=0,m=0;5>m;m++)h=c[k+5*m],d^=h.high,f^=h.low;h=e[k];h.high=d;h.low=f}for(k=0;5>k;k++){h=e[(k+4)%5];d=e[(k+1)%5];l=d.high;m=d.low;d=h.high^ 17 | (l<<1|m>>>31);f=h.low^(m<<1|l>>>31);for(m=0;5>m;m++)h=c[k+5*m],h.high^=d,h.low^=f}for(l=1;25>l;l++)h=c[l],k=h.high,h=h.low,m=t[l],32>m?(d=k<>>32-m,f=h<>>32-m):(d=h<>>64-m,f=k<>>64-m),h=e[w[l]],h.high=d,h.low=f;h=e[0];k=c[0];h.high=k.high;h.low=k.low;for(k=0;5>k;k++)for(m=0;5>m;m++)l=k+5*m,h=c[l],d=e[l],l=e[(k+1)%5+5*m],f=e[(k+2)%5+5*m],h.high=d.high^~l.high&f.high,h.low=d.low^~l.low&f.low;h=c[0];k=r[g];h.high^=k.high;h.low^=k.low}},_doFinalize:function(){var a=this._data, 18 | b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(q.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],g=0;g>>24)&16711935|(l<<24|l>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;e.push(f);e.push(l)}return new d.init(e,b)},clone:function(){for(var a=v.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); 19 | f.SHA3=v._createHelper(c);f.HmacSHA3=v._createHmacHelper(c)})(Math); 20 | (function(){var q=CryptoJS,f=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(c,d){c=this._hasher=new c.init;"string"==typeof d&&(d=f.parse(d));var q=c.blockSize,s=4*q;d.sigBytes>s&&(d=c.finalize(d));d.clamp();for(var t=this._oKey=d.clone(),w=this._iKey=d.clone(),r=t.words,g=w.words,n=0;n>>2]|=(M[b>>>2]>>>24-8*(b%4)&255)<<24-8*((e+b)%4);else if(65535>>2]=M[b>>>2];else d.push.apply(d,M);this.sigBytes+=a;return this},clamp:function(){var D=this.words,d=this.sigBytes;D[d>>>2]&=4294967295<< 9 | 32-8*(d%4);D.length=a.ceil(d/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(D){for(var d=[],b=0;b>>2]>>>24-8*(e%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var d=a.length,b=[],e=0;e>>3]|=parseInt(a.substr(e, 10 | 2),16)<<24-4*(e%8);return new u.init(b,d/2)}},y=k.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],e=0;e>>2]>>>24-8*(e%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new u.init(c,b)}},z=k.Utf8={stringify:function(a){try{return decodeURIComponent(escape(y.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return y.parse(unescape(encodeURIComponent(a)))}}, 11 | x=b.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=z.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var d=this._data,c=d.words,e=d.sigBytes,l=this.blockSize,k=e/(4*l),k=b?a.ceil(k):a.max((k|0)-this._minBufferSize,0);b=k*l;e=a.min(4*b,e);if(b){for(var x=0;xm;m++)k[m]=a();b=b.SHA512=c.extend({_doReset:function(){this._hash=new l.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words, 20 | f=c[0],j=c[1],d=c[2],l=c[3],e=c[4],m=c[5],N=c[6],c=c[7],aa=f.high,O=f.low,ba=j.high,P=j.low,ca=d.high,Q=d.low,da=l.high,R=l.low,ea=e.high,S=e.low,fa=m.high,T=m.low,ga=N.high,U=N.low,ha=c.high,V=c.low,r=aa,n=O,G=ba,E=P,H=ca,F=Q,Y=da,I=R,s=ea,p=S,W=fa,J=T,X=ga,K=U,Z=ha,L=V,t=0;80>t;t++){var A=k[t];if(16>t)var q=A.high=a[b+2*t]|0,g=A.low=a[b+2*t+1]|0;else{var q=k[t-15],g=q.high,v=q.low,q=(g>>>1|v<<31)^(g>>>8|v<<24)^g>>>7,v=(v>>>1|g<<31)^(v>>>8|g<<24)^(v>>>7|g<<25),C=k[t-2],g=C.high,h=C.low,C=(g>>>19| 21 | h<<13)^(g<<3|h>>>29)^g>>>6,h=(h>>>19|g<<13)^(h<<3|g>>>29)^(h>>>6|g<<26),g=k[t-7],$=g.high,B=k[t-16],w=B.high,B=B.low,g=v+g.low,q=q+$+(g>>>0>>0?1:0),g=g+h,q=q+C+(g>>>0>>0?1:0),g=g+B,q=q+w+(g>>>0>>0?1:0);A.high=q;A.low=g}var $=s&W^~s&X,B=p&J^~p&K,A=r&G^r&H^G&H,ka=n&E^n&F^E&F,v=(r>>>28|n<<4)^(r<<30|n>>>2)^(r<<25|n>>>7),C=(n>>>28|r<<4)^(n<<30|r>>>2)^(n<<25|r>>>7),h=u[t],la=h.high,ia=h.low,h=L+((p>>>14|s<<18)^(p>>>18|s<<14)^(p<<23|s>>>9)),w=Z+((s>>>14|p<<18)^(s>>>18|p<<14)^(s<<23|p>>>9))+(h>>> 22 | 0>>0?1:0),h=h+B,w=w+$+(h>>>0>>0?1:0),h=h+ia,w=w+la+(h>>>0>>0?1:0),h=h+g,w=w+q+(h>>>0>>0?1:0),g=C+ka,A=v+A+(g>>>0>>0?1:0),Z=X,L=K,X=W,K=J,W=s,J=p,p=I+h|0,s=Y+w+(p>>>0>>0?1:0)|0,Y=H,I=F,H=G,F=E,G=r,E=n,n=h+g|0,r=w+A+(n>>>0>>0?1:0)|0}O=f.low=O+n;f.high=aa+r+(O>>>0>>0?1:0);P=j.low=P+E;j.high=ba+G+(P>>>0>>0?1:0);Q=d.low=Q+F;d.high=ca+H+(Q>>>0>>0?1:0);R=l.low=R+I;l.high=da+Y+(R>>>0>>0?1:0);S=e.low=S+p;e.high=ea+s+(S>>>0

>>0?1:0);T=m.low=T+J;m.high=fa+W+(T>>>0>>0?1: 23 | 0);U=N.low=U+K;N.high=ga+X+(U>>>0>>0?1:0);V=c.low=V+L;c.high=ha+Z+(V>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,f=8*a.sigBytes;b[f>>>5]|=128<<24-f%32;b[(f+128>>>10<<5)+30]=Math.floor(c/4294967296);b[(f+128>>>10<<5)+31]=c;a.sigBytes=4*b.length;this._process();return this._hash.toX32()},clone:function(){var a=c.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});j.SHA512=c._createHelper(b);j.HmacSHA512=c._createHmacHelper(b)})(); 24 | (function(){var a=CryptoJS,j=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=j.parse(b));var f=a.blockSize,l=4*f;b.sigBytes>l&&(b=a.finalize(b));b.clamp();for(var u=this._oKey=b.clone(),k=this._iKey=b.clone(),m=u.words,y=k.words,z=0;z>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<< 9 | 32-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>3]|=parseInt(b.substr(j, 10 | 2),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j>>2]>>>24-8*(j%4)&255));return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, 11 | g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, 15 | _doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]), 16 | c=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c, 17 | d,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d, 18 | C,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/ 19 | 4294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math); 20 | 21 | 22 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/pbkdf2.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(g,j){var e={},d=e.lib={},m=function(){},n=d.Base={extend:function(a){m.prototype=this;var c=new m;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | q=d.WordArray=n.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=j?c:4*a.length},toString:function(a){return(a||l).stringify(this)},concat:function(a){var c=this.words,p=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var b=0;b>>2]|=(p[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=p[b>>>2];else c.push.apply(c,p);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=n.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, 10 | 2),16)<<24-4*(f%8);return new q.init(b,c/2)}},k=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, 11 | u=d.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,f=b.sigBytes,l=this.blockSize,e=f/(4*l),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*l;f=g.min(4*a,f);if(a){for(var h=0;ha;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(l<<5|l>>>27)+j+m[a];c=20>a?c+((k&h|~k&g)+1518500249):40>a?c+((k^h^g)+1859775393):60>a?c+((k&h|k&g|h&g)-1894007588):c+((k^h^ 15 | g)-899497514);j=g;g=h;h=k<<30|k>>>2;k=l;l=c}b[0]=b[0]+l|0;b[1]=b[1]+k|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+j|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,l=8*d.sigBytes;e[l>>>5]|=128<<24-l%32;e[(l+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(l+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(j);g.HmacSHA1=d._createHmacHelper(j)})(); 16 | (function(){var g=CryptoJS,j=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=j.parse(d));var g=e.blockSize,n=4*g;d.sigBytes>n&&(d=e.finalize(d));d.clamp();for(var q=this._oKey=d.clone(),b=this._iKey=d.clone(),l=q.words,k=b.words,h=0;h>>2]|=(h[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=h[b>>>2];else c.push.apply(c,h);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 20 | 32-8*(c%4);a.length=j.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((g>>>4).toString(16));b.push((g&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, 21 | 2),16)<<24-4*(d%8);return new u.init(b,c/2)}},A=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var b=a.length,h=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new u.init(h,b)}},g=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(A.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return A.parse(unescape(encodeURIComponent(a)))}}, 22 | v=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=g.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,h=b.words,d=b.sigBytes,g=this.blockSize,v=d/(4*g),v=a?j.ceil(v):j.max((v|0)-this._minBufferSize,0);a=v*g;d=j.min(4*a,d);if(a){for(var e=0;eb;b++){var a=e+b,c=g[a];g[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360}var a=this._hash.words,c=D.words,h=A.words,d=z.words,j=t.words,k=u.words,l=w.words,B,m,n,p,x,C,q,r,s,y;C=B=a[0];q=m=a[1];r=n=a[2];s=p=a[3];y=x=a[4];for(var f,b=0;80>b;b+=1)f=B+g[e+d[b]]|0,f=16>b?f+((m^n^p)+c[0]):32>b?f+((m&n|~m&p)+c[1]):48>b? 28 | f+(((m|~n)^p)+c[2]):64>b?f+((m&p|n&~p)+c[3]):f+((m^(n|~p))+c[4]),f|=0,f=f<>>32-k[b],f=f+x|0,B=x,x=p,p=n<<10|n>>>22,n=m,m=f,f=C+g[e+j[b]]|0,f=16>b?f+((q^(r|~s))+h[0]):32>b?f+((q&s|r&~s)+h[1]):48>b?f+(((q|~r)^s)+h[2]):64>b?f+((q&r|~q&s)+h[3]):f+((q^r^s)+h[4]),f|=0,f=f<>>32-l[b],f=f+y|0,C=y,y=s,s=r<<10|r>>>22,r=q,q=f;f=a[1]+n+s|0;a[1]=a[2]+p+y|0;a[2]=a[3]+x+C|0;a[3]=a[4]+B+q|0;a[4]=a[0]+m+r|0;a[0]=f},_doFinalize:function(){var g=this._data,e=g.words,b=8*this._nDataBytes,a=8*g.sigBytes; 29 | e[a>>>5]|=128<<24-a%32;e[(a+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;g.sigBytes=4*(e.length+1);this._process();g=this._hash;e=g.words;for(b=0;5>b;b++)a=e[b],e[b]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;return g},clone:function(){var e=l.clone.call(this);e._hash=this._hash.clone();return e}});j.RIPEMD160=l._createHelper(k);j.HmacRIPEMD160=l._createHmacHelper(k)})(Math); 30 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha1.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(e,m){var p={},j=p.lib={},l=function(){},f=j.Base={extend:function(a){l.prototype=this;var c=new l;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | n=j.WordArray=f.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var c=this.words,q=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=e.ceil(c/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((f>>>4).toString(16));b.push((f&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, 10 | 2),16)<<24-4*(d%8);return new n.init(b,c/2)}},g=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new n.init(b,c)}},r=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, 11 | k=j.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=r.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,d=c.sigBytes,f=this.blockSize,h=d/(4*f),h=a?e.ceil(h):e.max((h|0)-this._minBufferSize,0);a=h*f;d=e.min(4*a,d);if(a){for(var g=0;ga;a++){if(16>a)l[a]=f[n+a]|0;else{var c=l[a-3]^l[a-8]^l[a-14]^l[a-16];l[a]=c<<1|c>>>31}c=(h<<5|h>>>27)+j+l[a];c=20>a?c+((g&e|~g&k)+1518500249):40>a?c+((g^e^k)+1859775393):60>a?c+((g&e|g&k|e&k)-1894007588):c+((g^e^ 15 | k)-899497514);j=k;k=e;e=g<<30|g>>>2;g=h;h=c}b[0]=b[0]+h|0;b[1]=b[1]+g|0;b[2]=b[2]+e|0;b[3]=b[3]+k|0;b[4]=b[4]+j|0},_doFinalize:function(){var f=this._data,e=f.words,b=8*this._nDataBytes,h=8*f.sigBytes;e[h>>>5]|=128<<24-h%32;e[(h+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(h+64>>>9<<4)+15]=b;f.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=j.clone.call(this);e._hash=this._hash.clone();return e}});e.SHA1=j._createHelper(m);e.HmacSHA1=j._createHmacHelper(m)})(); 16 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha224.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(g,l){var f={},k=f.lib={},h=function(){},m=k.Base={extend:function(a){h.prototype=this;var c=new h;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | q=k.WordArray=m.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new q.init(d,c/2)}},n=t.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},j=t.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, 11 | w=k.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?g.ceil(f):g.max((f|0)-this._minBufferSize,0);a=f*e;b=g.min(4*a,b);if(a){for(var u=0;un;){var j;a:{j=s;for(var w=g.sqrt(j),v=2;v<=w;v++)if(!(j%v)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=t(g.pow(s,0.5))),q[n]=t(g.pow(s,1/3)),n++);s++}var a=[],f=f.SHA256=h.extend({_doReset:function(){this._hash=new k.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],k=b[3],h=b[4],l=b[5],m=b[6],n=b[7],p=0;64>p;p++){if(16>p)a[p]= 15 | c[d+p]|0;else{var j=a[p-15],r=a[p-2];a[p]=((j<<25|j>>>7)^(j<<14|j>>>18)^j>>>3)+a[p-7]+((r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10)+a[p-16]}j=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&m)+q[p]+a[p];r=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);n=m;m=l;l=h;h=k+j|0;k=g;g=f;f=e;e=j+r|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+k|0;b[4]=b[4]+h|0;b[5]=b[5]+l|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=g.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=h.clone.call(this);a._hash=this._hash.clone();return a}});l.SHA256=h._createHelper(f);l.HmacSHA256=h._createHmacHelper(f)})(Math); 17 | (function(){var g=CryptoJS,l=g.lib.WordArray,f=g.algo,k=f.SHA256,f=f.SHA224=k.extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=k._doFinalize.call(this);f.sigBytes-=4;return f}});g.SHA224=k._createHelper(f);g.HmacSHA224=k._createHmacHelper(f)})(); 18 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha256.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | q=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, 11 | x=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;mk;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]= 15 | c[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math); 17 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha3.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(v,p){var d={},u=d.lib={},r=function(){},f=u.Base={extend:function(a){r.prototype=this;var b=new r;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)}}, 8 | s=u.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=p?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,c=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var n=0;n>>2]|=(c[n>>>2]>>>24-8*(n%4)&255)<<24-8*((j+n)%4);else if(65535>>2]=c[n>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< 9 | 32-8*(b%4);a.length=v.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=[],c=0;c>>2]>>>24-8*(j%4)&255;c.push((n>>>4).toString(16));c.push((n&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>3]|=parseInt(a.substr(j, 10 | 2),16)<<24-4*(j%8);return new s.init(c,b/2)}},e=x.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],j=0;j>>2]>>>24-8*(j%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new s.init(c,b)}},q=x.Utf8={stringify:function(a){try{return decodeURIComponent(escape(e.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return e.parse(unescape(encodeURIComponent(a)))}}, 11 | t=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,j=b.sigBytes,n=this.blockSize,e=j/(4*n),e=a?v.ceil(e):v.max((e|0)-this._minBufferSize,0);a=e*n;j=v.min(4*a,j);if(a){for(var f=0;ft;t++){s[e+5*q]=(t+1)*(t+2)/2%64;var w=(2*e+3*q)%5,e=q%5,q=w}for(e=0;5>e;e++)for(q=0;5>q;q++)x[e+5*q]=q+5*((2*e+3*q)%5);e=1;for(q=0;24>q;q++){for(var a=w=t=0;7>a;a++){if(e&1){var b=(1<b?w^=1<e;e++)c[e]=f.create();d=d.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= 16 | [],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var e=this._state,f=this.blockSize/2,h=0;h>>24)&16711935|(l<<24|l>>>8)&4278255360,m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=e[h];g.high^=m;g.low^=l}for(f=0;24>f;f++){for(h=0;5>h;h++){for(var d=l=0,k=0;5>k;k++)g=e[h+5*k],l^=g.high,d^=g.low;g=c[h];g.high=l;g.low=d}for(h=0;5>h;h++){g=c[(h+4)%5];l=c[(h+1)%5];m=l.high;k=l.low;l=g.high^ 17 | (m<<1|k>>>31);d=g.low^(k<<1|m>>>31);for(k=0;5>k;k++)g=e[h+5*k],g.high^=l,g.low^=d}for(m=1;25>m;m++)g=e[m],h=g.high,g=g.low,k=s[m],32>k?(l=h<>>32-k,d=g<>>32-k):(l=g<>>64-k,d=h<>>64-k),g=c[x[m]],g.high=l,g.low=d;g=c[0];h=e[0];g.high=h.high;g.low=h.low;for(h=0;5>h;h++)for(k=0;5>k;k++)m=h+5*k,g=e[m],l=c[m],m=c[(h+1)%5+5*k],d=c[(h+2)%5+5*k],g.high=l.high^~m.high&d.high,g.low=l.low^~m.low&d.low;g=e[0];h=y[f];g.high^=h.high;g.low^=h.low}},_doFinalize:function(){var a=this._data, 18 | b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(v.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],h=0;h>>24)&16711935|(f<<24|f>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;e.push(d);e.push(f)}return new u.init(e,b)},clone:function(){for(var a=r.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); 19 | p.SHA3=r._createHelper(d);p.HmacSHA3=r._createHmacHelper(d)})(Math); 20 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha384.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(a,c){var d={},j=d.lib={},f=function(){},m=j.Base={extend:function(a){f.prototype=this;var b=new f;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)}}, 8 | B=j.WordArray=m.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=c?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,g=a.words,e=this.sigBytes;a=a.sigBytes;this.clamp();if(e%4)for(var k=0;k>>2]|=(g[k>>>2]>>>24-8*(k%4)&255)<<24-8*((e+k)%4);else if(65535>>2]=g[k>>>2];else b.push.apply(b,g);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<< 9 | 32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],g=0;g>>2]>>>24-8*(e%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(a){for(var b=a.length,g=[],e=0;e>>3]|=parseInt(a.substr(e, 10 | 2),16)<<24-4*(e%8);return new B.init(g,b/2)}},F=v.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var g=[],e=0;e>>2]>>>24-8*(e%4)&255));return g.join("")},parse:function(a){for(var b=a.length,g=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new B.init(g,b)}},ha=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(F.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return F.parse(unescape(encodeURIComponent(a)))}}, 11 | Z=j.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new B.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=ha.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,g=b.words,e=b.sigBytes,k=this.blockSize,m=e/(4*k),m=n?a.ceil(m):a.max((m|0)-this._minBufferSize,0);n=m*k;e=a.min(4*n,e);if(n){for(var c=0;cy;y++)v[y]=a();j=j.SHA512=d.extend({_doReset:function(){this._hash=new m.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,c){for(var d=this._hash.words, 20 | f=d[0],j=d[1],b=d[2],g=d[3],e=d[4],k=d[5],m=d[6],d=d[7],y=f.high,M=f.low,$=j.high,N=j.low,aa=b.high,O=b.low,ba=g.high,P=g.low,ca=e.high,Q=e.low,da=k.high,R=k.low,ea=m.high,S=m.low,fa=d.high,T=d.low,s=y,p=M,G=$,D=N,H=aa,E=O,W=ba,I=P,t=ca,q=Q,U=da,J=R,V=ea,K=S,X=fa,L=T,u=0;80>u;u++){var z=v[u];if(16>u)var r=z.high=a[c+2*u]|0,h=z.low=a[c+2*u+1]|0;else{var r=v[u-15],h=r.high,w=r.low,r=(h>>>1|w<<31)^(h>>>8|w<<24)^h>>>7,w=(w>>>1|h<<31)^(w>>>8|h<<24)^(w>>>7|h<<25),C=v[u-2],h=C.high,l=C.low,C=(h>>>19|l<< 21 | 13)^(h<<3|l>>>29)^h>>>6,l=(l>>>19|h<<13)^(l<<3|h>>>29)^(l>>>6|h<<26),h=v[u-7],Y=h.high,A=v[u-16],x=A.high,A=A.low,h=w+h.low,r=r+Y+(h>>>0>>0?1:0),h=h+l,r=r+C+(h>>>0>>0?1:0),h=h+A,r=r+x+(h>>>0>>0?1:0);z.high=r;z.low=h}var Y=t&U^~t&V,A=q&J^~q&K,z=s&G^s&H^G&H,ja=p&D^p&E^D&E,w=(s>>>28|p<<4)^(s<<30|p>>>2)^(s<<25|p>>>7),C=(p>>>28|s<<4)^(p<<30|s>>>2)^(p<<25|s>>>7),l=B[u],ka=l.high,ga=l.low,l=L+((q>>>14|t<<18)^(q>>>18|t<<14)^(q<<23|t>>>9)),x=X+((t>>>14|q<<18)^(t>>>18|q<<14)^(t<<23|q>>>9))+(l>>>0< 22 | L>>>0?1:0),l=l+A,x=x+Y+(l>>>0>>0?1:0),l=l+ga,x=x+ka+(l>>>0>>0?1:0),l=l+h,x=x+r+(l>>>0>>0?1:0),h=C+ja,z=w+z+(h>>>0>>0?1:0),X=V,L=K,V=U,K=J,U=t,J=q,q=I+l|0,t=W+x+(q>>>0>>0?1:0)|0,W=H,I=E,H=G,E=D,G=s,D=p,p=l+h|0,s=x+z+(p>>>0>>0?1:0)|0}M=f.low=M+p;f.high=y+s+(M>>>0

>>0?1:0);N=j.low=N+D;j.high=$+G+(N>>>0>>0?1:0);O=b.low=O+E;b.high=aa+H+(O>>>0>>0?1:0);P=g.low=P+I;g.high=ba+W+(P>>>0>>0?1:0);Q=e.low=Q+q;e.high=ca+t+(Q>>>0>>0?1:0);R=k.low=R+J;k.high=da+U+(R>>>0>>0?1:0); 23 | S=m.low=S+K;m.high=ea+V+(S>>>0>>0?1:0);T=d.low=T+L;d.high=fa+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,f=8*a.sigBytes;c[f>>>5]|=128<<24-f%32;c[(f+128>>>10<<5)+30]=Math.floor(d/4294967296);c[(f+128>>>10<<5)+31]=d;a.sigBytes=4*c.length;this._process();return this._hash.toX32()},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});c.SHA512=d._createHelper(j);c.HmacSHA512=d._createHmacHelper(j)})(); 24 | (function(){var a=CryptoJS,c=a.x64,d=c.Word,j=c.WordArray,c=a.algo,f=c.SHA512,c=c.SHA384=f.extend({_doReset:function(){this._hash=new j.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=f._doFinalize.call(this);a.sigBytes-=16;return a}});a.SHA384= 25 | f._createHelper(c);a.HmacSHA384=f._createHmacHelper(c)})(); 26 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/CryptoJS v3.1.2/rollups/sha512.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(a,m){var r={},f=r.lib={},g=function(){},l=f.Base={extend:function(a){g.prototype=this;var b=new g;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)}}, 8 | p=f.WordArray=l.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=m?b:4*a.length},toString:function(a){return(a||q).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 j=0;j>>2]|=(d[j>>>2]>>>24-8*(j%4)&255)<<24-8*((c+j)%4);else if(65535>>2]=d[j>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<< 9 | 32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((j>>>4).toString(16));d.push((j&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c, 10 | 2),16)<<24-4*(c%8);return new p.init(d,b/2)}},G=y.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new p.init(d,b)}},fa=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(G.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return G.parse(unescape(encodeURIComponent(a)))}}, 11 | h=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=fa.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,d=b.words,c=b.sigBytes,j=this.blockSize,l=c/(4*j),l=n?a.ceil(l):a.max((l|0)-this._minBufferSize,0);n=l*j;c=a.min(4*n,c);if(n){for(var h=0;hq;q++)y[q]=a();f=f.SHA512=r.extend({_doReset:function(){this._hash=new l.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,f){for(var h=this._hash.words, 20 | g=h[0],n=h[1],b=h[2],d=h[3],c=h[4],j=h[5],l=h[6],h=h[7],q=g.high,m=g.low,r=n.high,N=n.low,Z=b.high,O=b.low,$=d.high,P=d.low,aa=c.high,Q=c.low,ba=j.high,R=j.low,ca=l.high,S=l.low,da=h.high,T=h.low,v=q,s=m,H=r,E=N,I=Z,F=O,W=$,J=P,w=aa,t=Q,U=ba,K=R,V=ca,L=S,X=da,M=T,x=0;80>x;x++){var B=y[x];if(16>x)var u=B.high=a[f+2*x]|0,e=B.low=a[f+2*x+1]|0;else{var u=y[x-15],e=u.high,z=u.low,u=(e>>>1|z<<31)^(e>>>8|z<<24)^e>>>7,z=(z>>>1|e<<31)^(z>>>8|e<<24)^(z>>>7|e<<25),D=y[x-2],e=D.high,k=D.low,D=(e>>>19|k<<13)^ 21 | (e<<3|k>>>29)^e>>>6,k=(k>>>19|e<<13)^(k<<3|e>>>29)^(k>>>6|e<<26),e=y[x-7],Y=e.high,C=y[x-16],A=C.high,C=C.low,e=z+e.low,u=u+Y+(e>>>0>>0?1:0),e=e+k,u=u+D+(e>>>0>>0?1:0),e=e+C,u=u+A+(e>>>0>>0?1:0);B.high=u;B.low=e}var Y=w&U^~w&V,C=t&K^~t&L,B=v&H^v&I^H&I,ha=s&E^s&F^E&F,z=(v>>>28|s<<4)^(v<<30|s>>>2)^(v<<25|s>>>7),D=(s>>>28|v<<4)^(s<<30|v>>>2)^(s<<25|v>>>7),k=p[x],ia=k.high,ea=k.low,k=M+((t>>>14|w<<18)^(t>>>18|w<<14)^(t<<23|w>>>9)),A=X+((w>>>14|t<<18)^(w>>>18|t<<14)^(w<<23|t>>>9))+(k>>>0>> 22 | 0?1:0),k=k+C,A=A+Y+(k>>>0>>0?1:0),k=k+ea,A=A+ia+(k>>>0>>0?1:0),k=k+e,A=A+u+(k>>>0>>0?1:0),e=D+ha,B=z+B+(e>>>0>>0?1:0),X=V,M=L,V=U,L=K,U=w,K=t,t=J+k|0,w=W+A+(t>>>0>>0?1:0)|0,W=I,J=F,I=H,F=E,H=v,E=s,s=k+e|0,v=A+B+(s>>>0>>0?1:0)|0}m=g.low=m+s;g.high=q+v+(m>>>0>>0?1:0);N=n.low=N+E;n.high=r+H+(N>>>0>>0?1:0);O=b.low=O+F;b.high=Z+I+(O>>>0>>0?1:0);P=d.low=P+J;d.high=$+W+(P>>>0>>0?1:0);Q=c.low=Q+t;c.high=aa+w+(Q>>>0>>0?1:0);R=j.low=R+K;j.high=ba+U+(R>>>0>>0?1:0);S=l.low= 23 | S+L;l.high=ca+V+(S>>>0>>0?1:0);T=h.low=T+M;h.high=da+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,f=a.words,h=8*this._nDataBytes,g=8*a.sigBytes;f[g>>>5]|=128<<24-g%32;f[(g+128>>>10<<5)+30]=Math.floor(h/4294967296);f[(g+128>>>10<<5)+31]=h;a.sigBytes=4*f.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});m.SHA512=r._createHelper(f);m.HmacSHA512=r._createHmacHelper(f)})(); 24 | -------------------------------------------------------------------------------- /00-CryptoJS加密库/README.md: -------------------------------------------------------------------------------- 1 | # CryptoJS介绍 2 | 3 | CryptoJS是一个纯JavaScript写的加密类库,支持常见的多种加密方式: 4 | 5 | - MD5 6 | - SHA-1 7 | - SHA-256 8 | - AES 9 | - Rabbit 10 | - MARC4 11 | - HMAC 12 | - HMAC-MD5 13 | - HMAC-SHA1 14 | - HMAC-SHA256 15 | - PBKDF2 16 | 17 | # CryptoJS的使用 18 | 19 | 正常下载解压后会有两个文件夹:`rollups` 和 `components` 20 | 21 | - `rollups`下面是整合后的js,每一个可以单独通过js引用使用. 22 | - `componets`下面包括所有的组件源码,以及各组件压缩后的js文件 23 | 24 | ``` 25 | 下面均以MD5为例: 26 | 1). 引用rollups下面的文件: 27 | 28 | js代码: 29 | var md5 = CryptoJS.MD5("你想加密的内容"); 30 | 31 | 2). 引用components下面的文件: 32 | 33 | 34 | js代码: 35 | var md5 = CryptoJS.MD5("你想加密的内容"); 36 | ``` 37 | 38 | 其实`rollups`下面的`md5.js` 就是整合了`components`文件夹下`core-min.js` 和`md5-min.js` 。这样方便只使用一种加密方式时,直接引用一个文件即可,如果你在一个页面中使用多个加密算法,则用第二种方式更好一些。 39 | 40 | -------------------------------------------------------------------------------- /01-嘟嘟牛逆向Hook/Code/log.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/androidSpider/478be895e9b5bb7e7d03295ace2ccb684b848cde/01-嘟嘟牛逆向Hook/Code/log.txt -------------------------------------------------------------------------------- /01-嘟嘟牛逆向Hook/Code/x嘟牛.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import frida 3 | 4 | scr = """ 5 | Java.perform(function(){ 6 | 7 | var Utils = Java.use('com.dodonew.online.util.Utils') 8 | Utils.md5.implementation = function(a){ 9 | console.log('*'.repeat(30),'Hook md5 Start','*'.repeat(30)) 10 | 11 | send('md5明文 => '+a); 12 | var result = this.md5(a); 13 | send('md5明文 => '+result); 14 | 15 | console.log('*'.repeat(30),'Hook md5 Success','*'.repeat(30)) 16 | return result 17 | }; 18 | 19 | var RequestUtil = Java.use('com.dodonew.online.http.RequestUtil') 20 | RequestUtil.encodeDesMap.overload('java.lang.String','java.lang.String','java.lang.String').implementation = function(data,key,iv){ 21 | console.log('*'.repeat(30),'Hook encodeDesMap Start','*'.repeat(30)) 22 | 23 | send('des明文 => '+data); 24 | send('desKey => '+key); 25 | send('desIv => '+iv); 26 | var result = this.encodeDesMap(data,key,iv); 27 | send('des密文 => '+result); 28 | 29 | console.log('*'.repeat(30),'Hook encodeDesMap Success','*'.repeat(30)) 30 | return result 31 | }; 32 | }); 33 | """ 34 | 35 | 36 | # 待调用的监控函数 37 | def onMessage(message, data): 38 | ''' 39 | 处理返回结果 JS脚本会返回两个结果: message, data。也可以使用Frida -U -l example.js com.xxx.xxx 40 | :param message: JS返回的信息 JSON格式(JS对象) {'type': xxx, 'payload': xxx} 41 | :param data: 数据Nonde 42 | :return: None 43 | ''' 44 | 45 | if message['type'] == 'send': 46 | print(f"[@] {message['payload']}") 47 | else: 48 | print(message) 49 | 50 | 51 | # 主函数 实现链接设备 监听等 52 | def main(): 53 | # 采用 remote 方式必须进行端口转发 或者使用get_usb_device() 54 | rdev = frida.get_usb_device() 55 | session = rdev.attach("com.dodonew.online") # 目标应用包名 com.dodonew.online 56 | script = session.create_script(scr) 57 | script.on("message", onMessage) 58 | script.load() 59 | sys.stdin.read() # 维持终端会话 60 | 61 | 62 | if __name__ == "__main__": 63 | main() 64 | -------------------------------------------------------------------------------- /01-嘟嘟牛逆向Hook/Doc/嘟嘟牛分析过程.txt: -------------------------------------------------------------------------------- 1 | [嘟嘟牛Hook逆向分析] 2 | 3 | [✔] 搜索user/login 4 | 5 | private void requestNetwork(final String cmd, Map para2, Type type) { 6 | showProgress(); 7 | this.request = new JsonRequest(this, "http://api.dodovip.com/api/" + cmd, "", new Response.Listener() { 8 | public void onResponse(RequestResult requestResult) { 9 | if (!requestResult.code.equals(a.e)) { 10 | LoginActivity.this.showToast(requestResult.message); 11 | } else if (cmd.equals("user/login")) { 12 | DodonewOnlineApplication.loginUser = (User) requestResult.data; 13 | DodonewOnlineApplication.loginLabel = "mobile"; 14 | Utils.saveJson(LoginActivity.this, DodonewOnlineApplication.loginLabel, Config.LOGINLABEL_JSON); 15 | LoginActivity.this.intentMainActivity(); 16 | } 17 | LoginActivity.this.dissProgress(); 18 | } 19 | }, this, type); 20 | this.request.【addRequestMap(para2, 0)】; 21 | DodonewOnlineApplication.addRequest(this.request, this); 22 | } 23 | 24 | [✔] 找到加密关键位置 25 | 26 | public void addRequestMap(Map addMap, int a) { 27 | String time = System.currentTimeMillis() + ""; 28 | if (addMap == null) { 29 | addMap = new HashMap<>(); 30 | } 31 | addMap.put("timeStamp", time); 32 | String encrypt = RequestUtil.【encodeDesMap】(RequestUtil.paraMap(addMap, Config.BASE_APPEND, "sign"), this.desKey, this.desIV); 33 | try { 34 | new JSONObject().put("Encrypt", encrypt); 35 | this.mRequestBody = obj + ""; 36 | } catch (JSONException e) { 37 | e.printStackTrace(); 38 | } 39 | } 40 | [✔] 加密函数 41 | 42 | public static String encodeDesMap(String data, String desKey, String desIV) { 43 | try { 44 | return new DesSecurity(desKey, desIV).encrypt64(data.getBytes("UTF-8")); 45 | } catch (Exception e) { 46 | e.printStackTrace(); 47 | return ""; 48 | } 49 | } 50 | 51 | public static Map encodeDesMap(String data, String mpKey, String desKey, String desIV) { 52 | Map map = new HashMap<>(); 53 | try { 54 | map.put(mpKey, new DesSecurity(desKey, desIV).encrypt64(data.getBytes())); 55 | } catch (Exception e) { 56 | e.printStackTrace(); 57 | } 58 | return map; 59 | } 60 | 61 | [✔] 加密函数详情 md5 key值 des加密 PKCS5Padding 62 | 63 | public class DesSecurity { 64 | Cipher deCipher; 65 | Cipher enCipher; 66 | 67 | public DesSecurity(String key, String iv) throws Exception { 68 | if (key == null) { 69 | throw new NullPointerException("Parameter is null!"); 70 | } 71 | 【InitCipher】(key.getBytes(), iv.getBytes()); 72 | } 73 | 74 | private void InitCipher(byte[] secKey, byte[] secIv) throws Exception { 75 | MessageDigest md = MessageDigest.getInstance("MD5"); 76 | md.update(secKey); 77 | 【SecretKey key = SecretKeyFactory.getInstance("DES").generateSecret(new DESKeySpec(md.digest()));】 78 | AlgorithmParameterSpec paramSpec = new IvParameterSpec(secIv); 79 | 【this.enCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");】 80 | this.deCipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); 81 | this.enCipher.init(1, key, paramSpec); 82 | this.deCipher.init(2, key, paramSpec); 83 | } 84 | 85 | public String encrypt64(byte[] data) throws Exception { 86 | return Base64.encodeToString(this.enCipher.【doFinal】(data), 0); 87 | } 88 | 89 | public byte[] decrypt64(String data) throws Exception { 90 | return this.deCipher.doFinal(Base64.decode(data, 0)); 91 | } 92 | } 93 | [✔] 94 | [✔] 95 | [✔] 96 | [✔] 97 | -------------------------------------------------------------------------------- /01-嘟嘟牛逆向Hook/Resource/x嘟牛.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/androidSpider/478be895e9b5bb7e7d03295ace2ccb684b848cde/01-嘟嘟牛逆向Hook/Resource/x嘟牛.apk -------------------------------------------------------------------------------- /01-嘟嘟牛逆向Hook/Video/视频资料.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytebuff/androidSpider/478be895e9b5bb7e7d03295ace2ccb684b848cde/01-嘟嘟牛逆向Hook/Video/视频资料.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # androidSpider 2 | Android逆向爬虫 3 | --------------------------------------------------------------------------------