/*! OpenPGPjs.org this is LGPL licensed code, see LICENSE/our website for more information.- v1.6.2 - 2016-06-08 */!function(a){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=a();elseif("function"==typeofdefine&&define.amd)define([],a);else{varb;b="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,b.openpgp=a()}}(function(){returnfunctiona(b,c,d){functione(g,h){if(!c[g]){if(!b[g]){vari="function"==typeofrequire&&require;if(!h&&i)returni(g,!0);if(f)returnf(g,!0);varj=newError("Cannot find module '"+g+"'");throwj.code="MODULE_NOT_FOUND",j}vark=c[g]={exports:{}};b[g][0].call(k.exports,function(a){varc=b[g][1][a];returne(c?c:a)},k,k.exports,a,b,c,d)}returnc[g].exports}for(varf="function"==typeofrequire&&require,g=0;g<d.length;g++)e(d[g]);returne}({1:[function(a,b,c){"use strict";vard=a("./promise/promise").Promise,e=a("./promise/polyfill").polyfill;c.Promise=d,c.polyfill=e},{"./promise/polyfill":5,"./promise/promise":6}],2:[function(a,b,c){"use strict";functiond(a){varb=this;if(!e(a))thrownewTypeError("You must pass an array to all.");returnnewb(function(b,c){functiond(a){returnfunction(b){e(a,b)}}functione(a,c){h[a]=c,0===--i&&b(h)}varg,h=[],i=a.length;0===i&&b([]);for(varj=0;j<a.length;j++)g=a[j],g&&f(g.then)?g.then(d(j),c):e(j,g)})}vare=a("./utils").isArray,f=a("./utils").isFunction;c.all=d},{"./utils":10}],3:[function(a,b,c){(function(a,b){"use strict";functiond(){returnfunction(){a.nextTick(g)}}functione(){vara=0,b=newk(g),c=document.createTextNode("");returnb.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}functionf(){returnfunction(){l.setTimeout(g,1)}}functiong(){for(vara=0;a<m.length;a++){varb=m[a],c=b[0],d=b[1];c(d)}m=[]}functionh(a,b){varc=m.push([a,b]);1===c&&i()}vari,j="undefined"!=typeofwindow?window:{},k=j.MutationObserver||j.WebKitMutationObserver,l="undefined"!=typeofb?b:void0===this?window:this,m=[];i="undefined"!=typeofa&&"[object process]"==={}.toString.call(a)?d():k?e():f(),c.asap=h}).call(this,a("_process"),"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{_process:11}],4:[function(a,b,c){"use strict";functiond(a,b){return2!==arguments.length?e[a]:void(e[a]=b)}vare={instrument:!1};c.config=e,c.configure=d},{}],5:[function(a,b,c){(function(b){"use strict";functiond(){vara;a="undefined"!=typeofb?b:"undefined"!=typeofwindow&&window.document?window:self;varc="Promise"ina&&"resolve"ina.Promise&&"reject"ina.Promise&&"all"ina.Promise&&"race"ina.Promise&&function(){varb;returnnewa.Promise(function(a){b=a}),f(b)}();c||(a.Promise=e)}vare=a("./promise").Promise,f=a("./utils").isFunction;c.polyfill=d}).call(this,"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{"./promise":6,"./utils":10}],6:[function(a,b,c){"use strict";functiond(a){if(!q(a))thrownewTypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(thisinstanceofd))thrownewTypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],e(a,this)}functione(a,b){functionc(a){j(b,a)}functiond(a){l(b,a)}try{a(c,d)}catch(e){d(e)}}functionf(a,b,c,d){vare,f,g,h,k=q(c);if(k)try{e=c(d),g=!0}catch(m){h=!0,f=m}elsee=d,g=!0;i(b,e)||(k&&g?j(b,e):h?l(b,f):a===y?j(b,e):a===z&&l(b,e))}functiong(a,b,c,d){vare=a._subscribers,f=e.length;e[f]=b,e[f+y]=c,e[f+z]=d}functionh(a,b){for(varc,d,e=a._subscribers,g=a._detail,h=0;h<e.length;h+=3)c=e[h],d=e[h+b],f(b,c,d,g);a._subscribers=null}functioni(a,b){varc,d=null;try{if(a===b)thrownewTypeError("A promises callback cannot return that same promise.");if(p(b)&&(d=b.then,q(d)))returnd.call(b,function(d){returnc?!0:(c=!0,void(b!==d?j(a,d):k(a,d)))},function(b){returnc?!0:(c=!0,voidl(a,b))}),!0}catch(e){returnc?!0:(l(a,e),!0)}return!1}functionj(a,b){a===b?k(a,b):i(a,b)||k(a,b)}functionk(a,b){a._state===w&&(a._state=x,a._de
32&e&&a(Error("fdict flag is not supported")),this.B=newm(b,{index:this.c,bufferSize:c.bufferSize,bufferType:c.bufferType,resize:c.resize})}functions(a,b){this.input=a,this.a=new(x?Uint8Array:Array)(32768),this.h=ea.k;varc,d={};!b&&(b={})||"number"!=typeofb.compressionType||(this.h=b.compressionType);for(cinb)d[c]=b[c];d.outputBuffer=this.a,this.A=newf(this.input,d)}functiont(a,c){vard,e,f,g;if(Object.keys)d=Object.keys(c);elsefor(eind=[],f=0,c)d[f++]=e;for(f=0,g=d.length;g>f;++f)e=d[f],b(a+"."+e,c[e])}varu=void0,v=!0,w=this,x="undefined"!=typeofUint8Array&&"undefined"!=typeofUint16Array&&"undefined"!=typeofUint32Array&&"undefined"!=typeofDataView;c.prototype.f=function(){vara,b=this.buffer,c=b.length,d=new(x?Uint8Array:Array)(c<<1);if(x)d.set(b);elsefor(a=0;c>a;++a)d[a]=b[a];returnthis.buffer=d},c.prototype.d=function(a,b,c){vard,e=this.buffer,f=this.index,g=this.i,h=e[f];if(c&&b>1&&(a=b>8?(D[255&a]<<24|D[a>>>8&255]<<16|D[a>>>16&255]<<8|D[a>>>24&255])>>32-b:D[a]>>8-b),8>b+g)h=h<<b|a,g+=b;elsefor(d=0;b>d;++d)h=h<<1|a>>b-d-1&1,8===++g&&(g=0,e[f++]=D[h],h=0,f===e.length&&(e=this.f()));e[f]=h,this.buffer=e,this.i=g,this.index=f},c.prototype.finish=function(){vara,b=this.buffer,c=this.index;return0<this.i&&(b[c]<<=8-this.i,b[c]=D[b[c]],c++),x?a=b.subarray(0,c):(b.length=c,a=b),a};vary,z=new(x?Uint8Array:Array)(256);for(y=0;256>y;++y){for(varA=y,B=A,C=7,A=A>>>1;A;A>>>=1)B<<=1,B|=1&A,--C;z[y]=(B<<C&255)>>>0}varD=z;d.prototype.getParent=function(a){return2*((a-2)/4|0)},d.prototype.push=function(a,b){varc,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;returnthis.length},d.prototype.pop=function(){vara,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2<this.length&&f[d+2]>f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};varE,F=2,G={NONE:0,r:1,k:F,O:3},H=[];for(E=0;288>E;E++)switch(v){case143>=E:H.push([E+48,8]);break;case255>=E:H.push([E-144+400,9]);break;case279>=E:H.push([E-256+0,7]);break;case287>=E:H.push([E-280+192,8]);break;default:a("invalid literal: "+E)}f.prototype.j=function(){varb,d,e,f,g=this.input;switch(this.h){case0:for(e=0,f=g.length;f>e;){d=x?g.subarray(e,e+65535):g.slice(e,e+65535),e+=d.length;vari=d,k=e===f,m=u,n=u,o=u,p=u,q=u,r=this.a,s=this.b;if(x){for(r=newUint8Array(this.a.buffer);r.length<=s+i.length+5;)r=newUint8Array(r.length<<1);r.set(this.a)}if(m=k?1:0,r[s++]=0|m,n=i.length,o=~n+65536&65535,r[s++]=255&n,r[s++]=n>>>8&255,r[s++]=255&o,r[s++]=o>>>8&255,x)r.set(i,s),s+=i.length,r=r.subarray(0,s);else{for(p=0,q=i.length;q>p;++p)r[s++]=i[p];r.length=s}this.b=s,this.a=r}break;case1:vart=newc(x?newUint8Array(this.a.buffer):this.a,this.b);t.d(1,1,v),t.d(1,2,v);varw,y,z,A=h(this,g);for(w=0,y=A.length;y>w;w++)if(z=A[w],c.prototype.d.apply(t,H[z]),z>256)t.d(A[++w],A[++w],v),t.d(A[++w],5),t.d(A[++w],A[++w],v);elseif(256===z)break;this.a=t.finish(),this.b=this.a.length;break;caseF:varB,C,D,E,G,I,J,K,L,M,N,O,P,Q,R,S=newc(x?newUint8Array(this.a.buffer):this.a,this.b),T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=Array(19);for(B=F,S.d(1,1,v),S.d(B,2,v),C=h(this,g),I=j(this.M,15),J=l(I),K=j(this.L,7),L=l(K),D=286;D>257&&0===I[D-1];D--);for(E=30;E>1&&0===K[E-1];E--);varV,W,X,Y,Z,$,_=D,aa=E,ba=new(x?Uint32Array:Array)(_+aa),ca=new(x?Uint32Array:Array)(316),da=new(x?Uint8Array:Array)(19);for(V=W=0;_>V;V++)ba[W++]=I[V];for(V=0;aa>V;V++)ba[W++]=K[V];if(!x)for(V=0,Y=da.length;Y>V;++V)da[V]=0;for(V=Z=0,Y=ba.length;Y>V;V+=W){for(W=1;Y>V+W&&ba[V+W]===ba[V];++W);if(X=W,0===ba[V])if(3>X)for(;0<X--;)ca[Z++]=0,da[0]++;elsefor(;X>0;)$=138>X?X:138,$>X-3&&X>$&&($=X-3),10>=$?(ca[Z++]=17,ca[Z++]=$-3,da[17]++):(ca[Z++]=18,ca[Z++]=$-11,da[18]++),X-=$;elseif(ca[Z++]=ba[V],da[ba[V]]++,X--,3>X)for(;0<X--;)ca[Z++]=ba[V],da[ba[V]]++;elsefor(;X>0;)$=6>X?X:6,$>X-3&&X>$&&($=X-3),ca[Z++]=16,ca[Z++]=$-3
d.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],d.prototype.NN=16,d.prototype._clean=function(a){if(0>a){varb=2147483647&a;a=b+2147483648}returna},d.prototype._F=function(a){varb,c,d,e,f;returne=255&a,a>>>=8,d=255&a,a>>>=8,c=255&a,a>>>=8,b=255&a,f=this.sboxes[0][b]+this.sboxes[1][c],f^=this.sboxes[2][d],f+=this.sboxes[3][e]},d.prototype._encrypt_block=function(a){varb,c=a[0],d=a[1];for(b=0;b<this.NN;++b){c^=this.parray[b],d=this._F(c)^d;vare=c;c=d,d=e}c^=this.parray[this.NN+0],d^=this.parray[this.NN+1],a[0]=this._clean(d),a[1]=this._clean(c)},d.prototype.encrypt_block=function(a){varb,c=[0,0],d=this.BLOCKSIZE/2;for(b=0;b<this.BLOCKSIZE/2;++b)c[0]=c[0]<<8|255&a[b+0],c[1]=c[1]<<8|255&a[b+d];this._encrypt_block(c);vare=[];for(b=0;b<this.BLOCKSIZE/2;++b)e[b+0]=c[0]>>>24-8*b&255,e[b+d]=c[1]>>>24-8*b&255;returne},d.prototype._decrypt_block=function(a){varb,c=a[0],d=a[1];for(b=this.NN+1;b>1;--b){c^=this.parray[b],d=this._F(c)^d;vare=c;c=d,d=e}c^=this.parray[1],d^=this.parray[0],a[0]=this._clean(d),a[1]=this._clean(c)},d.prototype.init=function(a){varb,c=0;for(this.parray=[],b=0;b<this.NN+2;++b){vard,e=0;for(d=0;4>d;++d)e=e<<8|255&a[c],++c>=a.length&&(c=0);this.parray[b]=this.PARRAY[b]^e}for(this.sboxes=[],b=0;4>b;++b)for(this.sboxes[b]=[],c=0;256>c;++c)this.sboxes[b][c]=this.SBOXES[b][c];varf=[0,0];for(b=0;b<this.NN+2;b+=2)this._encrypt_block(f),this.parray[b+0]=f[0],this.parray[b+1]=f[1];for(b=0;4>b;++b)for(c=0;256>c;c+=2)this._encrypt_block(f),this.sboxes[b][c+0]=f[0],this.sboxes[b][c+1]=f[1]};varf=a("../../util.js");b.exports=e,b.exports.keySize=e.prototype.keySize=16,b.exports.blockSize=e.prototype.blockSize=16},{"../../util.js":76}],21:[function(a,b,c){functiond(){functiona(a,b,c){vard=b+a,e=d<<c|d>>>32-c;return(f[0][e>>>24]^f[1][e>>>16&255])-f[2][e>>>8&255]+f[3][255&e]}functionb(a,b,c){vard=b^a,e=d<<c|d>>>32-c;returnf[0][e>>>24]-f[1][e>>>16&255]+f[2][e>>>8&255]^f[3][255&e]}functionc(a,b,c){vard=b-a,e=d<<c|d>>>32-c;return(f[0][e>>>24]+f[1][e>>>16&255]^f[2][e>>>8&255])-f[3][255&e]}this.BlockSize=8,this.KeySize=16,this.setKey=function(a){if(this.masking=newArray(16),this.rotate=newArray(16),this.reset(),a.length!=this.KeySize)thrownewError("CAST-128: keys must be 16 bytes");returnthis.keySchedule(a),!0},this.reset=function(){for(vara=0;16>a;a++)this.masking[a]=0,this.rotate[a]=0},this.getBlockSize=function(){returnBlockSize},this.encrypt=function(d){for(vare=newArray(d.length),f=0;f<d.length;f+=8){varg,h=d[f]<<24|d[f+1]<<16|d[f+2]<<8|d[f+3],i=d[f+4]<<24|d[f+5]<<16|d[f+6]<<8|d[f+7];g=i,i=h^a(i,this.masking[0],this.rotate[0]),h=g,g=i,i=h^b(i,this.masking[1],this.rotate[1]),h=g,g=i,i=h^c(i,this.masking[2],this.rotate[2]),h=g,g=i,i=h^a(i,this.masking[3],this.rotate[3]),h=g,g=i,i=h^b(i,this.masking[4],this.rotate[4]),h=g,g=i,i=h^c(i,this.masking[5],this.rotate[5]),h=g,g=i,i=h^a(i,this.masking[6],this.rotate[6]),h=g,g=i,i=h^b(i,this.masking[7],this.rotate[7]),h=g,g=i,i=h^c(i,this.masking[8],this.rotate[8]),h=g,g=i,i=h^a(i,this.masking[9],this.rotate[9]),h=g,g=i,i=h^b(i,this.masking[10],this.rotate[10]),h=g,g=i,i=h^c(i,this.masking[11],this.rotate[11]),h=g,g=i,i=h^a(i,this.masking[12],this.rotate[12]),h=g,g=i,i=h^b(i,this.masking[13],this.rotate[13]),h=g,g=i,i=h^c(i,this.masking[14],this.rotate[14]),h=g,g=i,i=h^a(i,this.masking[15],this.rotate[15]),h=g,e[f]=i>>>24&255,e[f+1]=i>>>16&255,e[f+2]=i>>>8&255,e[f+3]=255&i,e[f+4]=h>>>24&255,e[f+5]=h>>>16&255,e[f+6]=h>>>8&255,e[f+7]=255&h}returne},this.decrypt=function(d){for(vare=newArray(d.length),f=0;f<d.length;f+=8){varg,h=d[f]<<24|d[f+1]<<16|d[f+2]<<8|d[f+3],i=d[f+4]<<24|d[f+5]<<16|d[f+6]<<8|d[f+7];g=i,i=h^a(i,this.masking[15],this.rotate[15]),h=g,g=i,i=h^c(i,this.masking[14],this.rotate[14]),h=g,g=i,i=h^b(i,this.masking[13],this.rotate[13]),h=g,g=i,i=h^a(i,this.masking[12],this.rotate[12]),h=g,g=i,i=h^c(i,this.masking[11],this.rotate[11]),h=g,g=i,i=h^b(i,this.masking[10],this.rotate[10])
}this.nextBytes=a}functione(a,b,c){returnm=m.bitLength()===b.bitLength()?m.square().mod(b):j.getRandomBigIntegerInRange(h.TWO,b),l=m.modInverse(b).modPow(c,b),a.multiply(l).mod(b)}functionf(a,b){returna.multiply(m).mod(b)}functiong(){functiona(a,b,c,d,g,j,l){k.rsa_blinding&&(a=e(a,b,c));varm=a.mod(g).modPow(d.mod(g.subtract(h.ONE)),g),n=a.mod(j).modPow(d.mod(j.subtract(h.ONE)),j);i.print_debug("rsa.js decrypt\nxpn:"+i.hexstrdump(m.toMPI())+"\nxqn:"+i.hexstrdump(n.toMPI()));varo=n.subtract(m);return0===o[0]?(o=m.subtract(n),o=o.multiply(l).mod(j),o=j.subtract(o)):o=o.multiply(l).mod(j),o=o.multiply(g).add(m),k.rsa_blinding&&(o=f(o,b)),o}functionb(a,b,c){returna.modPowInt(b,c)}functionc(a,b,c){returna.modPow(b,c)}functiong(a,b,c){returna.modPowInt(b,c)}functionj(){this.n=null,this.e=0,this.ee=null,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.u=null}functionl(a,b){functionc(a){varb=g.exportKey("jwk",a.privateKey);return"function"!=typeofb.then&&(b=f(b,"Error exporting RSA key pair.")),b}functione(a){functionc(a){varb=a.replace(/\-/g,"+").replace(/_/g,"/"),c=i.hexstrdump(atob(b));returnnewh(c,16)}vard=newj;returnd.n=c(a.n),d.ee=newh(b,16),d.d=c(a.d),d.p=c(a.p),d.q=c(a.q),d.u=d.p.modInverse(d.q),d}functionf(a,b){returnnewPromise(function(c,d){a.onerror=function(a){d(newError(b))},a.oncomplete=function(a){c(a.target.result)}})}varg=i.getWebCrypto();if(g){vark,l,m=newUint32Array([parseInt(b,16)]),n=newUint8Array(m.buffer);returnwindow.crypto&&window.crypto.webkitSubtle?(k={name:"RSA-OAEP",modulusLength:a,publicExponent:n.subarray(0,3)},l=g.generateKey(k,!0,["encrypt","decrypt"])):(k={name:"RSASSA-PKCS1-v1_5",modulusLength:a,publicExponent:n.subarray(0,3),hash:{name:"SHA-1"}},l=g.generateKey(k,!0,["sign","verify"]),"function"!=typeofl.then&&(l=f(l,"Error generating RSA key pair."))),l.then(c).then(function(a){returne(ainstanceofArrayBuffer?JSON.parse(String.fromCharCode.apply(null,newUint8Array(a))):a)})}returnnewPromise(function(c){vare=newj,f=newd,g=a>>1;for(e.e=parseInt(b,16),e.ee=newh(b,16);;){for(;e.p=newh(a-g,1,f),0!==e.p.subtract(h.ONE).gcd(e.ee).compareTo(h.ONE)||!e.p.isProbablePrime(10););for(;e.q=newh(g,1,f),0!==e.q.subtract(h.ONE).gcd(e.ee).compareTo(h.ONE)||!e.q.isProbablePrime(10););if(e.p.compareTo(e.q)<=0){vari=e.p;e.p=e.q,e.q=i}vark=e.p.subtract(h.ONE),l=e.q.subtract(h.ONE),m=k.multiply(l);if(0===m.gcd(e.ee).compareTo(h.ONE)){e.n=e.p.multiply(e.q),e.d=e.ee.modInverse(m),e.dmp1=e.d.mod(k),e.dmq1=e.d.mod(l),e.u=e.p.modInverse(e.q);break}}c(e)})}this.encrypt=b,this.decrypt=a,this.verify=g,this.sign=c,this.generate=l,this.keyObject=j}varh=a("./jsbn.js"),i=a("../../util.js"),j=a("../random.js"),k=a("../../config"),l=h.ZERO,m=h.ZERO;b.exports=g},{"../../config":17,"../../util.js":76,"../random.js":39,"./jsbn.js":37}],39:[function(a,b,c){functiond(){this.buffer=null,this.size=null}vare=a("../type/mpi.js"),f=null;"undefined"==typeofwindow&&(f=a("crypto")),b.exports={getRandomBytes:function(a){for(varb="",c=0;a>c;c++)b+=String.fromCharCode(this.getSecureRandomOctet());returnb},getSecureRandom:function(a,b){for(varc=this.getSecureRandomUint(),d=(b-a).toString(2).length;(c&Math.pow(2,d)-1)>b-a;)c=this.getSecureRandomUint();returna+Math.abs(c&Math.pow(2,d)-1)},getSecureRandomOctet:function(){vara=newUint8Array(1);returnthis.getRandomValues(a),a[0]},getSecureRandomUint:function(){vara=newUint8Array(4),b=newDataView(a.buffer);returnthis.getRandomValues(a),b.getUint32(0)},getRandomValues:function(a){if(!(ainstanceofUint8Array))thrownewError("Invalid type: buf not an Uint8Array");if("undefined"!=typeofwindow&&window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(a);elseif("undefined"!=typeofwindow&&"object"==typeofwindow.msCrypto&&"function"==typeofwindow.msCrypto.getRandomValues)window.msCrypto.getRandomValues(a);elseif(f){varb=f.randomBytes(a.length);a.set(b)}else{if(!this.randomBuffer.buffer)thrownewError("No secure random number generator available.");this.randomBuffer.get(a)}},getRandomBigInteger:
key:a})){if(!this.selfCertifications[c].isExpired()){b=o.keyStatus.valid;break}b=o.keyStatus.expired}elseb=o.keyStatus.invalid;returnb},i.prototype.update=function(a,b){varc=this;h(a,this,"selfCertifications",function(a){returna.verified||a.verify(b,{userid:c.userId||c.userAttribute,key:b})}),h(a,this,"otherCertifications"),h(a,this,"revocationCertifications")},j.prototype.toPacketlist=function(){vara=newn.List;returna.push(this.subKey),a.push(this.revocationSignature),a.push(this.bindingSignature),a},j.prototype.isValidEncryptionKey=function(a){returnthis.verify(a)==o.keyStatus.valid&&e(this.subKey,this.bindingSignature)},j.prototype.isValidSigningKey=function(a){returnthis.verify(a)==o.keyStatus.valid&&f(this.subKey,this.bindingSignature)},j.prototype.verify=function(a){returnthis.revocationSignature&&!this.revocationSignature.isExpired()&&(this.revocationSignature.verified||this.revocationSignature.verify(a,{key:a,bind:this.subKey}))?o.keyStatus.revoked:3==this.subKey.version&&0!==this.subKey.expirationTimeV3&&Date.now()>this.subKey.created.getTime()+24*this.subKey.expirationTimeV3*3600*1e3?o.keyStatus.expired:this.bindingSignature?this.bindingSignature.isExpired()?o.keyStatus.expired:this.bindingSignature.verified||this.bindingSignature.verify(a,{key:a,bind:this.subKey})?4==this.subKey.version&&this.bindingSignature.keyNeverExpires===!1&&Date.now()>this.subKey.created.getTime()+1e3*this.bindingSignature.keyExpirationTime?o.keyStatus.expired:o.keyStatus.valid:o.keyStatus.invalid:o.keyStatus.invalid},j.prototype.getExpirationTime=function(){returng(this.subKey,this.bindingSignature)},j.prototype.update=function(a,b){if(a.verify(b)!==o.keyStatus.invalid){if(this.subKey.getFingerprint()!==a.subKey.getFingerprint())thrownewError("SubKey update method: fingerprints of subkeys not equal");this.subKey.tag===o.packet.publicSubkey&&a.subKey.tag===o.packet.secretSubkey&&(this.subKey=a.subKey),!this.bindingSignature&&a.bindingSignature&&(a.bindingSignature.verified||a.bindingSignature.verify(b,{key:b,bind:this.subKey}))&&(this.bindingSignature=a.bindingSignature),this.revocationSignature||!a.revocationSignature||a.revocationSignature.isExpired()||!a.revocationSignature.verified&&!a.revocationSignature.verify(b,{key:b,bind:this.subKey})||(this.revocationSignature=a.revocationSignature)}},c.Key=d,c.readArmored=k,c.generate=l,c.getPreferredSymAlgo=m},{"./config":17,"./encoding/armor.js":41,"./enums.js":43,"./packet":55,"./util":76}],48:[function(a,b,c){b.exports=a("./keyring.js"),b.exports.localstore=a("./localstore.js")},{"./keyring.js":49,"./localstore.js":50}],49:[function(a,b,c){functiond(b){this.storeHandler=b||new(a("./localstore.js")),this.publicKeys=newe(this.storeHandler.loadPublic()),this.privateKeys=newe(this.storeHandler.loadPrivate())}functione(a){this.keys=a}functionf(a,b){a=a.toLowerCase();for(varc=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d=newRegExp("<"+c+">"),e=b.getUserIds(),f=0;f<e.length;f++){varg=e[f].toLowerCase();if(a===g||d.test(g))return!0}return!1}functiong(a,b){return16===a.length?a===b.getKeyId().toHex():a===b.getFingerprint()}varh=(a("../enums.js"),a("../key.js"));a("../util.js");b.exports=d,d.prototype.store=function(){this.storeHandler.storePublic(this.publicKeys.keys),this.storeHandler.storePrivate(this.privateKeys.keys)},d.prototype.clear=function(){this.publicKeys.keys=[],this.privateKeys.keys=[]},d.prototype.getKeysForId=function(a,b){varc=[];returnc=c.concat(this.publicKeys.getForId(a,b)||[]),c=c.concat(this.privateKeys.getForId(a,b)||[]),c.length?c:null},d.prototype.removeKeysForId=function(a){varb=[];returnb=b.concat(this.publicKeys.removeForId(a)||[]),b=b.concat(this.privateKeys.removeForId(a)||[]),b.length?b:null},d.prototype.getAllKeys=function(){returnthis.publicKeys.keys.concat(this.privateKeys.keys)},e.prototype.getForAddress=function(a){for(varb=[],c=0;c<this.keys.length;c++)f(a,this.keys[c])&&b.push(this.keys[c]);returnb},e.prototype.getForId=function(a,b){for(varc=0;c<this.keys.length;c++){if(g(a,this.keys[c].primaryKey))returnthis.keys[c];if(b&&this.ke
this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyId=newk,this.notation=null,this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserId=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.verified=!1}functione(a,b){varc="";returnc+=g.writeSimpleLength(b.length+1),c+=String.fromCharCode(a),c+=b}b.exports=d;varf=a("../util.js"),g=a("./packet.js"),h=a("../enums.js"),i=a("../crypto"),j=a("../type/mpi.js"),k=a("../type/keyid.js");d.prototype.read=function(a){functionb(a){for(varb=f.readNumber(a.substr(0,2)),c=2;2+b>c;){vard=g.readSimpleLength(a.substr(c));c+=d.offset,this.read_sub_packet(a.substr(c,d.len)),c+=d.len}returnc}varc=0;switch(this.version=a.charCodeAt(c++),this.version){case3:5!=a.charCodeAt(c++)&&f.print_debug("packet/signature.js\ninvalid One-octet length of following hashed material.MUST be 5. @:"+(c-1));vard=c;this.signatureType=a.charCodeAt(c++),this.created=f.readDate(a.substr(c,4)),c+=4,this.signatureData=a.substring(d,c),this.issuerKeyId.read(a.substring(c,c+8)),c+=8,this.publicKeyAlgorithm=a.charCodeAt(c++),this.hashAlgorithm=a.charCodeAt(c++);break;case4:this.signatureType=a.charCodeAt(c++),this.publicKeyAlgorithm=a.charCodeAt(c++),this.hashAlgorithm=a.charCodeAt(c++),c+=b.call(this,a.substr(c),!0),this.signatureData=a.substr(0,c);vare=c;c+=b.call(this,a.substr(c),!1),this.unhashedSubpackets=a.substr(e,c-e);break;default:thrownewError("Version "+this.version+" of the signature is unsupported.")}this.signedHashValue=a.substr(c,2),c+=2,this.signature=a.substr(c)},d.prototype.write=function(){vara="";switch(this.version){case3:a+=String.fromCharCode(3),a+=String.fromCharCode(5),a+=this.signatureData,a+=this.issuerKeyId.write(),a+=String.fromCharCode(this.publicKeyAlgorithm),a+=String.fromCharCode(this.hashAlgorithm);break;case4:a+=this.signatureData,a+=this.unhashedSubpackets?this.unhashedSubpackets:f.writeNumber(0,2)}returna+=this.signedHashValue+this.signature},d.prototype.sign=function(a,b){varc=h.write(h.signature,this.signatureType),d=h.write(h.publicKey,this.publicKeyAlgorithm),e=h.write(h.hash,this.hashAlgorithm),f=String.fromCharCode(4);f+=String.fromCharCode(c),f+=String.fromCharCode(d),f+=String.fromCharCode(e),this.issuerKeyId=a.getKeyId(),f+=this.write_all_sub_packets(),this.signatureData=f;varg=this.calculateTrailer(),j=this.toSign(c,b)+this.signatureData+g,k=i.hash.digest(e,j);this.signedHashValue=k.substr(0,2),this.signature=i.signature.sign(e,d,a.mpi,j)},d.prototype.write_all_sub_packets=function(){vara=h.signatureSubpacket,b="",c="";if(null!==this.created&&(b+=e(a.signature_creation_time,f.writeDate(this.created))),null!==this.signatureExpirationTime&&(b+=e(a.signature_expiration_time,f.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&(b+=e(a.exportable_certification,String.fromCharCode(this.exportable?1:0))),null!==this.trustLevel&&(c=String.fromCharCode(this.trustLevel)+String.fromCharCode(this.trustAmount),b+=e(a.trust_signature,c)),null!==this.regularExpression&&(b+=e(a.regular_expression,this.regularExpression)),null!==this.revocable&&(b+=e(a.revocable,String.fromCharCode(this.revocable?1:0))),null!==this.keyExpirationTime&&(b+=e(a.key_expiration_time,f.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(c=f.bin2str(this.preferredSymmetricAlgorithms),b+=e(a.preferred_symmetric_algorithms,c)),null!==this.revocationKeyClass&&(c=String.fromCharCode(this.revocationKeyClass),c+=String.fromCharCode(this.revocationKeyAlgorithm),c+=this.revocationKeyFingerprint,b+=e(a.revocation_key,c)),this.issuerKeyId.isNull()||(b+=e(a.issuer,this.issuerKeyId.write())),null!==this.notation)for(v