1 |
- (function(){function x(g){var l=g.jsustoolkitErrCode=g.jsustoolkitErrCode||{},h=g.des=g.des||{};g.cipher=g.cipher||{};g.cipher.algorithms=g.cipher.algorithms||{};g.cipher.des=g.cipher.algorithms.des=h;var A=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],C=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],q=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],x=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],w=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],I=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],J=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],K=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696],L=function(c){for(var g=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],h=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],l=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],r=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],C=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],t=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],y=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],m=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],n=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],x=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],z=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],u=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],a=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],d=8<c.length()?3:1,b=[],G=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],A=0,k,v=0;v<d;v++){var f=c.getInt32(),e=c.getInt32();k=(f>>>4^e)&252645135;e^=k;f^=k<<4;k=(e>>>-16^f)&65535;f^=k;e^=k<<-16;k=(f>>>2^e)&858993459;e^=k;f^=k<<2;k=(e>>>-16^f)&65535;f^=k;e^=k<<-16;k=(f>>>1^e)&1431655765;e^=k;f^=k<<1;k=(e>>>8^f)&16711935;f^=k;e^=k<<8;k=(f>>>1^e)&1431655765;e^=k;f^=k<<1;k=f<<8|e>>>20&240;f=e<<24|e<<8&16711680|e>>>8&65280|e>>>24&240;e=k;for(var p=0;p<G.length;p++){G[p]?(f=f<<2|f>>>26,e=e<<2|e>>>26):(f=f<<1|f>>>27,e=e<<1|e>>>27);f&=-15;e&=-15;var w=g[f>>>28]|h[f>>>24&15]|l[f>>>20&15]|r[f>>>16&15]|C[f>>>12&15]|t[f>>>8&15]|q[f>>>4&15],H=y[e>>>28]|m[e>>>24&15]|n[e>>>20&15]|x[e>>>16&15]|z[e>>>12&15]|u[e>>>8&15]|a[e>>>4&15];k=(H>>>16^w)&65535;b[A++]=w^k;b[A++]=H^k<<16}}return b},p=function(c,h){if(null==c||"undefined"==typeof c)throw{code:"100001",message:l["100001"]};if(c.constructor==String&&(8==c.length||24==c.length))c=g.util.createBuffer(c);else if(c.constructor==String&&16==c.length)c=g.util.createBuffer(c+c.slice(0,8));else if(c.constructor==String||8!=c.length()&&24!=c.length())if(c.constructor!=String&&16==c.length())c+=c.slice(0,8);else throw{code:"100002",message:l["100002"]};var p=L(c),B=1,r=0,D=0,t=0,E=0,y=!1,m=null,n=null,F=32==p.length?3:9;var z=3==F?h?[0,32,2]:[30,-2,-2]:h?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2];var u=null;return u={start:function(a,d){if(null!=a){if(a.constructor==String&&8==a.length)a=g.util.createBuffer(a);else if(a.constructor==String||8!=a.length())throw{code:"100006",message:l["100006"]};B=1;r=a.getInt32();t=a.getInt32()}else B=0;y=!1;m=g.util.createBuffer();n=d||g.util.createBuffer();u.output=n},update:function(a){if(null==m&&null==n)throw{code:"100004",message:l["100004"]};null!=a&&a.constructor==String&&(a=g.util.createBuffer(a));if(!y){if(null==a||"undefined"==typeof a)throw{code:"100003",message:l["100003"]};m.putBuffer(a)}for(;8<=m.length();){var d=m.getInt32(),b=m.getInt32();1==B&&(h?(d^=r,b^=t):(D=r,E=t,r=d,t=b));a=(d>>>4^b)&252645135;b^=a;d^=a<<4;a=(d>>>16^b)&65535;b^=a;d^=a<<16;a=(b>>>2^d)&858993459;d^=a;b^=a<<2;a=(b>>>8^d)&16711935;d^=a;b^=a<<8;a=(d>>>1^b)&1431655765;b^=a;d^=a<<1;d=d<<1|d>>>31;b=b<<1|b>>>31;for(var c=0;c<F;c+=3){for(var u=z[c+1],k=z[c+2],v=z[c];v!=u;v+=k){var f=b^p[v],e=(b>>>4|b<<28)^p[v+1];a=d;d=b;b=a^(C[f>>>24&63]|x[f>>>16&63]|I[f>>>8&63]|K[f&63]|A[e>>>24&63]|q[e>>>16&63]|w[e>>>8&63]|J[e&63])}a=d;d=b;b=a}d=d>>>1|d<<31;b=b>>>1|b<<31;a=(d>>>1^b)&1431655765;b^=a;d^=a<<1;a=(b>>>8^d)&16711935;d^=a;b^=a<<8;a=(b>>>2^d)&858993459;d^=a;b^=a<<2;a=(d>>>16^b)&65535;b^=a;d^=a<<16;a=(d>>>4^b)&252645135;b^=a;d^=a<<4;1==B&&(h?(r=d,t=b):(d^=D,b^=E));n.putInt32(d);n.putInt32(b)}},finish:function(a){var d=!0;if(h)if(a)d=a(8,m,!h);else{var b=8==m.length()?8:8-m.length();m.fillWithByte(b,b)}d&&(y=!0,u.update());if(!h)if(d=0===m.length())if(a)d=a(8,n,!h);else if(a=n.length(),b=n.at(a-1),8<b||0>b)d=!1;else{for(var c=a-b;c<a;c++)n.at(c)!=b&&(d=!1);d&&n.truncate(b)}else throw{code:"100007",message:l["100007"]};return d}}};g.des.startEncrypting=function(c,g,h){c=p(c,!0);c.start(g,h);return c};g.des.createEncryptionCipher=function(c){return p(c,!0)};g.des.startDecrypting=function(c,g,h){c=p(c,!1);c.start(g,h);return c};g.des.createDecryptionCipher=function(c){return p(c,!1)}}var w=["./util","./jsustoolkitErrCode"],q=null;"function"!==typeof define&&("object"===typeof module&&module.exports?q=function(g,l){l(require,module)}:(crosscert=window.crosscert=window.crosscert||{},x(crosscert)));(q||"function"===typeof define)&&(q||define)(["require","module"].concat(w),function(g,l){l.exports=function(h){var l=w.map(function(h){return g(h)}).concat(x);h=h||{};h.defined=h.defined||{};if(h.defined.des)return h.des;h.defined.des=!0;for(var q=0;q<l.length;++q)l[q](h);return h.des}})})();
|