text: AES={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Rcon:[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]],Cipher:function(r,e){for(var o=4,t=e.length/o-1,n=[[],[],[],[]],a=0;4*o>a;a++)n[a%4][Math.floor(a/4)]=r[a];n=this.AddRoundKey(n,e,0,o);for(var i=1;t>i;i++)n=this.SubBytes(n,o),n=this.ShiftRows(n,o),n=this.MixColumns(n,o),n=this.AddRoundKey(n,e,i,o);n=this.SubBytes(n,o),n=this.ShiftRows(n,o),n=this.AddRoundKey(n,e,t,o);for(var f=new Array(4*o),a=0;4*o>a;a++)f[a]=n[a%4][Math.floor(a/4)];return f},SubBytes:function(r,e){for(var o=0;4>o;o++)for(var t=0;e>t;t++)r[o][t]=this.Sbox[r[o][t]];return r},ShiftRows:function(r,e){for(var o=new Array(4),t=1;4>t;t++){for(var n=0;4>n;n++)o[n]=r[t][(n+t)%e];for(var n=0;4>n;n++)r[t][n]=o[n]}return r},MixColumns:function(r,e){for(var o=0;4>o;o++){for(var t=new Array(4),n=new Array(4),a=0;4>a;a++)t[a]=r[a][o],n[a]=128&r[a][o]?r[a][o]<<1^283:r[a][o]<<1;r[0][o]=n[0]^t[1]^n[1]^t[2]^t[3],r[1][o]=t[0]^n[1]^t[2]^n[2]^t[3],r[2][o]=t[0]^t[1]^n[2]^t[3]^n[3],r[3][o]=t[0]^n[0]^t[1]^t[2]^n[3]}return r},AddRoundKey:function(r,e,o,t){for(var n=0;4>n;n++)for(var a=0;t>a;a++)r[n][a]^=e[4*o+a][n];return r},KeyExpansion:function(r){for(var e=4,o=r.length/4,t=o+6,n=new Array(e*(t+1)),a=new Array(4),i=0;o>i;i++){var f=[r[4*i],r[4*i+1],r[4*i+2],r[4*i+3]];n[i]=f}for(var i=o;e*(t+1)>i;i++){n[i]=new Array(4);for(var h=0;4>h;h++)a[h]=n[i-1][h];if(i%o==0){a=this.SubWord(this.RotWord(a));for(var h=0;4>h;h++)a[h]^=this.Rcon[i/o][h]}else o>6&&i%o==4&&(a=this.SubWord(a));for(var h=0;4>h;h++)n[i][h]=n[i-o][h]^a[h]}return n},SubWord:function(r){for(var e=0;4>e;e++)r[e]=this.Sbox[r[e]];return r},RotWord:function(r){for(var e=r[0],o=0;3>o;o++)r[o]=r[o+1];return r[3]=e,r},encrypt:function(r,e,o){var t=16;if(128!=o&&192!=o&&256!=o)return"";r=r.encodeUTF8(),e=e.encodeUTF8();for(var n=o/8,a=new Array(n),i=0;n>i;i++)a[i]=isNaN(e.charCodeAt(i))?0:e.charCodeAt(i);var f=this.Cipher(a,this.KeyExpansion(a));f=f.concat(f.slice(0,n-16));for(var h=new Array(t),c=(new Date).getTime(),d=Math.floor(c/1e3),u=c%1e3,i=0;4>i;i++)h[i]=d>>>8*i&255;for(var i=0;4>i;i++)h[i+4]=255&u;for(var s="",i=0;8>i;i++)s+=String.fromCharCode(h[i]);for(var v=this.KeyExpansion(f),A=Math.ceil(r.length/t),C=new Array(A),y=0;A>y;y++){for(var g=0;4>g;g++)h[15-g]=y>>>8*g&255;for(var g=0;4>g;g++)h[15-g-4]=y/4294967296>>>8*g;for(var l=this.Cipher(h,v),S=A-1>y?t:(r.length-1)%t+1,p=new Array(S),i=0;S>i;i++)p[i]=l[i]^r.charCodeAt(y*t+i),p[i]=String.fromCharCode(p[i]);C[y]=p.join("")}var b=s+C.join("");return b=b.encodeBase64()},decrypt:function(r,e,o){var t=16;if(128!=o&&192!=o&&256!=o)return"";r=r.decodeBase64(),e=e.encodeUTF8();for(var n=o/8,a=new Array(n),i=0;n>i;i++)a[i]=isNaN(e.charCodeAt(i))?0:e.charCodeAt(i);var f=this.Cipher(a,this.KeyExpansion(a));f=f.concat(f.slice(0,n-16));for(var h=new Array(8),c=r.slice(0,8),i=0;8>i;i++)h[i]=c.charCodeAt(i);for(var d=this.KeyExpansion(f),u=Math.ceil((r.length-8)/t),s=new Array(u),v=0;u>v;v++)s[v]=r.slice(8+v*t,8+v*t+t);r=s;for(var A=new Array(r.length),v=0;u>v;v++){for(var C=0;4>C;C++)h[15-C]=v>>>8*C&255;for(var C=0;4>C;C++)h[15-C-4]=(v+1)/4294967296-1>>>8*C&255;for(var y=this.Cipher(h,d),g=new Array(r[v].length),i=0;i<r[v].length;i++)g[i]=y[i]^r[v].charCodeAt(i),g[i]=String.fromCharCode(g[i]);A[v]=g.join("")}var l=A.join("");return l=l.decodeUTF8()}};var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";String.prototype.encodeBase64=function(r){r="undefined"==typeof r?!1:r;var e,o,t,n,a,i,f,h,c,d,u,s=[],v="";if(d=r?this.encodeUTF8():this,c=d.length%3,c>0)for(;c++<3;)v+="=",d+="\x00";for(c=0;c<d.length;c+=3)e=d.charCodeAt(c),o=d.charCodeAt(c+1),t=d.charCodeAt(c+2),n=e<<16|o<<8|t,a=n>>18&63,i=n>>12&63,f=n>>6&63,h=63&n,s[c/3]=b64.charAt(a)+b64.charAt(i)+b64.charAt(f)+b64.charAt(h);return u=s.join(""),u=u.slice(0,u.length-v.length)+v},String.prototype.decodeBase64=function(r){r="undefined"==typeof r?!1:r;var e,o,t,n,a,i,f,h,c,d,u=[];d=r?this.decodeUTF8():this;for(var s=0;s<d.length;s+=4)n=b64.indexOf(d.charAt(s)),a=b64.indexOf(d.charAt(s+1)),i=b64.indexOf(d.charAt(s+2)),f=b64.indexOf(d.charAt(s+3)),h=n<<18|a<<12|i<<6|f,e=h>>>16&255,o=h>>>8&255,t=255&h,u[s/4]=String.fromCharCode(e,o,t),64==f&&(u[s/4]=String.fromCharCode(e,o)),64==i&&(u[s/4]=String.fromCharCode(e));return c=u.join(""),r?c.decodeUTF8():c},String.prototype.encodeUTF8=function(){var r=this.replace(/[\u0080-\u07ff]/g,function(r){var e=r.charCodeAt(0);return String.fromCharCode(192|e>>6,128|63&e)});return r=r.replace(/[\u0800-\uffff]/g,function(r){var e=r.charCodeAt(0);return String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e)})},String.prototype.decodeUTF8=function(){var r=this.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(r){var e=(31&r.charCodeAt(0))<<6|63&r.charCodeAt(1);return String.fromCharCode(e)});return r=r.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(r){var e=(15&r.charCodeAt(0))<<12|(63&r.charCodeAt(1))<<6|63&r.charCodeAt(2);return String.fromCharCode(e)})};
  