1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
|
var CryptoJS=CryptoJS||function(B,H){var A={},J=A.lib={},E=function(){},C=J.Base={extend:function(_){E.prototype=this;var $=new E;_&&$.mixIn(_);$.hasOwnProperty("init")||($.init=function(){$.$super.init.apply(this,arguments)});$.init.prototype=$;$.$super=this;return $},create:function(){var $=this.extend();$.init.apply($,arguments);return $},init:function(){},mixIn:function(_){for(var $ in _)_.hasOwnProperty($)&&(this[$]=_[$]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},clone:function(){return this.init.prototype.extend(this)}},F=J.WordArray=C.extend({init:function(_,$){_=this.words=_||[];this.sigBytes=$!=H?$:4*_.length},toString:function($){return($||_).stringify(this)},concat:function(A){var _=this.words,$=A.words,B=this.sigBytes;A=A.sigBytes;this.clamp();if(B%4){for(var C=0;C<A;C++)_[B+C>>>2]|=($[C>>>2]>>>24-8*(C%4)&255)<<24-8*((B+C)%4)}else if(65535<$.length){for(C=0;C<A;C+=4)_[B+C>>>2]=$[C>>>2]}else _.push.apply(_,$);this.sigBytes+=A;return this},clamp:function(){var _=this.words,$=this.sigBytes;_[$>>>2]&=4294967295<<32-8*($%4);_.length=B.ceil($/4)},clone:function(){var $=C.clone.call(this);$.words=this.words.slice(0);return $},random:function(A){for(var _=[],$=0;$<A;$+=4)_.push(4294967296*B.random()|0);return new F.init(_,A)}}),$=A.enc={},_=$.Hex={stringify:function(A){var _=A.words;A=A.sigBytes;for(var $=[],B=0;B<A;B++){var C=_[B>>>2]>>>24-8*(B%4)&255;$.push((C>>>4).toString(16));$.push((C&15).toString(16))}return $.join("")},parse:function(A){for(var _=A.length,$=[],B=0;B<_;B+=2)$[B>>>3]|=parseInt(A.substr(B,2),16)<<24-4*(B%8);return new F.init($,_/2)}},D=$.Latin1={stringify:function(A){var _=A.words;A=A.sigBytes;for(var $=[],B=0;B<A;B++)$.push(String.fromCharCode(_[B>>>2]>>>24-8*(B%4)&255));return $.join("")},parse:function(A){for(var _=A.length,$=[],B=0;B<_;B++)$[B>>>2]|=(A.charCodeAt(B)&255)<<24-8*(B%4);return new F.init($,_)}},K=$.Utf8={stringify:function(_){try{return decodeURIComponent(escape(D.stringify(_)))}catch($){throw Error("Malformed UTF-8 data")}},parse:function($){return D.parse(unescape(encodeURIComponent($)))}},G=J.BufferedBlockAlgorithm=C.extend({reset:function(){this._data=new F.init;this._nDataBytes=0},_append:function($){"string"==typeof $&&($=K.parse($));this._data.concat($);this._nDataBytes+=$.sigBytes},_process:function(D){var A=this._data,$=A.words,E=A.sigBytes,G=this.blockSize,_=E/(4*G),_=D?B.ceil(_):B.max((_|0)-this._minBufferSize,0);D=_*G;E=B.min(4*D,E);if(D){for(var C=0;C<D;C+=G)this._doProcessBlock($,C);C=$.splice(0,D);A.sigBytes-=E}return new F.init(C,E)},clone:function(){var $=C.clone.call(this);$._data=this._data.clone();return $},_minBufferSize:0});J.Hasher=G.extend({cfg:C.extend(),init:function($){this.cfg=this.cfg.extend($);this.reset()},reset:function(){G.reset.call(this);this._doReset()},update:function($){this._append($);this._process();return this},finalize:function($){$&&this._append($);return this._doFinalize()},blockSize:16,_createHelper:function($){return function(A,_){return(new $.init(_)).finalize(A)}},_createHmacHelper:function($){return function(A,_){return(new I.HMAC.init($,_)).finalize(A)}}});var I=A.algo={};return A}(Math);(function(){var $=CryptoJS,_=$.lib.WordArray;$.enc.Base64={stringify:function(A){var E=A.words,D=A.sigBytes,B=this._map;A.clamp();A=[];for(var C=0;C<D;C+=3)for(var $=(E[C>>>2]>>>24-8*(C%4)&255)<<16|(E[C+1>>>2]>>>24-8*((C+1)%4)&255)<<8|E[C+2>>>2]>>>24-8*((C+2)%4)&255,_=0;4>_&&C+0.75*_<D;_++)A.push(B.charAt($>>>6*(3-_)&63));if(E=B.charAt(64))for(;A.length%4;)A.push(E);return A.join("")},parse:function(B){var G=B.length,E=this._map,C=E.charAt(64);C&&(C=B.indexOf(C),-1!=C&&(G=C));for(var C=[],F=0,$=0;$<G;$++)if($%4){var A=E.indexOf(B.charAt($-1))<<2*($%4),D=E.indexOf(B.charAt($))>>>6-2*($%4);C[F>>>2]|=(A|D)<<24-8*(F%4);F++}return _.create(C,F)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();(function(B){function G(_,C,B,A,$,D,E){_=_+(C&B|~C&A)+$+E;return(_<<D|_>>>32-D)+C}function A(_,C,B,A,$,D,E){_=_+(C&A|B&~A)+$+E;return(_<<D|_>>>32-D)+C}function H(_,C,B,A,$,D,E){_=_+(C^B^A)+$+E;return(_<<D|_>>>32-D)+
|