@protontech/openpgp 6.0.0-alpha.1 → 6.0.0-alpha.1.patch.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! OpenPGP.js v6.0.0-alpha.1 - 2024-03-01 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
1
+ /*! OpenPGP.js v6.0.0-alpha.1.patch.1 - 2024-03-11 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
2
2
  const globalThis = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3
3
 
4
4
  const doneWritingPromise = Symbol('doneWritingPromise');
@@ -1657,7 +1657,7 @@ var config = {
1657
1657
  * @memberof module:config
1658
1658
  * @property {String} versionString A version string to be included in armored messages
1659
1659
  */
1660
- versionString: 'OpenPGP.js 6.0.0-alpha.1',
1660
+ versionString: 'OpenPGP.js 6.0.0-alpha.1.patch.1',
1661
1661
  /**
1662
1662
  * @memberof module:config
1663
1663
  * @property {String} commentString A comment string to be included in armored messages
@@ -20320,8 +20320,7 @@ async function wrapKeyObject(secretKeyPacket, secretSubkeyPackets, options, conf
20320
20320
  // prefer fast asm.js implementations (SHA-256)
20321
20321
  enums.hash.sha256,
20322
20322
  enums.hash.sha512,
20323
- enums.hash.sha3_256,
20324
- enums.hash.sha3_512
20323
+ ...(secretKeyPacket.version === 6 ? [enums.hash.sha3_256, enums.hash.sha3_512] : [])
20325
20324
  ], config.preferredHashAlgorithm);
20326
20325
  signatureProperties.preferredCompressionAlgorithms = createPreferredAlgos([
20327
20326
  enums.compression.uncompressed,
@@ -22400,4 +22399,4 @@ function formatObject(object, format, config) {
22400
22399
  }
22401
22400
  }
22402
22401
 
22403
- export { AEADEncryptedDataPacket, CleartextMessage, CompressedDataPacket, KDFParams, LiteralDataPacket, MarkerPacket, Message, OnePassSignaturePacket, PacketList, PaddingPacket, PrivateKey, PublicKey, PublicKeyEncryptedSessionKeyPacket, PublicKeyPacket, PublicSubkeyPacket, SecretKeyPacket, SecretSubkeyPacket, Signature, SignaturePacket, Subkey, SymEncryptedIntegrityProtectedDataPacket, SymEncryptedSessionKeyPacket, SymmetricallyEncryptedDataPacket, TrustPacket, UnparseablePacket, UserAttributePacket, UserIDPacket, armor, config, createCleartextMessage, createMessage, decrypt, decryptKey, decryptSessionKeys, encrypt, encryptKey, encryptSessionKey, enums, generateKey, generateSessionKey, readCleartextMessage, readKey, readKeys, readMessage, readPrivateKey, readPrivateKeys, readSignature, reformatKey, revokeKey, sign, unarmor, verify };
22402
+ export { AEADEncryptedDataPacket, Argon2OutOfMemoryError, Argon2S2K, CleartextMessage, CompressedDataPacket, KDFParams, LiteralDataPacket, MarkerPacket, Message, OnePassSignaturePacket, PacketList, PaddingPacket, PrivateKey, PublicKey, PublicKeyEncryptedSessionKeyPacket, PublicKeyPacket, PublicSubkeyPacket, SecretKeyPacket, SecretSubkeyPacket, Signature, SignaturePacket, Subkey, SymEncryptedIntegrityProtectedDataPacket, SymEncryptedSessionKeyPacket, SymmetricallyEncryptedDataPacket, TrustPacket, UnparseablePacket, UserAttributePacket, UserIDPacket, armor, config, createCleartextMessage, createMessage, decrypt, decryptKey, decryptSessionKeys, encrypt, encryptKey, encryptSessionKey, enums, generateKey, generateSessionKey, readCleartextMessage, readKey, readKeys, readMessage, readPrivateKey, readPrivateKeys, readSignature, reformatKey, revokeKey, sign, unarmor, verify };
@@ -1,4 +1,4 @@
1
- /*! OpenPGP.js v6.0.0-alpha.1 - 2024-03-01 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
1
+ /*! OpenPGP.js v6.0.0-alpha.1.patch.1 - 2024-03-11 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
2
2
  const t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};import{B as e}from"./interface.min.mjs";import s from"./native.interface.min.mjs";import i from"./bn.interface.min.mjs";function r(t){if(!Number.isSafeInteger(t)||t<0)throw Error("Wrong positive integer: "+t)}function n(t,...e){if(!((s=t)instanceof Uint8Array||null!=s&&"object"==typeof s&&"Uint8Array"===s.constructor.name))throw Error("Expected Uint8Array");var s;if(e.length>0&&!e.includes(t.length))throw Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function h(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(t.outputLen),r(t.blockLen)}function o(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function f(t,e){n(t);const s=e.outputLen;if(t.length<s)throw Error("digestInto() expects output buffer of length at least "+s)}const c="object"==typeof t&&"crypto"in t?t.crypto:void 0;
3
3
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function a(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}const d=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),l=(t,e)=>t<<32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw Error("Non little-endian hardware is not supported");function b(t){if("string"!=typeof t)throw Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function u(t){if("string"==typeof t&&(t=b(t)),!a(t))throw Error("expected Uint8Array, got "+typeof t);return t}function p(...t){let e=0;for(let s=0;s<t.length;s++){const i=t[s];if(!a(i))throw Error("Uint8Array expected");e+=i.length}const s=new Uint8Array(e);for(let e=0,i=0;e<t.length;e++){const r=t[e];s.set(r,i),i+=r.length}return s}class x{clone(){return this._cloneInto()}}function w(t){const e=e=>t().update(u(e)).digest(),s=t();return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=()=>t(),e}function g(t=32){if(c&&"function"==typeof c.getRandomValues)return c.getRandomValues(new Uint8Array(t));throw Error("crypto.getRandomValues must be defined")}e.setImplementation("undefined"!=typeof BigInt?s:i);class y extends x{constructor(t,e,s,i){super(),this.blockLen=t,this.outputLen=e,this.padOffset=s,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=d(this.buffer)}update(t){o(this);const{view:e,buffer:s,blockLen:i}=this,r=(t=u(t)).length;for(let n=0;n<r;){const h=Math.min(i-this.pos,r-n);if(h!==i)s.set(t.subarray(n,n+h),this.pos),this.pos+=h,n+=h,this.pos===i&&(this.process(e,0),this.pos=0);else{const e=d(t);for(;i<=r-n;n+=i)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){o(this),f(t,this),this.finished=!0;const{buffer:s,view:i,blockLen:r,isLE:n}=this;let{pos:h}=this;s[h++]=128,this.buffer.subarray(h).fill(0),this.padOffset>r-h&&(this.process(i,0),h=0);for(let t=h;t<r;t++)s[t]=0;!function(t,s,i,r){if("function"==typeof t.setBigUint64)return t.setBigUint64(s,BigInt(i.toString()),r);const n=Object.freeze(e.new(32)),h=Object.freeze(e.new(4294967295)),o=i.rightShift(n).bitwiseAnd(h).toNumber(),f=i.bitwiseAnd(h).toNumber(),c=r?4:0,a=r?0:4;t.setUint32(s+c,o,r),t.setUint32(s+a,f,r)}(i,r-8,e.new(8*this.length),n),this.process(i,0);const c=d(t),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");const l=a/4,b=this.get();if(l>b.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<l;t++)c.setUint32(4*t,b[t],n)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const s=t.slice(0,e);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:s,length:i,finished:r,destroyed:n,pos:h}=this;return t.length=i,t.pos=h,t.finished=r,t.destroyed=n,i%e&&t.buffer.set(s),t}}const L=(t,e,s)=>t&e^t&s^e&s,A=/* @__PURE__ */new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),H=/* @__PURE__ */new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),E=/* @__PURE__ */new Uint32Array(64);class B extends y{constructor(){super(64,32,8,!1),this.A=0|H[0],this.B=0|H[1],this.C=0|H[2],this.D=0|H[3],this.E=0|H[4],this.F=0|H[5],this.G=0|H[6],this.H=0|H[7]}get(){const{A:t,B:e,C:s,D:i,E:r,F:n,G:h,H:o}=this;return[t,e,s,i,r,n,h,o]}set(t,e,s,i,r,n,h,o){this.A=0|t,this.B=0|e,this.C=0|s,this.D=0|i,this.E=0|r,this.F=0|n,this.G=0|h,this.H=0|o}process(t,e){for(let s=0;s<16;s++,e+=4)E[s]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=E[t-15],s=E[t-2],i=l(e,7)^l(e,18)^e>>>3,r=l(s,17)^l(s,19)^s>>>10;E[t]=r+E[t-7]+i+E[t-16]|0}let{A:s,B:i,C:r,D:n,E:h,F:o,G:f,H:c}=this;for(let t=0;t<64;t++){const e=c+(l(h,6)^l(h,11)^l(h,25))+((a=h)&o^~a&f)+A[t]+E[t]|0,d=(l(s,2)^l(s,13)^l(s,22))+L(s,i,r)|0;c=f,f=o,o=h,h=n+e|0,n=r,r=i,i=s,s=e+d|0}var a;s=s+this.A|0,i=i+this.B|0,r=r+this.C|0,n=n+this.D|0,h=h+this.E|0,o=o+this.F|0,f=f+this.G|0,c=c+this.H|0,this.set(s,i,r,n,h,o,f,c)}roundClean(){E.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class m extends B{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const S=/* @__PURE__ */w((()=>new B)),U=/* @__PURE__ */w((()=>new m)),k=Object.freeze(e.new(2**32-1)),O=Object.freeze(e.new(32));function F(t,e=!1){return e?{h:t.bitwiseAnd(k).toNumber(),l:t.rightShift(O).bitwiseAnd(k).toNumber()}:{h:0|t.rightShift(O).bitwiseAnd(k).toNumber(),l:0|t.bitwiseAnd(k).toNumber()}}function C(t,e=!1){let s=new Uint32Array(t.length),i=new Uint32Array(t.length);for(let r=0;r<t.length;r++){const{h:n,l:h}=F(t[r],e);[s[r],i[r]]=[n,h]}return[s,i]}const D=(t,e,s)=>t<<s|e>>>32-s,G=(t,e,s)=>e<<s|t>>>32-s,j=(t,e,s)=>e<<s-32|t>>>64-s,I=(t,e,s)=>t<<s-32|e>>>64-s;const v={fromBig:F,split:C,toBig:(t,s)=>e.new(t>>>0).ileftShift(O).ibitwiseOr(e.new(s>>>0)),shrSH:(t,e,s)=>t>>>s,shrSL:(t,e,s)=>t<<32-s|e>>>s,rotrSH:(t,e,s)=>t>>>s|e<<32-s,rotrSL:(t,e,s)=>t<<32-s|e>>>s,rotrBH:(t,e,s)=>t<<64-s|e>>>s-32,rotrBL:(t,e,s)=>t>>>s-32|e<<64-s,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:D,rotlSL:G,rotlBH:j,rotlBL:I,add:function(t,e,s,i){const r=(e>>>0)+(i>>>0);return{h:t+s+(r/2**32|0)|0,l:0|r}},add3L:(t,e,s)=>(t>>>0)+(e>>>0)+(s>>>0),add3H:(t,e,s,i)=>e+s+i+(t/2**32|0)|0,add4L:(t,e,s,i)=>(t>>>0)+(e>>>0)+(s>>>0)+(i>>>0),add4H:(t,e,s,i,r)=>e+s+i+r+(t/2**32|0)|0,add5H:(t,e,s,i,r,n)=>e+s+i+r+n+(t/2**32|0)|0,add5L:(t,e,s,i,r)=>(t>>>0)+(e>>>0)+(s>>>0)+(i>>>0)+(r>>>0)},[z,N]=/* @__PURE__ */(()=>v.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((t=>e.new(t)))))(),X=/* @__PURE__ */new Uint32Array(80),_=/* @__PURE__ */new Uint32Array(80);class M extends y{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:s,Bl:i,Ch:r,Cl:n,Dh:h,Dl:o,Eh:f,El:c,Fh:a,Fl:d,Gh:l,Gl:b,Hh:u,Hl:p}=this;return[t,e,s,i,r,n,h,o,f,c,a,d,l,b,u,p]}set(t,e,s,i,r,n,h,o,f,c,a,d,l,b,u,p){this.Ah=0|t,this.Al=0|e,this.Bh=0|s,this.Bl=0|i,this.Ch=0|r,this.Cl=0|n,this.Dh=0|h,this.Dl=0|o,this.Eh=0|f,this.El=0|c,this.Fh=0|a,this.Fl=0|d,this.Gh=0|l,this.Gl=0|b,this.Hh=0|u,this.Hl=0|p}process(t,e){for(let s=0;s<16;s++,e+=4)X[s]=t.getUint32(e),_[s]=t.getUint32(e+=4);for(let t=16;t<80;t++){const e=0|X[t-15],s=0|_[t-15],i=v.rotrSH(e,s,1)^v.rotrSH(e,s,8)^v.shrSH(e,s,7),r=v.rotrSL(e,s,1)^v.rotrSL(e,s,8)^v.shrSL(e,s,7),n=0|X[t-2],h=0|_[t-2],o=v.rotrSH(n,h,19)^v.rotrBH(n,h,61)^v.shrSH(n,h,6),f=v.rotrSL(n,h,19)^v.rotrBL(n,h,61)^v.shrSL(n,h,6),c=v.add4L(r,f,_[t-7],_[t-16]),a=v.add4H(c,i,o,X[t-7],X[t-16]);X[t]=0|a,_[t]=0|c}let{Ah:s,Al:i,Bh:r,Bl:n,Ch:h,Cl:o,Dh:f,Dl:c,Eh:a,El:d,Fh:l,Fl:b,Gh:u,Gl:p,Hh:x,Hl:w}=this;for(let t=0;t<80;t++){const e=v.rotrSH(a,d,14)^v.rotrSH(a,d,18)^v.rotrBH(a,d,41),g=v.rotrSL(a,d,14)^v.rotrSL(a,d,18)^v.rotrBL(a,d,41),y=a&l^~a&u,L=d&b^~d&p,A=v.add5L(w,g,L,N[t],_[t]),H=v.add5H(A,x,e,y,z[t],X[t]),E=0|A,B=v.rotrSH(s,i,28)^v.rotrBH(s,i,34)^v.rotrBH(s,i,39),m=v.rotrSL(s,i,28)^v.rotrBL(s,i,34)^v.rotrBL(s,i,39),S=s&r^s&h^r&h,U=i&n^i&o^n&o;x=0|u,w=0|p,u=0|l,p=0|b,l=0|a,b=0|d,({h:a,l:d}=v.add(0|f,0|c,0|H,0|E)),f=0|h,c=0|o,h=0|r,o=0|n,r=0|s,n=0|i;const k=v.add3L(E,m,U);s=v.add3H(k,H,B,S),i=0|k}({h:s,l:i}=v.add(0|this.Ah,0|this.Al,0|s,0|i)),({h:r,l:n}=v.add(0|this.Bh,0|this.Bl,0|r,0|n)),({h,l:o}=v.add(0|this.Ch,0|this.Cl,0|h,0|o)),({h:f,l:c}=v.add(0|this.Dh,0|this.Dl,0|f,0|c)),({h:a,l:d}=v.add(0|this.Eh,0|this.El,0|a,0|d)),({h:l,l:b}=v.add(0|this.Fh,0|this.Fl,0|l,0|b)),({h:u,l:p}=v.add(0|this.Gh,0|this.Gl,0|u,0|p)),({h:x,l:w}=v.add(0|this.Hh,0|this.Hl,0|x,0|w)),this.set(s,i,r,n,h,o,f,c,a,d,l,b,u,p,x,w)}roundClean(){X.fill(0),_.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class V extends M{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const R=/* @__PURE__ */w((()=>new M)),T=/* @__PURE__ */w((()=>new V)),[$,W,Z]=[[],[],[]],q=/* @__PURE__ */Object.freeze(e.new(0)),J=/* @__PURE__ */Object.freeze(e.new(1)),K=/* @__PURE__ */Object.freeze(e.new(2)),P=/* @__PURE__ */Object.freeze(e.new(7)),Q=/* @__PURE__ */Object.freeze(e.new(256)),Y=/* @__PURE__ */Object.freeze(e.new(113));for(let t=0,s=J,i=1,r=0;t<24;t++){[i,r]=[r,(2*i+3*r)%5],$.push(2*(5*r+i)),W.push((t+1)*(t+2)/2%64);const n=q.clone();for(let t=0;t<7;t++)s=s.leftShift(J).ixor(s.rightShift(P).imul(Y)).imod(Q),s.bitwiseAnd(K).isZero()||n.ixor(J.leftShift(J.leftShift(/* @__PURE__ */e.new(t)).idec()));Z.push(n)}const[tt,et]=/* @__PURE__ */C(Z,!0),st=(t,e,s)=>s>32?j(t,e,s):D(t,e,s),it=(t,e,s)=>s>32?I(t,e,s):G(t,e,s);class rt extends x{constructor(t,e,s,i=!1,n=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=s,this.enableXOF=i,this.rounds=n,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r(s),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");var h;this.state=new Uint8Array(200),this.state32=(h=this.state,new Uint32Array(h.buffer,h.byteOffset,Math.floor(h.byteLength/4)))}keccak(){!function(t,e=24){const s=new Uint32Array(10);for(let i=24-e;i<24;i++){for(let e=0;e<10;e++)s[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const i=(e+8)%10,r=(e+2)%10,n=s[r],h=s[r+1],o=st(n,h,1)^s[i],f=it(n,h,1)^s[i+1];for(let s=0;s<50;s+=10)t[e+s]^=o,t[e+s+1]^=f}let e=t[2],r=t[3];for(let s=0;s<24;s++){const i=W[s],n=st(e,r,i),h=it(e,r,i),o=$[s];e=t[o],r=t[o+1],t[o]=n,t[o+1]=h}for(let e=0;e<50;e+=10){for(let i=0;i<10;i++)s[i]=t[e+i];for(let i=0;i<10;i++)t[e+i]^=~s[(i+2)%10]&s[(i+4)%10]}t[0]^=tt[i],t[1]^=et[i]}s.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){o(this);const{blockLen:e,state:s}=this,i=(t=u(t)).length;for(let r=0;r<i;){const n=Math.min(e-this.pos,i-r);for(let e=0;e<n;e++)s[this.pos++]^=t[r++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:s,blockLen:i}=this;t[s]^=e,0!=(128&e)&&s===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){o(this,!1),n(t),this.finish();const e=this.state,{blockLen:s}=this;for(let i=0,r=t.length;i<r;){this.posOut>=s&&this.keccak();const n=Math.min(s-this.posOut,r-i);t.set(e.subarray(this.posOut,this.posOut+n),i),this.posOut+=n,i+=n}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return r(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(f(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:s,outputLen:i,rounds:r,enableXOF:n}=this;return t||(t=new rt(e,s,i,n,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=s,t.outputLen=i,t.enableXOF=n,t.destroyed=this.destroyed,t}}const nt=(t,e,s)=>w((()=>new rt(e,t,s))),ht=/* @__PURE__ */nt(6,136,32),ot=/* @__PURE__ */nt(6,72,64),ft=/* @__PURE__ */((t,e,s)=>function(t){const e=(e,s)=>t(s).update(u(e)).digest(),s=t({});return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=e=>t(e),e}(((i={})=>new rt(e,t,void 0===i.dkLen?s:i.dkLen,!0))))(31,136,32);export{x as H,y as S,T as a,n as b,p as c,R as d,o as e,ft as f,U as g,h,ht as i,ot as j,g as r,S as s,u as t,b as u,w};
4
4
  //# sourceMappingURL=sha3.min.mjs.map
@@ -1,4 +1,4 @@
1
- /*! OpenPGP.js v6.0.0-alpha.1 - 2024-03-01 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
1
+ /*! OpenPGP.js v6.0.0-alpha.1.patch.1 - 2024-03-11 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
2
2
  const globalThis = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3
3
 
4
4
  import { B as BigInteger } from './interface.mjs';
@@ -1,4 +1,4 @@
1
- /*! OpenPGP.js v6.0.0-alpha.1 - 2024-03-01 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
1
+ /*! OpenPGP.js v6.0.0-alpha.1.patch.1 - 2024-03-11 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
2
2
  'use strict';
3
3
 
4
4
  const globalThis = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -1682,7 +1682,7 @@ var config = {
1682
1682
  * @memberof module:config
1683
1683
  * @property {String} versionString A version string to be included in armored messages
1684
1684
  */
1685
- versionString: 'OpenPGP.js 6.0.0-alpha.1',
1685
+ versionString: 'OpenPGP.js 6.0.0-alpha.1.patch.1',
1686
1686
  /**
1687
1687
  * @memberof module:config
1688
1688
  * @property {String} commentString A comment string to be included in armored messages
@@ -20357,8 +20357,7 @@ async function wrapKeyObject(secretKeyPacket, secretSubkeyPackets, options, conf
20357
20357
  // prefer fast asm.js implementations (SHA-256)
20358
20358
  enums.hash.sha256,
20359
20359
  enums.hash.sha512,
20360
- enums.hash.sha3_256,
20361
- enums.hash.sha3_512
20360
+ ...(secretKeyPacket.version === 6 ? [enums.hash.sha3_256, enums.hash.sha3_512] : [])
20362
20361
  ], config.preferredHashAlgorithm);
20363
20362
  signatureProperties.preferredCompressionAlgorithms = createPreferredAlgos([
20364
20363
  enums.compression.uncompressed,
@@ -33034,6 +33033,8 @@ var index = /*#__PURE__*/Object.freeze({
33034
33033
  });
33035
33034
 
33036
33035
  exports.AEADEncryptedDataPacket = AEADEncryptedDataPacket;
33036
+ exports.Argon2OutOfMemoryError = Argon2OutOfMemoryError;
33037
+ exports.Argon2S2K = Argon2S2K;
33037
33038
  exports.CleartextMessage = CleartextMessage;
33038
33039
  exports.CompressedDataPacket = CompressedDataPacket;
33039
33040
  exports.KDFParams = KDFParams;