spa
Version:
Single-page applications builder with continuous integration, granular updates and loader.
7 lines • 9.3 kB
JavaScript
(function(){/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
var t=t||function(t,n){var i={},e=i.lib={},r=function(){},o=e.Base={extend:function(t){r.prototype=this;var n=new r;return t&&n.mixIn(t),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t){t.hasOwnProperty(n)&&(this[n]=t[n])}t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=e.WordArray=o.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=n?i:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var n=this.words,i=t.words,e=this.sigBytes;if(t=t.sigBytes,this.clamp(),e%4){for(var r=0;t>r;r++){n[e+r>>>2]|=(i[r>>>2]>>>24-8*(r%4)&255)<<24-8*((e+r)%4)}}else{if(65535<i.length){for(r=0;t>r;r+=4){n[e+r>>>2]=i[r>>>2]}}else{n.push.apply(n,i)}}return this.sigBytes+=t,this},clamp:function(){var n=this.words,i=this.sigBytes;n[i>>>2]&=4294967295<<32-8*(i%4),n.length=t.ceil(i/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(n){for(var i=[],e=0;n>e;e+=4){i.push(4294967296*t.random()|0)}return new s.init(i,n)}}),a=i.enc={},c=a.Hex={stringify:function(t){var n=t.words;t=t.sigBytes;for(var i=[],e=0;t>e;e++){var r=n[e>>>2]>>>24-8*(e%4)&255;i.push((r>>>4).toString(16)),i.push((15&r).toString(16))}return i.join("")},parse:function(t){for(var n=t.length,i=[],e=0;n>e;e+=2){i[e>>>3]|=parseInt(t.substr(e,2),16)<<24-4*(e%8)}return new s.init(i,n/2)}},h=a.Latin1={stringify:function(t){var n=t.words;t=t.sigBytes;for(var i=[],e=0;t>e;e++){i.push(String.fromCharCode(n[e>>>2]>>>24-8*(e%4)&255))}return i.join("")},parse:function(t){for(var n=t.length,i=[],e=0;n>e;e++){i[e>>>2]|=(255&t.charCodeAt(e))<<24-8*(e%4)}return new s.init(i,n)}},f=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(n){throw Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},u=e.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var i=this._data,e=i.words,r=i.sigBytes,o=this.blockSize,a=r/(4*o),a=n?t.ceil(a):t.max((0|a)-this._minBufferSize,0);if(n=a*o,r=t.min(4*n,r),n){for(var c=0;n>c;c+=o){this._doProcessBlock(e,c)}c=e.splice(0,n),i.sigBytes-=r}return new s.init(c,r)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});e.Hasher=u.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,i){return new t.init(i).finalize(n)}},_createHmacHelper:function(t){return function(n,i){return new l.HMAC.init(t,i).finalize(n)}}});var l=i.algo={};return i}(Math);(function(n){var i=t,e=i.lib,r=e.Base,o=e.WordArray,i=i.x64={};i.Word=r.extend({init:function(t,n){this.high=t,this.low=n}}),i.WordArray=r.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=n?i:8*t.length},toX32:function(){for(var t=this.words,n=t.length,i=[],e=0;n>e;e++){var r=t[e];i.push(r.high),i.push(r.low)}return o.create(i,this.sigBytes)},clone:function(){for(var t=r.clone.call(this),n=t.words=this.words.slice(0),i=n.length,e=0;i>e;e++){n[e]=n[e].clone()}return t}})})(),function(){function n(){return o.create.apply(o,arguments)}for(var i=t,e=i.lib.Hasher,r=i.x64,o=r.Word,s=r.WordArray,r=i.algo,a=[n(1116352408,3609767458),n(1899447441,602891725),n(3049323471,3964484399),n(3921009573,2173295548),n(961987163,4081628472),n(1508970993,3053834265),n(2453635748,2937671579),n(2870763221,3664609560),n(3624381080,2734883394),n(310598401,1164996542),n(607225278,1323610764),n(1426881987,3590304994),n(1925078388,4068182383),n(2162078206,991336113),n(2614888103,633803317),n(3248222580,3479774868),n(3835390401,2666613458),n(4022224774,944711139),n(264347078,2341262773),n(604807628,2007800933),n(770255983,1495990901),n(1249150122,1856431235),n(1555081692,3175218132),n(1996064986,2198950837),n(2554220882,3999719339),n(2821834349,766784016),n(2952996808,2566594879),n(3210313671,3203337956),n(3336571891,1034457026),n(3584528711,2466948901),n(113926993,3758326383),n(338241895,168717936),n(666307205,1188179964),n(773529912,1546045734),n(1294757372,1522805485),n(1396182291,2643833823),n(1695183700,2343527390),n(1986661051,1014477480),n(2177026350,1206759142),n(2456956037,344077627),n(2730485921,1290863460),n(2820302411,3158454273),n(3259730800,3505952657),n(3345764771,106217008),n(3516065817,3606008344),n(3600352804,1432725776),n(4094571909,1467031594),n(275423344,851169720),n(430227734,3100823752),n(506948616,1363258195),n(659060556,3750685593),n(883997877,3785050280),n(958139571,3318307427),n(1322822218,3812723403),n(1537002063,2003034995),n(1747873779,3602036899),n(1955562222,1575990012),n(2024104815,1125592928),n(2227730452,2716904306),n(2361852424,442776044),n(2428436474,593698344),n(2756734187,3733110249),n(3204031479,2999351573),n(3329325298,3815920427),n(3391569614,3928383900),n(3515267271,566280711),n(3940187606,3454069534),n(4118630271,4000239992),n(116418474,1914138554),n(174292421,2731055270),n(289380356,3203993006),n(460393269,320620315),n(685471733,587496836),n(852142971,1086792851),n(1017036298,365543100),n(1126000580,2618297676),n(1288033470,3409855158),n(1501505948,4234509866),n(1607167915,987167468),n(1816402316,1246189591)],c=[],h=0;80>h;h++){c[h]=n()}r=r.SHA512=e.extend({_doReset:function(){this._hash=new s.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(t,n){for(var i=this._hash.words,e=i[0],r=i[1],o=i[2],s=i[3],h=i[4],f=i[5],u=i[6],i=i[7],l=e.high,d=e.low,p=r.high,g=r.low,w=o.high,y=o.low,v=s.high,_=s.low,B=h.high,m=h.low,S=f.high,H=f.low,x=u.high,A=u.low,z=i.high,b=i.low,C=l,U=d,k=p,I=g,P=w,M=y,R=v,W=_,D=B,F=m,O=S,E=H,j=x,$=A,L=z,T=b,X=0;80>X;X++){var q=c[X];if(16>X){var G=q.high=0|t[n+2*X],J=q.low=0|t[n+2*X+1]}else{var G=c[X-15],J=G.high,K=G.low,G=(J>>>1|K<<31)^(J>>>8|K<<24)^J>>>7,K=(K>>>1|J<<31)^(K>>>8|J<<24)^(K>>>7|J<<25),N=c[X-2],J=N.high,Q=N.low,N=(J>>>19|Q<<13)^(J<<3|Q>>>29)^J>>>6,Q=(Q>>>19|J<<13)^(Q<<3|J>>>29)^(Q>>>6|J<<26),J=c[X-7],V=J.high,Y=c[X-16],Z=Y.high,Y=Y.low,J=K+J.low,G=G+V+(K>>>0>J>>>0?1:0),J=J+Q,G=G+N+(Q>>>0>J>>>0?1:0),J=J+Y,G=G+Z+(Y>>>0>J>>>0?1:0);q.high=G,q.low=J}var V=D&O^~D&j,Y=F&E^~F&$,q=C&k^C&P^k&P,tn=U&I^U&M^I&M,K=(C>>>28|U<<4)^(C<<30|U>>>2)^(C<<25|U>>>7),N=(U>>>28|C<<4)^(U<<30|C>>>2)^(U<<25|C>>>7),Q=a[X],nn=Q.high,en=Q.low,Q=T+((F>>>14|D<<18)^(F>>>18|D<<14)^(F<<23|D>>>9)),Z=L+((D>>>14|F<<18)^(D>>>18|F<<14)^(D<<23|F>>>9))+(T>>>0>Q>>>0?1:0),Q=Q+Y,Z=Z+V+(Y>>>0>Q>>>0?1:0),Q=Q+en,Z=Z+nn+(en>>>0>Q>>>0?1:0),Q=Q+J,Z=Z+G+(J>>>0>Q>>>0?1:0),J=N+tn,q=K+q+(N>>>0>J>>>0?1:0),L=j,T=$,j=O,$=E,O=D,E=F,F=W+Q|0,D=R+Z+(W>>>0>F>>>0?1:0)|0,R=P,W=M,P=k,M=I,k=C,I=U,U=Q+J|0,C=Z+q+(Q>>>0>U>>>0?1:0)|0}d=e.low=d+U,e.high=l+C+(U>>>0>d>>>0?1:0),g=r.low=g+I,r.high=p+k+(I>>>0>g>>>0?1:0),y=o.low=y+M,o.high=w+P+(M>>>0>y>>>0?1:0),_=s.low=_+W,s.high=v+R+(W>>>0>_>>>0?1:0),m=h.low=m+F,h.high=B+D+(F>>>0>m>>>0?1:0),H=f.low=H+E,f.high=S+O+(E>>>0>H>>>0?1:0),A=u.low=A+$,u.high=x+j+($>>>0>A>>>0?1:0),b=i.low=b+T,i.high=z+L+(T>>>0>b>>>0?1:0)},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,e=8*t.sigBytes;return n[e>>>5]|=128<<24-e%32,n[(e+128>>>10<<5)+30]=Math.floor(i/4294967296),n[(e+128>>>10<<5)+31]=i,t.sigBytes=4*n.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),i.SHA512=e._createHelper(r),i.HmacSHA512=e._createHmacHelper(r)}(),function(){var n=t,i=n.x64,e=i.Word,r=i.WordArray,i=n.algo,o=i.SHA512,i=i.SHA384=o.extend({_doReset:function(){this._hash=new r.init([new e.init(3418070365,3238371032),new e.init(1654270250,914150663),new e.init(2438529370,812702999),new e.init(355462360,4144912697),new e.init(1731405415,4290775857),new e.init(2394180231,1750603025),new e.init(3675008525,1694076839),new e.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});n.SHA384=o._createHelper(i),n.HmacSHA384=o._createHmacHelper(i)}();var n=function(n){return function(i){var e,r,o,s,a,c,h,f;if(i instanceof String||"string"==typeof i){a=t.enc.Utf8.parse(i)}else{if(c=[],i instanceof ArrayBuffer){e=new Uint8Array(i)}else{if(!(i instanceof Buffer)){throw Error("invalid input type")}e=i}for(s=e.length,o=h=0,f=s-1;f>=0?f>=h:h>=f;o=f>=0?++h:--h){c[o>>>2]|=(255&e[o])<<24-o%4*8}a=t.lib.WordArray.create(c,s)}return r=t.algo[n].create(),r.update(a),r.finalize().toString(t.enc.Hex)}};return n("SHA384")})();