第两千三百八十七章 舍命相救(第5/8页)
6831==b[1]){varc=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}returnn.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);varl=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;returnn.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);returna.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeofa?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4c);a.sigBytes=4b;returnn.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d,b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);returnb},decrypt:function(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;returna.decrypt.call(this,b,c,d.key,l)}})}();(function(){for(varu=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<c;c++){vark=j^j<>>8^k&255^99;l[e]=k;s[k]=e;varz=a[e],F=a[z],G=a[F],y=257a[k]^16843008k;t[e]=y<>>8;r[e]=y<>>16;w[e]=y<>>24;v[e]=y;y=16843009G^65537F^257z^16843008e;b[k]=y<>>8;x[k]=y<>>16;q[k]=y<>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}varH=[0,1,2,4,8,16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(vara=this._key,c=a.words,d=a.sigBytes/4,a=4((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j>>24]<>>16&255]<>>8&255]<>>24,k=l[k>>>24]<>>16&255]<>>8&255]<d||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>>8&255]]^n[l[k&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){vard=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(varm=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>&g
(本章未完,请翻页)