|
|
|
|
(function(){this.DesUtils=function(){};this.DesUtils.encode=function(z,y){if(z&&y){var A=y.split(",");if(A.length>=3){return d(z,A[0],A[1],A[2])}return d(z,y,"","")}return""},this.DesUtils.decode=function(z,y){if(z&&y){var A=y.split(",");if(A.length>=3){return h(z,A[0],A[1],A[2])}return h(z,y,"","")}return""};function d(W,P,A,D){var G=W.length;var H="";var T,Q,N,X,F,I;if(P!=null&&P!=""){T=o(P);X=T.length}if(A!=null&&A!=""){Q=o(A);F=Q.length}if(D!=null&&D!=""){N=o(D);I=N.length}if(G>0){if(G<4){var U=a(W);var E;if(P!=null&&P!=""&&A!=null&&A!=""&&D!=null&&D!=""){var S;var L,K,J;S=U;for(L=0;L<X;L++){S=e(S,T[L])}for(K=0;K<F;K++){S=e(S,Q[K])}for(J=0;J<I;J++){S=e(S,N[J])}E=S}else{if(P!=null&&P!=""&&A!=null&&A!=""){var S;var L,K;S=U;for(L=0;L<X;L++){S=e(S,T[L])}for(K=0;K<F;K++){S=e(S,Q[K])}E=S}else{if(P!=null&&P!=""){var S;var L=0;S=U;for(L=0;L<X;L++){S=e(S,T[L])}E=S}}}H=f(E)}else{var O=parseInt(G/4);var M=G%4;var R=0;for(R=0;R<O;R++){var C=W.substring(R*4+0,R*4+4);var V=a(C);var E;if(P!=null&&P!=""&&A!=null&&A!=""&&D!=null&&D!=""){var S;var L,K,J;S=V;for(L=0;L<X;L++){S=e(S,T[L])}for(K=0;K<F;K++){S=e(S,Q[K])}for(J=0;J<I;J++){S=e(S,N[J])}E=S}else{if(P!=null&&P!=""&&A!=null&&A!=""){var S;var L,K;S=V;for(L=0;L<X;L++){S=e(S,T[L])}for(K=0;K<F;K++){S=e(S,Q[K])}E=S}else{if(P!=null&&P!=""){var S;var L;S=V;for(L=0;L<X;L++){S=e(S,T[L])}E=S}}}H+=f(E)}if(M>0){var B=W.substring(O*4+0,G);var V=a(B);var E;if(P!=null&&P!=""&&A!=null&&A!=""&&D!=null&&D!=""){var S;var L,K,J;S=V;for(L=0;L<X;L++){S=e(S,T[L])}for(K=0;K<F;K++){S=e(S,Q[K])}for(J=0;J<I;J++){S=e(S,N[J])}E=S}else{if(P!=null&&P!=""&&A!=null&&A!=""){var S;var L,K;S=V;for(L=0;L<X;L++){S=e(S,T[L])}for(K=0;K<F;K++){S=e(S,Q[K])}E=S}else{if(P!=null&&P!=""){var S;var L;S=V;for(L=0;L<X;L++){S=e(S,T[L])}E=S}}}H+=f(E)}}}return H}function h(V,O,A,C){var E=V.length;var F="";var T,Q,L,W,D,H;if(O!=null&&O!=""){T=o(O);W=T.length}if(A!=null&&A!=""){Q=o(A);D=Q.length}if(C!=null&&C!=""){L=o(C);H=L.length}var N=parseInt(E/16);var S=0;for(S=0;S<N;S++){var B=V.substring(S*16+0,S*16+16);var G=c(B);var U=new Array(64);var P=0;for(P=0;P<64;P++){U[P]=parseInt(G.substring(P,P+1))}var M;if(O!=null&&O!=""&&A!=null&&A!=""&&C!=null&&C!=""){var R;var K,J,I;R=U;for(K=H-1;K>=0;K--){R=l(R,L[K])}for(J=D-1;J>=0;J--){R=l(R,Q[J])}for(I=W-1;I>=0;I--){R=l(R,T[I])}M=R}else{if(O!=null&&O!=""&&A!=null&&A!=""){var R;var K,J,I;R=U;for(K=D-1;K>=0;K--){R=l(R,Q[K])}for(J=W-1;J>=0;J--){R=l(R,T[J])}M=R}else{if(O!=null&&O!=""){var R;var K,J,I;R=U;for(K=W-1;K>=0;K--){R=l(R,T[K])}M=R}}}F+=s(M)}return F}function o(B){var y=new Array();var A=B.length;var C=parseInt(A/4);var D=A%4;var z=0;for(z=0;z<C;z++){y[z]=a(B.substring(z*4+0,z*4+4))}if(D>0){y[z]=a(B.substring(z*4+0,A))}return y}function a(G){var y=G.length;var H=new Array(64);if(y<4){var E=0,D=0,A=0,z=0;for(E=0;E<y;E++){var C=G.charCodeAt(E);for(D=0;D<16;D++){var F=1,B=0;for(B=15;B>D;B--){F*=2}H[16*E+D]=parseInt(C/F)%2}}for(A=y;A<4;A++){var C=0;for(z=0;z<16;z++){var F=1,B=0;for(B=15;B>z;B--){F*=2}H[16*A+z]=parseInt(C/F)%2}}}else{for(E=0;E<4;E++){var C=G.charCodeAt(E);for(D=0;D<16;D++){var F=1;for(B=15;B>D;B--){F*=2}H[16*E+D]=parseInt(C/F)%2}}}return H}function b(z){var y;switch(z){case"0000":y="0";break;case"0001":y="1";break;case"0010":y="2";break;case"0011":y="3";break;case"0100":y="4";break;case"0101":y="5";break;case"0110":y="6";break;case"0111":y="7";break;case"1000":y="8";break;case"1001":y="9";break;case"1010":y="A";break;case"1011":y="B";break;case"1100":y="C";break;case"1101":y="D";break;case"1110":y="E";break;case"1111":y="F";break}return y}function g(y){var z;switch(y){case"0":z="0000";break;case"1":z="0001";break;case"2":z="0010";break;case"3":z="0011";break;case"4":z="0100";break;case"5":z="0101";break;case"6":z="0110";break;case"7":z="0111";break;case"8":z="1000";break;case"9":z="1001";break;case"A":z="1010";break;case"B":z="1011";break;case"C":z="1100";break;case"D":z="1101";break;case"E":z="1110";break;case"F":z="1111";break}return z}function s(B){var A="";for(i=0;i<4;i++){var z=0;for(j=0;j<16;j++){var y=1;for(m=15;m>j;m--){y*=2}z+=B[16*i+j]*y}if(z!=0){A+=String.fromCharC
|