@peculiar/certificates-viewer 4.7.1-alpha.4 → 4.7.1-alpha.5

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.
Files changed (141) hide show
  1. package/components/download.js +4 -5
  2. package/components/download.js.map +1 -1
  3. package/components/peculiar-certificate-decoder.js +1 -1
  4. package/components/peculiar-certificate-decoder.js.map +1 -1
  5. package/components/ssh-certificate-viewer.js +1 -1
  6. package/components/ssh-certificate-viewer.js.map +1 -1
  7. package/dist/cjs/{extension-DTtJlxk8.js → extension-CjXYQXbF.js} +3 -3
  8. package/dist/cjs/{extension-DTtJlxk8.js.map → extension-CjXYQXbF.js.map} +1 -1
  9. package/dist/cjs/index.cjs.js +2 -2
  10. package/dist/cjs/{miscellaneous-DCeacaAw.js → miscellaneous-7gtHz795.js} +4 -4
  11. package/dist/cjs/{miscellaneous-DCeacaAw.js.map → miscellaneous-7gtHz795.js.map} +1 -1
  12. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.cjs.js.map +1 -1
  13. package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js +6 -6
  14. package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -1
  15. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +6 -6
  16. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  17. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  18. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
  19. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -3
  20. package/dist/cjs/{pkcs10_certificate_request-DE-0eDXE.js → pkcs10_certificate_request-CIOxDu_Z.js} +3 -3
  21. package/dist/cjs/{pkcs10_certificate_request-DE-0eDXE.js.map → pkcs10_certificate_request-CIOxDu_Z.js.map} +1 -1
  22. package/dist/cjs/{ssh_certificate-D2q_p49O.js → ssh_certificate-DnXj2sM0.js} +6 -7
  23. package/dist/cjs/ssh_certificate-DnXj2sM0.js.map +1 -0
  24. package/dist/cjs/{x509_certificate-Cto1q-eu.js → x509_certificate-DPgu-mwG.js} +4 -4
  25. package/dist/cjs/{x509_certificate-Cto1q-eu.js.map → x509_certificate-DPgu-mwG.js.map} +1 -1
  26. package/dist/cjs/{x509_crl-CgixMZrh.js → x509_crl-D_DKkGcn.js} +5 -5
  27. package/dist/cjs/{x509_crl-CgixMZrh.js.map → x509_crl-D_DKkGcn.js.map} +1 -1
  28. package/dist/collection/components/certificate-decoder/certificate-decoder.js +1 -1
  29. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  30. package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js +1 -1
  31. package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js.map +1 -1
  32. package/dist/collection/crypto/ssh_certificate.js +2 -2
  33. package/dist/collection/crypto/ssh_certificate.js.map +1 -1
  34. package/dist/collection/locales/en.json +0 -1
  35. package/dist/collection/utils/download.js +2 -2
  36. package/dist/collection/utils/download.js.map +1 -1
  37. package/dist/esm/{extension-DmlhftES.js → extension-B3br1_Py.js} +3 -3
  38. package/dist/esm/{extension-DmlhftES.js.map → extension-B3br1_Py.js.map} +1 -1
  39. package/dist/esm/index.js +2 -2
  40. package/dist/esm/{miscellaneous-BTlqwN5_.js → miscellaneous-phHcBJWR.js} +4 -4
  41. package/dist/esm/{miscellaneous-BTlqwN5_.js.map → miscellaneous-phHcBJWR.js.map} +1 -1
  42. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -1
  43. package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js +6 -6
  44. package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -1
  45. package/dist/esm/peculiar-certificate-decoder.entry.js +6 -6
  46. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  47. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
  48. package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
  49. package/dist/esm/{pkcs10_certificate_request-B5C1NYFc.js → pkcs10_certificate_request-HIoLPXGQ.js} +3 -3
  50. package/dist/esm/{pkcs10_certificate_request-B5C1NYFc.js.map → pkcs10_certificate_request-HIoLPXGQ.js.map} +1 -1
  51. package/dist/esm/{ssh_certificate-PCn0WXhQ.js → ssh_certificate-rmToyzuK.js} +6 -7
  52. package/dist/esm/ssh_certificate-rmToyzuK.js.map +1 -0
  53. package/dist/esm/{x509_certificate-BiAmXJ4S.js → x509_certificate-C1VvfHQ5.js} +4 -4
  54. package/dist/{esm-es5/x509_certificate-BiAmXJ4S.js.map → esm/x509_certificate-C1VvfHQ5.js.map} +1 -1
  55. package/dist/esm/{x509_crl-CCeoLLUZ.js → x509_crl-rfnWQkGD.js} +5 -5
  56. package/dist/esm/{x509_crl-CCeoLLUZ.js.map → x509_crl-rfnWQkGD.js.map} +1 -1
  57. package/dist/esm-es5/{extension-DmlhftES.js → extension-B3br1_Py.js} +2 -2
  58. package/dist/esm-es5/{extension-DmlhftES.js.map → extension-B3br1_Py.js.map} +1 -1
  59. package/dist/esm-es5/index.js +1 -1
  60. package/dist/esm-es5/{miscellaneous-BTlqwN5_.js → miscellaneous-phHcBJWR.js} +2 -2
  61. package/dist/esm-es5/{miscellaneous-BTlqwN5_.js.map → miscellaneous-phHcBJWR.js.map} +1 -1
  62. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -1
  63. package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js +2 -2
  64. package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -1
  65. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  66. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  67. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  68. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  69. package/dist/esm-es5/{pkcs10_certificate_request-B5C1NYFc.js → pkcs10_certificate_request-HIoLPXGQ.js} +2 -2
  70. package/dist/esm-es5/{pkcs10_certificate_request-B5C1NYFc.js.map → pkcs10_certificate_request-HIoLPXGQ.js.map} +1 -1
  71. package/dist/esm-es5/{ssh_certificate-PCn0WXhQ.js → ssh_certificate-rmToyzuK.js} +4 -4
  72. package/dist/esm-es5/ssh_certificate-rmToyzuK.js.map +1 -0
  73. package/dist/esm-es5/{x509_certificate-BiAmXJ4S.js → x509_certificate-C1VvfHQ5.js} +4 -4
  74. package/dist/{esm/x509_certificate-BiAmXJ4S.js.map → esm-es5/x509_certificate-C1VvfHQ5.js.map} +1 -1
  75. package/dist/esm-es5/{x509_crl-CCeoLLUZ.js → x509_crl-rfnWQkGD.js} +2 -2
  76. package/dist/esm-es5/{x509_crl-CCeoLLUZ.js.map → x509_crl-rfnWQkGD.js.map} +1 -1
  77. package/dist/peculiar/index.esm.js +1 -1
  78. package/dist/peculiar/locales/en.json +0 -1
  79. package/dist/peculiar/{p-98219569.entry.js → p-019339d6.entry.js} +2 -2
  80. package/dist/peculiar/{p-71eab586.entry.js → p-04422929.entry.js} +2 -2
  81. package/dist/peculiar/{p-7273601a.entry.js → p-154dd0da.entry.js} +2 -2
  82. package/dist/peculiar/{p-7273601a.entry.js.map → p-154dd0da.entry.js.map} +1 -1
  83. package/dist/peculiar/{p-46c17c8d.system.entry.js → p-3685975d.system.entry.js} +2 -2
  84. package/dist/peculiar/{p-83bfd8e5.system.entry.js → p-6f0f2749.system.entry.js} +3 -3
  85. package/dist/peculiar/{p-83bfd8e5.system.entry.js.map → p-6f0f2749.system.entry.js.map} +1 -1
  86. package/dist/peculiar/{p-71cb31c6.entry.js → p-7385d0bb.entry.js} +11 -11
  87. package/dist/peculiar/{p-71cb31c6.entry.js.map → p-7385d0bb.entry.js.map} +1 -1
  88. package/dist/peculiar/{p-cc01a2da.system.entry.js → p-872f7312.system.entry.js} +18 -18
  89. package/dist/peculiar/{p-cc01a2da.system.entry.js.map → p-872f7312.system.entry.js.map} +1 -1
  90. package/dist/peculiar/{p-h7XP7otl.js → p-B1eGYq5U.js} +3 -3
  91. package/dist/peculiar/{p-h7XP7otl.js.map → p-B1eGYq5U.js.map} +1 -1
  92. package/dist/peculiar/{p-dOkqMp-O.system.js → p-B2GW-g6v.system.js} +2 -2
  93. package/dist/peculiar/p-B2GW-g6v.system.js.map +1 -0
  94. package/dist/peculiar/{p-DnOLjFJP.js → p-B8_0p5ke.js} +5 -5
  95. package/dist/peculiar/{p-DnOLjFJP.js.map → p-B8_0p5ke.js.map} +1 -1
  96. package/dist/peculiar/p-BGASC3UX.system.js +1 -1
  97. package/dist/peculiar/{p-CSz5liuX.system.js.map → p-BdfvItQB.system.js.map} +1 -1
  98. package/dist/peculiar/p-BtqN4pgo.js +12 -0
  99. package/dist/peculiar/{p-BwlcJAh0.js.map → p-BtqN4pgo.js.map} +1 -1
  100. package/dist/peculiar/{p-DPbpwYQ8.system.js → p-CTksa0ml.system.js} +3 -3
  101. package/dist/peculiar/{p-DPbpwYQ8.system.js.map → p-CTksa0ml.system.js.map} +1 -1
  102. package/dist/peculiar/{p-Db41gPxb.js → p-CYFfXlCT.js} +4 -4
  103. package/dist/peculiar/{p-Db41gPxb.js.map → p-CYFfXlCT.js.map} +1 -1
  104. package/dist/peculiar/{p-CstRxc9v.js → p-CkePJXWQ.js} +4 -4
  105. package/dist/peculiar/{p-CstRxc9v.js.map → p-CkePJXWQ.js.map} +1 -1
  106. package/dist/peculiar/{p-9MJeDspO.system.js.map → p-CuX3t1Hg.system.js.map} +1 -1
  107. package/dist/peculiar/{p-B82-c-xr.system.js.map → p-Cv-b9S6H.system.js.map} +1 -1
  108. package/dist/peculiar/{p-AjXipXSl.system.js → p-D0w6miI2.system.js} +3 -3
  109. package/dist/peculiar/{p-AjXipXSl.system.js.map → p-D0w6miI2.system.js.map} +1 -1
  110. package/dist/peculiar/{p-BHpSDBz_.system.js.map → p-DOFJd-ye.system.js.map} +1 -1
  111. package/dist/peculiar/{p-SjVQtfgD.system.js → p-DkshB-5z.system.js} +4 -4
  112. package/dist/peculiar/{p-SjVQtfgD.system.js.map → p-DkshB-5z.system.js.map} +1 -1
  113. package/dist/peculiar/{p-B5GO6_Ut.system.js → p-DorRvFf7.system.js} +18 -18
  114. package/dist/peculiar/{p-B5GO6_Ut.system.js.map → p-DorRvFf7.system.js.map} +1 -1
  115. package/dist/peculiar/{p-B2FH4Pv2.system.js → p-ZxTK29QB.system.js} +4 -4
  116. package/dist/peculiar/{p-B2FH4Pv2.system.js.map → p-ZxTK29QB.system.js.map} +1 -1
  117. package/dist/peculiar/{p-24861cf6.system.entry.js → p-a4454e2d.system.entry.js} +2 -2
  118. package/dist/peculiar/{p-DMDALRLP.system.js → p-kq9wAWxW.system.js} +4 -4
  119. package/dist/peculiar/p-kq9wAWxW.system.js.map +1 -0
  120. package/dist/peculiar/{p-PCn0WXhQ.js → p-rmToyzuK.js} +4 -4
  121. package/dist/peculiar/p-rmToyzuK.js.map +1 -0
  122. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.esm.js.map +1 -1
  123. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  124. package/dist/peculiar/peculiar.esm.js +1 -1
  125. package/dist/types/crypto/ssh_certificate.d.ts +1 -1
  126. package/dist/types/utils/download.d.ts +1 -1
  127. package/dist/types/utils/l10n.d.ts +0 -1
  128. package/hydrate/index.js +6 -7
  129. package/hydrate/index.mjs +6 -7
  130. package/package.json +2 -2
  131. package/dist/cjs/ssh_certificate-D2q_p49O.js.map +0 -1
  132. package/dist/esm/ssh_certificate-PCn0WXhQ.js.map +0 -1
  133. package/dist/esm-es5/ssh_certificate-PCn0WXhQ.js.map +0 -1
  134. package/dist/peculiar/p-BwlcJAh0.js +0 -12
  135. package/dist/peculiar/p-DMDALRLP.system.js.map +0 -1
  136. package/dist/peculiar/p-PCn0WXhQ.js.map +0 -1
  137. package/dist/peculiar/p-dOkqMp-O.system.js.map +0 -1
  138. /package/dist/peculiar/{p-98219569.entry.js.map → p-019339d6.entry.js.map} +0 -0
  139. /package/dist/peculiar/{p-71eab586.entry.js.map → p-04422929.entry.js.map} +0 -0
  140. /package/dist/peculiar/{p-46c17c8d.system.entry.js.map → p-3685975d.system.entry.js.map} +0 -0
  141. /package/dist/peculiar/{p-24861cf6.system.entry.js.map → p-a4454e2d.system.entry.js.map} +0 -0
@@ -39,7 +39,7 @@ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setP
39
39
  *
40
40
  * This source code is licensed under the MIT license found in the
41
41
  * LICENSE file in the root directory of this source tree.
42
- */var Download=function(){function e(){}return e}();Download.cert={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"cer","application/pkix-cert")},asDER:function(e,t){downloadFromBuffer(e,t,"cer","application/pkix-cert")}};Download.attrCert={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"cer","application/pkix-attr-cert")},asDER:function(e,t){downloadFromBuffer(e,t,"cer","application/pkix-attr-cert")}};Download.csr={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"csr","application/pkcs10")},asDER:function(e,t){downloadFromBuffer(e,t,"csr","application/pkcs10")}};Download.crl={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"crl","application/pkix-crl")},asDER:function(e,t){downloadFromBuffer(e,t,"crl","application/pkix-crl")}};Download.certSSH={asSSH:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"cert","application/ssh-cert")}};
42
+ */var Download=function(){function e(){}return e}();Download.cert={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"cer","application/pkix-cert")},asDER:function(e,t){downloadFromBuffer(e,t,"cer","application/pkix-cert")}};Download.attrCert={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"cer","application/pkix-attr-cert")},asDER:function(e,t){downloadFromBuffer(e,t,"cer","application/pkix-attr-cert")}};Download.csr={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"csr","application/pkcs10")},asDER:function(e,t){downloadFromBuffer(e,t,"csr","application/pkcs10")}};Download.crl={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"crl","application/pkix-crl")},asDER:function(e,t){downloadFromBuffer(e,t,"crl","application/pkix-crl")}};Download.certSSH={asPub:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"pub","text/plain")}};
43
43
  /*!
44
44
  Copyright (c) Peculiar Ventures, LLC
45
45
  */function utilFromBase(e,t){var r=0;if(e.length===1){return e[0]}for(var i=e.length-1;i>=0;i--){r+=e[e.length-1-i]*Math.pow(2,t*i)}return r}function utilToBase(e,t,r){if(r===void 0){r=-1}var i=r;var n=e;var o=0;var a=Math.pow(2,t);for(var s=1;s<8;s++){if(e<a){var c=void 0;if(i<0){c=new ArrayBuffer(s);o=s}else{if(i<s){return new ArrayBuffer(0)}c=new ArrayBuffer(i);o=i}var u=new Uint8Array(c);for(var p=s-1;p>=0;p--){var f=Math.pow(2,p*t);u[o-p-1]=Math.floor(n/f);n-=u[o-p-1]*f}return c}a*=Math.pow(2,t)}return new ArrayBuffer(0)}function utilConcatView(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r=0;var i=0;for(var n=0,o=e;n<o.length;n++){var a=o[n];r+=a.length}var s=new ArrayBuffer(r);var c=new Uint8Array(s);for(var u=0,p=e;u<p.length;u++){var a=p[u];c.set(a,i);i+=a.length}return c}function utilDecodeTC(){var e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){var t=e[0]===255&&e[1]&128;var r=e[0]===0&&(e[1]&128)===0;if(t||r){this.warnings.push("Needlessly long format")}}var i=new ArrayBuffer(this.valueHex.byteLength);var n=new Uint8Array(i);for(var o=0;o<this.valueHex.byteLength;o++){n[o]=0}n[0]=e[0]&128;var a=utilFromBase(n,8);var s=new ArrayBuffer(this.valueHex.byteLength);var c=new Uint8Array(s);for(var u=0;u<this.valueHex.byteLength;u++){c[u]=e[u]}c[0]&=127;var p=utilFromBase(c,8);return p-a}function utilEncodeTC(e){var t=e<0?e*-1:e;var r=128;for(var i=1;i<8;i++){if(t<=r){if(e<0){var n=r-t;var o=utilToBase(n,8,i);var a=new Uint8Array(o);a[0]|=128;return o}var s=utilToBase(t,8,i);var c=new Uint8Array(s);if(c[0]&128){var u=s.slice(0);var p=new Uint8Array(u);s=new ArrayBuffer(s.byteLength+1);c=new Uint8Array(s);for(var f=0;f<u.byteLength;f++){c[f+1]=p[f]}c[0]=0}return s}r*=Math.pow(2,8)}return new ArrayBuffer(0)}function isEqualBuffer(e,t){if(e.byteLength!==t.byteLength){return false}var r=new Uint8Array(e);var i=new Uint8Array(t);for(var n=0;n<r.length;n++){if(r[n]!==i[n]){return false}}return true}function padNumber(e,t){var r=e.toString(10);if(t<r.length){return""}var i=t-r.length;var n=new Array(i);for(var o=0;o<i;o++){n[o]="0"}var a=n.join("");return a.concat(r)}
@@ -82,7 +82,7 @@ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setP
82
82
  *
83
83
  * This source code is licensed under the MIT license found in the
84
84
  * LICENSE file in the root directory of this source tree.
85
- */dayjs.extend(relativeTime);var dateShort=function(e){return new Date(e).toUTCString()};var dateDiff=function(e,t){if(!e||!t){return""}var r=dayjs(e);var i=dayjs(t);return r.to(i,true)};var basicInformation="Basic Information";var subjectName="Subject Name";var issuerName="Issuer Name";var publicKeyInfo="Public Key Info";var signature="Signature";var extensions="Extensions";var miscellaneous="Miscellaneous";var download="Download";var serialNumber="Serial Number";var version="Version";var validity="Validity";var issued="Issued";var expired="Expired";var lastUpdate="Last Update";var nextUpdate="Next Update";var algorithm="Algorithm";var namedCurve="Named Curve";var exponent="Exponent";var modulus="Modulus";var value="Value";var valid="Valid";var revoked="Revoked";var issuer="Issuer";var name="Name";var publicKey="Public Key";var fingerprint="Fingerprint";var fingerprints="Fingerprints";var testURLs="Test URLs";var certificateDetails="Certificate Details";var holder="Holder";var digestInfo="Digest Info";var type="Type";var revokedCertificates="Revoked Certificates";var revocationDate="Revocation Date";var yes="Yes";var no="No";var onlyUserCertificates="Only User Certificates";var onlyAttributeCertificates="Only Attribute Certificates";var onlyCACertificates="Only CA Certificates";var indirectCRL="Indirect CRL";var onlyReasons="Only Reasons";var crlEntryExtensions="CRL Entry Extensions";var previewCertificate="Preview certificate";var viewDetails="View details";var downloadOptions="Download options";var keyId="Key ID";var principals="Principals";var criticalOptions="Critical Options";var signingCA="Signing CA";var en={basicInformation:basicInformation,subjectName:subjectName,issuerName:issuerName,publicKeyInfo:publicKeyInfo,signature:signature,extensions:extensions,miscellaneous:miscellaneous,download:download,"download.pem":"Download PEM","download.der":"Download DER","download.ssh":"Download SSH",serialNumber:serialNumber,version:version,validity:validity,issued:issued,expired:expired,lastUpdate:lastUpdate,nextUpdate:nextUpdate,algorithm:algorithm,namedCurve:namedCurve,exponent:exponent,modulus:modulus,value:value,valid:valid,revoked:revoked,issuer:issuer,name:name,publicKey:publicKey,fingerprint:fingerprint,fingerprints:fingerprints,testURLs:testURLs,certificateDetails:certificateDetails,holder:holder,digestInfo:digestInfo,type:type,revokedCertificates:revokedCertificates,revocationDate:revocationDate,yes:yes,no:no,onlyUserCertificates:onlyUserCertificates,onlyAttributeCertificates:onlyAttributeCertificates,onlyCACertificates:onlyCACertificates,indirectCRL:indirectCRL,onlyReasons:onlyReasons,crlEntryExtensions:crlEntryExtensions,previewCertificate:previewCertificate,viewDetails:viewDetails,downloadOptions:downloadOptions,keyId:keyId,principals:principals,criticalOptions:criticalOptions,signingCA:signingCA};
85
+ */dayjs.extend(relativeTime);var dateShort=function(e){return new Date(e).toUTCString()};var dateDiff=function(e,t){if(!e||!t){return""}var r=dayjs(e);var i=dayjs(t);return r.to(i,true)};var basicInformation="Basic Information";var subjectName="Subject Name";var issuerName="Issuer Name";var publicKeyInfo="Public Key Info";var signature="Signature";var extensions="Extensions";var miscellaneous="Miscellaneous";var download="Download";var serialNumber="Serial Number";var version="Version";var validity="Validity";var issued="Issued";var expired="Expired";var lastUpdate="Last Update";var nextUpdate="Next Update";var algorithm="Algorithm";var namedCurve="Named Curve";var exponent="Exponent";var modulus="Modulus";var value="Value";var valid="Valid";var revoked="Revoked";var issuer="Issuer";var name="Name";var publicKey="Public Key";var fingerprint="Fingerprint";var fingerprints="Fingerprints";var testURLs="Test URLs";var certificateDetails="Certificate Details";var holder="Holder";var digestInfo="Digest Info";var type="Type";var revokedCertificates="Revoked Certificates";var revocationDate="Revocation Date";var yes="Yes";var no="No";var onlyUserCertificates="Only User Certificates";var onlyAttributeCertificates="Only Attribute Certificates";var onlyCACertificates="Only CA Certificates";var indirectCRL="Indirect CRL";var onlyReasons="Only Reasons";var crlEntryExtensions="CRL Entry Extensions";var previewCertificate="Preview certificate";var viewDetails="View details";var downloadOptions="Download options";var keyId="Key ID";var principals="Principals";var criticalOptions="Critical Options";var signingCA="Signing CA";var en={basicInformation:basicInformation,subjectName:subjectName,issuerName:issuerName,publicKeyInfo:publicKeyInfo,signature:signature,extensions:extensions,miscellaneous:miscellaneous,download:download,"download.pem":"Download PEM","download.der":"Download DER",serialNumber:serialNumber,version:version,validity:validity,issued:issued,expired:expired,lastUpdate:lastUpdate,nextUpdate:nextUpdate,algorithm:algorithm,namedCurve:namedCurve,exponent:exponent,modulus:modulus,value:value,valid:valid,revoked:revoked,issuer:issuer,name:name,publicKey:publicKey,fingerprint:fingerprint,fingerprints:fingerprints,testURLs:testURLs,certificateDetails:certificateDetails,holder:holder,digestInfo:digestInfo,type:type,revokedCertificates:revokedCertificates,revocationDate:revocationDate,yes:yes,no:no,onlyUserCertificates:onlyUserCertificates,onlyAttributeCertificates:onlyAttributeCertificates,onlyCACertificates:onlyCACertificates,indirectCRL:indirectCRL,onlyReasons:onlyReasons,crlEntryExtensions:crlEntryExtensions,previewCertificate:previewCertificate,viewDetails:viewDetails,downloadOptions:downloadOptions,keyId:keyId,principals:principals,criticalOptions:criticalOptions,signingCA:signingCA};
86
86
  /**
87
87
  * @license
88
88
  * Copyright (c) Peculiar Ventures, LLC.
@@ -131,5 +131,5 @@ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setP
131
131
  *
132
132
  * This source code is licensed under the MIT license found in the
133
133
  * LICENSE file in the root directory of this source tree.
134
- */var certificateRawToBuffer=function(e){if(PemConverter.isPem(e)){return PemConverter.decode(e)[0]}if(buildExports.Convert.isHex(e)){return buildExports.Convert.FromHex(e)}if(buildExports.Convert.isBase64(e)){return buildExports.Convert.FromBase64(e)}if(buildExports.Convert.isBase64Url(e)){return buildExports.Convert.FromBase64Url(e)}return buildExports.Convert.FromBinary(e)};var getCertificateThumbprint=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(i){r=cryptoProvider.get();if(r.subtle){return[2,r.subtle.digest(e,t)]}return[2,undefined]}))}))};var ACClearAttrs=function(){function e(e){if(e===void 0){e={}}this.acIssuer=new GeneralName;this.acSerial=0;this.attrs=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],ACClearAttrs.prototype,"acIssuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ACClearAttrs.prototype,"acSerial",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],ACClearAttrs.prototype,"attrs",void 0);var AttrSpec_1;var AttrSpec=AttrSpec_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AttrSpec_1.prototype);return r}return t}(AsnArray);AttrSpec=AttrSpec_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.ObjectIdentifier})],AttrSpec);var AAControls=function(){function e(e){if(e===void 0){e={}}this.permitUnSpecified=true;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],AAControls.prototype,"pathLenConstraint",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:0,optional:true})],AAControls.prototype,"permittedAttrs",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:1,optional:true})],AAControls.prototype,"excludedAttrs",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:true})],AAControls.prototype,"permitUnSpecified",void 0);var IssuerSerial=function(){function e(e){if(e===void 0){e={}}this.issuer=new GeneralNames;this.serial=new ArrayBuffer(0);this.issuerUID=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames})],IssuerSerial.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerSerial.prototype,"serial",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],IssuerSerial.prototype,"issuerUID",void 0);var DigestedObjectType;(function(e){e[e["publicKey"]=0]="publicKey";e[e["publicKeyCert"]=1]="publicKeyCert";e[e["otherObjectTypes"]=2]="otherObjectTypes"})(DigestedObjectType||(DigestedObjectType={}));var ObjectDigestInfo=function(){function e(e){if(e===void 0){e={}}this.digestedObjectType=DigestedObjectType.publicKey;this.digestAlgorithm=new AlgorithmIdentifier;this.objectDigest=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],ObjectDigestInfo.prototype,"digestedObjectType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,optional:true})],ObjectDigestInfo.prototype,"otherObjectTypeID",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],ObjectDigestInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],ObjectDigestInfo.prototype,"objectDigest",void 0);var V2Form=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,optional:true})],V2Form.prototype,"issuerName",void 0);__decorate$1([AsnProp({type:IssuerSerial,context:0,implicit:true,optional:true})],V2Form.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,context:1,implicit:true,optional:true})],V2Form.prototype,"objectDigestInfo",void 0);var AttCertIssuer=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,repeated:"sequence"})],AttCertIssuer.prototype,"v1Form",void 0);__decorate$1([AsnProp({type:V2Form,context:0,implicit:true})],AttCertIssuer.prototype,"v2Form",void 0);AttCertIssuer=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AttCertIssuer);var AttCertValidityPeriod=function(){function e(e){if(e===void 0){e={}}this.notBeforeTime=new Date;this.notAfterTime=new Date;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notBeforeTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notAfterTime",void 0);var Holder=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial,implicit:true,context:0,optional:true})],Holder.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:1,optional:true})],Holder.prototype,"entityName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,implicit:true,context:2,optional:true})],Holder.prototype,"objectDigestInfo",void 0);var AttCertVersion;(function(e){e[e["v2"]=1]="v2"})(AttCertVersion||(AttCertVersion={}));var AttributeCertificateInfo=function(){function e(e){if(e===void 0){e={}}this.version=AttCertVersion.v2;this.holder=new Holder;this.issuer=new AttCertIssuer;this.signature=new AlgorithmIdentifier;this.serialNumber=new ArrayBuffer(0);this.attrCertValidityPeriod=new AttCertValidityPeriod;this.attributes=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],AttributeCertificateInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Holder})],AttributeCertificateInfo.prototype,"holder",void 0);__decorate$1([AsnProp({type:AttCertIssuer})],AttributeCertificateInfo.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificateInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],AttributeCertificateInfo.prototype,"serialNumber",void 0);__decorate$1([AsnProp({type:AttCertValidityPeriod})],AttributeCertificateInfo.prototype,"attrCertValidityPeriod",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],AttributeCertificateInfo.prototype,"attributes",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],AttributeCertificateInfo.prototype,"issuerUniqueID",void 0);__decorate$1([AsnProp({type:Extensions,optional:true})],AttributeCertificateInfo.prototype,"extensions",void 0);var AttributeCertificate=function(){function e(e){if(e===void 0){e={}}this.acinfo=new AttributeCertificateInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signatureValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AttributeCertificateInfo})],AttributeCertificate.prototype,"acinfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificate.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],AttributeCertificate.prototype,"signatureValue",void 0);var ClassListFlags;(function(e){e[e["unmarked"]=1]="unmarked";e[e["unclassified"]=2]="unclassified";e[e["restricted"]=4]="restricted";e[e["confidential"]=8]="confidential";e[e["secret"]=16]="secret";e[e["topSecret"]=32]="topSecret"})(ClassListFlags||(ClassListFlags={}));var ClassList=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(BitString);var SecurityCategory=function(){function e(e){if(e===void 0){e={}}this.type="";this.value=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,implicit:true,context:0})],SecurityCategory.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,implicit:true,context:1})],SecurityCategory.prototype,"value",void 0);var Clearance=function(){function e(e){if(e===void 0){e={}}this.policyId="";this.classList=new ClassList(ClassListFlags.unclassified);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Clearance.prototype,"policyId",void 0);__decorate$1([AsnProp({type:ClassList,defaultValue:new ClassList(ClassListFlags.unclassified)})],Clearance.prototype,"classList",void 0);__decorate$1([AsnProp({type:SecurityCategory,repeated:"set"})],Clearance.prototype,"securityCategories",void 0);var IetfAttrSyntaxValueChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],IetfAttrSyntaxValueChoices.prototype,"cotets",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],IetfAttrSyntaxValueChoices.prototype,"oid",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],IetfAttrSyntaxValueChoices.prototype,"string",void 0);var IetfAttrSyntax=function(){function e(e){if(e===void 0){e={}}this.values=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],IetfAttrSyntax.prototype,"policyAuthority",void 0);__decorate$1([AsnProp({type:IetfAttrSyntaxValueChoices,repeated:"sequence"})],IetfAttrSyntax.prototype,"values",void 0);var Targets_1;var TargetCert=function(){function e(e){if(e===void 0){e={}}this.targetCertificate=new IssuerSerial;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial})],TargetCert.prototype,"targetCertificate",void 0);__decorate$1([AsnProp({type:GeneralName,optional:true})],TargetCert.prototype,"targetName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,optional:true})],TargetCert.prototype,"certDigestInfo",void 0);var Target=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0,implicit:true})],Target.prototype,"targetName",void 0);__decorate$1([AsnProp({type:GeneralName,context:1,implicit:true})],Target.prototype,"targetGroup",void 0);__decorate$1([AsnProp({type:TargetCert,context:2,implicit:true})],Target.prototype,"targetCert",void 0);Target=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Target);var Targets=Targets_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Targets_1.prototype);return r}return t}(AsnArray);Targets=Targets_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Target})],Targets);var ProxyInfo_1;var ProxyInfo=ProxyInfo_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ProxyInfo_1.prototype);return r}return t}(AsnArray);ProxyInfo=ProxyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Targets})],ProxyInfo);var RoleSyntax=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],RoleSyntax.prototype,"roleAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,implicit:true,context:1})],RoleSyntax.prototype,"roleName",void 0);var SvceAuthInfo=function(){function e(e){if(e===void 0){e={}}this.service=new GeneralName;this.ident=new GeneralName;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"service",void 0);__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"ident",void 0);__decorate$1([AsnProp({type:OctetString,optional:true})],SvceAuthInfo.prototype,"authInfo",void 0);var id_ntQWAC="0.4.0.9496";var id_ActivityDescription="".concat(id_ntQWAC,".6");var ActivityDescription=function(){function e(e){if(e===void 0){e={}}this.codeAuthority=new GeneralName;this.codeId=new GeneralName;this.shortName="";this.shortDescription="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],ActivityDescription.prototype,"codeAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],ActivityDescription.prototype,"codeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:2})],ActivityDescription.prototype,"shortName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:3})],ActivityDescription.prototype,"shortDescription",void 0);ActivityDescription=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ActivityDescription);var DomainName=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(Name$1);DomainName=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainName);var id_DomainNameBeneficiary="".concat(id_ntQWAC,".1");var DomainNameBeneficiary=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameBeneficiary=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameBeneficiary);var id_DomainNameLegalRepresentative="".concat(id_ntQWAC,".2");var DomainNameLegalRepresentative=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameLegalRepresentative=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameLegalRepresentative);var id_DomainNameOwner="".concat(id_ntQWAC,".3");var DomainNameOwner=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameOwner=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameOwner);var id_DomainNameTechnicalOperator="".concat(id_ntQWAC,".4");var DomainNameTechnicalOperator=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameTechnicalOperator=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameTechnicalOperator);var id_InsuranceValue="".concat(id_ntQWAC,".8");var InsuranceValue=function(){function e(e){if(e===void 0){e={}}this.location="";this.base=0;this.degree=0;Object.assign(this,e)}e.prototype.toString=function(){return"".concat(this.base," x 10^").concat(this.degree," ").concat(this.location)};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],InsuranceValue.prototype,"location",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"degree",void 0);InsuranceValue=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],InsuranceValue);var id_ValuationRanking="".concat(id_ntQWAC,".9");var ValuationRanking=function(){function e(e){if(e===void 0){e={}}this.stars5=0;this.stars4=0;this.stars3=0;this.stars2=0;this.stars1=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars5",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars4",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars3",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars1",void 0);ValuationRanking=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ValuationRanking);var id_TypeRelationship="".concat(id_ntQWAC,".5");var TypeRelationship=function(){function e(e){if(e===void 0){e={}}this.DNBvsDNO=new BitString(0);this.DNBvsDNT=new BitString(0);this.DNOvsDNT=new BitString(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:BitString,context:0})],TypeRelationship.prototype,"DNBvsDNO",void 0);__decorate$1([AsnProp({type:BitString,context:1})],TypeRelationship.prototype,"DNBvsDNT",void 0);__decorate$1([AsnProp({type:BitString,context:2})],TypeRelationship.prototype,"DNOvsDNT",void 0);TypeRelationship=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],TypeRelationship);var id_WebGDPR="".concat(id_ntQWAC,".7");var WebGDPR=function(){function e(e){if(e===void 0){e={}}this.assessmentAuthority=new GeneralName;this.assessmentRef=new GeneralName;this.assessmentLocation=new GeneralName;this.dataStorageTerritory="";this.description="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],WebGDPR.prototype,"assessmentAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],WebGDPR.prototype,"assessmentRef",void 0);__decorate$1([AsnProp({type:GeneralName,context:2})],WebGDPR.prototype,"assessmentLocation",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString,context:3})],WebGDPR.prototype,"dataStorageTerritory",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:4})],WebGDPR.prototype,"description",void 0);WebGDPR=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],WebGDPR);var IssuerAndSerialNumber=function(){function e(e){if(e===void 0){e={}}this.issuer=new Name$1;this.serialNumber=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Name$1})],IssuerAndSerialNumber.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerAndSerialNumber.prototype,"serialNumber",void 0);var SignerIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],SignerIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],SignerIdentifier.prototype,"issuerAndSerialNumber",void 0);SignerIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SignerIdentifier);var CMSVersion;(function(e){e[e["v0"]=0]="v0";e[e["v1"]=1]="v1";e[e["v2"]=2]="v2";e[e["v3"]=3]="v3";e[e["v4"]=4]="v4";e[e["v5"]=5]="v5"})(CMSVersion||(CMSVersion={}));var DigestAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);DigestAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DigestAlgorithmIdentifier);var SignatureAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SignatureAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SignatureAlgorithmIdentifier);var KeyEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyEncryptionAlgorithmIdentifier);var ContentEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);ContentEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ContentEncryptionAlgorithmIdentifier);var MessageAuthenticationCodeAlgorithm=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);MessageAuthenticationCodeAlgorithm=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],MessageAuthenticationCodeAlgorithm);var KeyDerivationAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyDerivationAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyDerivationAlgorithmIdentifier);var Attribute=function(){function e(e){if(e===void 0){e={}}this.attrType="";this.attrValues=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Attribute.prototype,"attrType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],Attribute.prototype,"attrValues",void 0);var SignerInfos_1;var SignerInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.sid=new SignerIdentifier;this.digestAlgorithm=new DigestAlgorithmIdentifier;this.signatureAlgorithm=new SignatureAlgorithmIdentifier;this.signature=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignerInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:SignerIdentifier})],SignerInfo.prototype,"sid",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifier})],SignerInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:0,implicit:true,optional:true})],SignerInfo.prototype,"signedAttrs",void 0);__decorate$1([AsnProp({type:SignatureAlgorithmIdentifier})],SignerInfo.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],SignerInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:1,implicit:true,optional:true})],SignerInfo.prototype,"unsignedAttrs",void 0);var SignerInfos=SignerInfos_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SignerInfos_1.prototype);return r}return t}(AsnArray);SignerInfos=SignerInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:SignerInfo})],SignerInfos);var SigningTime$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime$1=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime$1);var CounterSignature$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature$1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature$1);var CertificateSet_1;var OtherCertificateFormat=function(){function e(e){if(e===void 0){e={}}this.otherCertFormat="";this.otherCert=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherCertificateFormat.prototype,"otherCertFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherCertificateFormat.prototype,"otherCert",void 0);var CertificateChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Certificate})],CertificateChoices.prototype,"certificate",void 0);__decorate$1([AsnProp({type:AttributeCertificate,context:2,implicit:true})],CertificateChoices.prototype,"v2AttrCert",void 0);__decorate$1([AsnProp({type:OtherCertificateFormat,context:3,implicit:true})],CertificateChoices.prototype,"other",void 0);CertificateChoices=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CertificateChoices);var CertificateSet=CertificateSet_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CertificateSet_1.prototype);return r}return t}(AsnArray);CertificateSet=CertificateSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:CertificateChoices})],CertificateSet);var ContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.content=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],ContentInfo.prototype,"content",void 0);var EncapsulatedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],EncapsulatedContent.prototype,"single",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],EncapsulatedContent.prototype,"any",void 0);EncapsulatedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncapsulatedContent);var EncapsulatedContentInfo=function(){function e(e){if(e===void 0){e={}}this.eContentType="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncapsulatedContentInfo.prototype,"eContentType",void 0);__decorate$1([AsnProp({type:EncapsulatedContent,context:0,optional:true})],EncapsulatedContentInfo.prototype,"eContent",void 0);var EncryptedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString,context:0,implicit:true,optional:true})],EncryptedContent.prototype,"value",void 0);__decorate$1([AsnProp({type:OctetString,converter:AsnConstructedOctetStringConverter,context:0,implicit:true,optional:true,repeated:"sequence"})],EncryptedContent.prototype,"constructedValue",void 0);EncryptedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncryptedContent);var EncryptedContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.contentEncryptionAlgorithm=new ContentEncryptionAlgorithmIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncryptedContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:ContentEncryptionAlgorithmIdentifier})],EncryptedContentInfo.prototype,"contentEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:EncryptedContent,optional:true})],EncryptedContentInfo.prototype,"encryptedContent",void 0);var OtherKeyAttribute=function(){function e(e){if(e===void 0){e={}}this.keyAttrId="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherKeyAttribute.prototype,"keyAttrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],OtherKeyAttribute.prototype,"keyAttr",void 0);var RecipientEncryptedKeys_1;var RecipientKeyIdentifier=function(){function e(e){if(e===void 0){e={}}this.subjectKeyIdentifier=new SubjectKeyIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier})],RecipientKeyIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],RecipientKeyIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],RecipientKeyIdentifier.prototype,"other",void 0);var KeyAgreeRecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:RecipientKeyIdentifier,context:0,implicit:true,optional:true})],KeyAgreeRecipientIdentifier.prototype,"rKeyId",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],KeyAgreeRecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);KeyAgreeRecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],KeyAgreeRecipientIdentifier);var RecipientEncryptedKey=function(){function e(e){if(e===void 0){e={}}this.rid=new KeyAgreeRecipientIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyAgreeRecipientIdentifier})],RecipientEncryptedKey.prototype,"rid",void 0);__decorate$1([AsnProp({type:OctetString})],RecipientEncryptedKey.prototype,"encryptedKey",void 0);var RecipientEncryptedKeys=RecipientEncryptedKeys_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RecipientEncryptedKeys_1.prototype);return r}return t}(AsnArray);RecipientEncryptedKeys=RecipientEncryptedKeys_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:RecipientEncryptedKey})],RecipientEncryptedKeys);var OriginatorPublicKey=function(){function e(e){if(e===void 0){e={}}this.algorithm=new AlgorithmIdentifier;this.publicKey=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],OriginatorPublicKey.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],OriginatorPublicKey.prototype,"publicKey",void 0);var OriginatorIdentifierOrKey=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:OriginatorPublicKey,context:1,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"originatorKey",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],OriginatorIdentifierOrKey.prototype,"issuerAndSerialNumber",void 0);OriginatorIdentifierOrKey=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],OriginatorIdentifierOrKey);var KeyAgreeRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v3;this.originator=new OriginatorIdentifierOrKey;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.recipientEncryptedKeys=new RecipientEncryptedKeys;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyAgreeRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorIdentifierOrKey,context:0})],KeyAgreeRecipientInfo.prototype,"originator",void 0);__decorate$1([AsnProp({type:OctetString,context:1,optional:true})],KeyAgreeRecipientInfo.prototype,"ukm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyAgreeRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:RecipientEncryptedKeys})],KeyAgreeRecipientInfo.prototype,"recipientEncryptedKeys",void 0);var RecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],RecipientIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],RecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);RecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientIdentifier);var KeyTransRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.rid=new RecipientIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyTransRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:RecipientIdentifier})],KeyTransRecipientInfo.prototype,"rid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyTransRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KeyTransRecipientInfo.prototype,"encryptedKey",void 0);var KEKIdentifier=function(){function e(e){if(e===void 0){e={}}this.keyIdentifier=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],KEKIdentifier.prototype,"keyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],KEKIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],KEKIdentifier.prototype,"other",void 0);var KEKRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v4;this.kekid=new KEKIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KEKRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KEKIdentifier})],KEKRecipientInfo.prototype,"kekid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KEKRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KEKRecipientInfo.prototype,"encryptedKey",void 0);var PasswordRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PasswordRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KeyDerivationAlgorithmIdentifier,context:0,optional:true})],PasswordRecipientInfo.prototype,"keyDerivationAlgorithm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],PasswordRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],PasswordRecipientInfo.prototype,"encryptedKey",void 0);var OtherRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.oriType="";this.oriValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRecipientInfo.prototype,"oriType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRecipientInfo.prototype,"oriValue",void 0);var RecipientInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyTransRecipientInfo,optional:true})],RecipientInfo.prototype,"ktri",void 0);__decorate$1([AsnProp({type:KeyAgreeRecipientInfo,context:1,implicit:true,optional:true})],RecipientInfo.prototype,"kari",void 0);__decorate$1([AsnProp({type:KEKRecipientInfo,context:2,implicit:true,optional:true})],RecipientInfo.prototype,"kekri",void 0);__decorate$1([AsnProp({type:PasswordRecipientInfo,context:3,implicit:true,optional:true})],RecipientInfo.prototype,"pwri",void 0);__decorate$1([AsnProp({type:OtherRecipientInfo,context:4,implicit:true,optional:true})],RecipientInfo.prototype,"ori",void 0);RecipientInfo=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientInfo);var RecipientInfos_1;var RecipientInfos=RecipientInfos_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RecipientInfos_1.prototype);return r}return t}(AsnArray);RecipientInfos=RecipientInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RecipientInfo})],RecipientInfos);var RevocationInfoChoices_1;var OtherRevocationInfoFormat=function(){function e(e){if(e===void 0){e={}}this.otherRevInfoFormat="";this.otherRevInfo=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRevocationInfoFormat.prototype,"otherRevInfoFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRevocationInfoFormat.prototype,"otherRevInfo",void 0);var RevocationInfoChoice=function(){function e(e){if(e===void 0){e={}}this.other=new OtherRevocationInfoFormat;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OtherRevocationInfoFormat,context:1,implicit:true})],RevocationInfoChoice.prototype,"other",void 0);RevocationInfoChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RevocationInfoChoice);var RevocationInfoChoices=RevocationInfoChoices_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RevocationInfoChoices_1.prototype);return r}return t}(AsnArray);RevocationInfoChoices=RevocationInfoChoices_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RevocationInfoChoice})],RevocationInfoChoices);var OriginatorInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],OriginatorInfo.prototype,"certs",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],OriginatorInfo.prototype,"crls",void 0);var UnprotectedAttributes_1;var UnprotectedAttributes=UnprotectedAttributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,UnprotectedAttributes_1.prototype);return r}return t}(AsnArray);UnprotectedAttributes=UnprotectedAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],UnprotectedAttributes);var EnvelopedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.recipientInfos=new RecipientInfos;this.encryptedContentInfo=new EncryptedContentInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],EnvelopedData.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorInfo,context:0,implicit:true,optional:true})],EnvelopedData.prototype,"originatorInfo",void 0);__decorate$1([AsnProp({type:RecipientInfos})],EnvelopedData.prototype,"recipientInfos",void 0);__decorate$1([AsnProp({type:EncryptedContentInfo})],EnvelopedData.prototype,"encryptedContentInfo",void 0);__decorate$1([AsnProp({type:UnprotectedAttributes,context:1,implicit:true,optional:true})],EnvelopedData.prototype,"unprotectedAttrs",void 0);var DigestAlgorithmIdentifiers_1;var DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,DigestAlgorithmIdentifiers_1.prototype);return r}return t}(AsnArray);DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:DigestAlgorithmIdentifier})],DigestAlgorithmIdentifiers);var SignedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.digestAlgorithms=new DigestAlgorithmIdentifiers;this.encapContentInfo=new EncapsulatedContentInfo;this.signerInfos=new SignerInfos;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignedData.prototype,"version",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifiers})],SignedData.prototype,"digestAlgorithms",void 0);__decorate$1([AsnProp({type:EncapsulatedContentInfo})],SignedData.prototype,"encapContentInfo",void 0);__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],SignedData.prototype,"certificates",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],SignedData.prototype,"crls",void 0);__decorate$1([AsnProp({type:SignerInfos})],SignedData.prototype,"signerInfos",void 0);var PKCS12AttrSet_1;var PKCS12Attribute=function(){function e(e){if(e===void 0){e={}}this.attrId="";this.attrValues=[];Object.assign(e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PKCS12Attribute.prototype,"attrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],PKCS12Attribute.prototype,"attrValues",void 0);var PKCS12AttrSet=PKCS12AttrSet_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,PKCS12AttrSet_1.prototype);return r}return t}(AsnArray);PKCS12AttrSet=PKCS12AttrSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PKCS12Attribute})],PKCS12AttrSet);var AuthenticatedSafe_1;var AuthenticatedSafe=AuthenticatedSafe_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AuthenticatedSafe_1.prototype);return r}return t}(AsnArray);AuthenticatedSafe=AuthenticatedSafe_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:ContentInfo})],AuthenticatedSafe);var CertBag=function(){function e(e){if(e===void 0){e={}}this.certId="";this.certValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CertBag.prototype,"certId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CertBag.prototype,"certValue",void 0);var CRLBag=function(){function e(e){if(e===void 0){e={}}this.crlId="";this.crltValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CRLBag.prototype,"crlId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CRLBag.prototype,"crltValue",void 0);var KeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PrivateKeyInfo$1);KeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyBag);var PKCS8ShroudedKeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);PKCS8ShroudedKeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PKCS8ShroudedKeyBag);var SecretBag=function(){function e(e){if(e===void 0){e={}}this.secretTypeId="";this.secretValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SecretBag.prototype,"secretTypeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SecretBag.prototype,"secretValue",void 0);var MacData=function(){function e(e){if(e===void 0){e={}}this.mac=new DigestInfo;this.macSalt=new OctetString;this.iterations=1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DigestInfo})],MacData.prototype,"mac",void 0);__decorate$1([AsnProp({type:OctetString})],MacData.prototype,"macSalt",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,defaultValue:1})],MacData.prototype,"iterations",void 0);var PFX=function(){function e(e){if(e===void 0){e={}}this.version=3;this.authSafe=new ContentInfo;this.macData=new MacData;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PFX.prototype,"version",void 0);__decorate$1([AsnProp({type:ContentInfo})],PFX.prototype,"authSafe",void 0);__decorate$1([AsnProp({type:MacData,optional:true})],PFX.prototype,"macData",void 0);var SafeContents_1;var SafeBag=function(){function e(e){if(e===void 0){e={}}this.bagId="";this.bagValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SafeBag.prototype,"bagId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SafeBag.prototype,"bagValue",void 0);__decorate$1([AsnProp({type:PKCS12Attribute,repeated:"set",optional:true})],SafeBag.prototype,"bagAttributes",void 0);var SafeContents=SafeContents_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SafeContents_1.prototype);return r}return t}(AsnArray);SafeContents=SafeContents_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SafeBag})],SafeContents);var ExtensionRequest_1,ExtendedCertificateAttributes_1,SMIMECapabilities_1;var id_pkcs9="1.2.840.113549.1.9";var id_pkcs9_at_unstructuredName="".concat(id_pkcs9,".2");var id_pkcs9_at_challengePassword="".concat(id_pkcs9,".7");var id_pkcs9_at_extensionRequest="".concat(id_pkcs9,".14");var PKCS9String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}return e.call(this,t)||this}t.prototype.toString=function(){return this.ia5String||e.prototype.toString.call(this)};return t}(DirectoryString);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],PKCS9String.prototype,"ia5String",void 0);PKCS9String=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PKCS9String);var Pkcs7PDU=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ContentInfo);Pkcs7PDU=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Pkcs7PDU);var UserPKCS12=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PFX);UserPKCS12=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],UserPKCS12);var EncryptedPrivateKeyInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);EncryptedPrivateKeyInfo=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],EncryptedPrivateKeyInfo);var EmailAddress=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],EmailAddress.prototype,"value",void 0);EmailAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EmailAddress);var UnstructuredName=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PKCS9String);UnstructuredName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredName);var UnstructuredAddress=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);UnstructuredAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredAddress);var DateOfBirth=function(){function e(e){if(e===void 0){e=new Date}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],DateOfBirth.prototype,"value",void 0);DateOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DateOfBirth);var PlaceOfBirth=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);PlaceOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PlaceOfBirth);var Gender=function(){function e(e){if(e===void 0){e="M"}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],Gender.prototype,"value",void 0);Gender=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Gender);var CountryOfCitizenship=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],CountryOfCitizenship.prototype,"value",void 0);CountryOfCitizenship=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfCitizenship);var CountryOfResidence=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(CountryOfCitizenship);CountryOfResidence=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfResidence);var Pseudonym=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);Pseudonym=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Pseudonym);var ContentType=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentType.prototype,"value",void 0);ContentType=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ContentType);var SigningTime=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime);var SequenceNumber=function(){function e(e){if(e===void 0){e=0}this.value=e}e.prototype.toString=function(){return this.value.toString()};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SequenceNumber.prototype,"value",void 0);SequenceNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SequenceNumber);var CounterSignature=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature);var ChallengePassword=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);ChallengePassword=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ChallengePassword);var ExtensionRequest=ExtensionRequest_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ExtensionRequest_1.prototype);return r}return t}(Extensions);ExtensionRequest=ExtensionRequest_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ExtensionRequest);var ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ExtendedCertificateAttributes_1.prototype);return r}return t}(AsnArray);ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],ExtendedCertificateAttributes);var FriendlyName=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],FriendlyName.prototype,"value",void 0);FriendlyName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],FriendlyName);var SMIMECapability=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SMIMECapability=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SMIMECapability);var SMIMECapabilities=SMIMECapabilities_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SMIMECapabilities_1.prototype);return r}return t}(AsnArray);SMIMECapabilities=SMIMECapabilities_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SMIMECapability})],SMIMECapabilities);var id_at_statementOfPossession="1.3.6.1.4.1.22112.2.1";var PrivateKeyPossessionStatement=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerAndSerialNumber})],PrivateKeyPossessionStatement.prototype,"signer",void 0);__decorate$1([AsnProp({type:Certificate,optional:true})],PrivateKeyPossessionStatement.prototype,"cert",void 0);PrivateKeyPossessionStatement=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PrivateKeyPossessionStatement);var Attributes_1;var Attributes=Attributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Attributes_1.prototype);return r}return t}(AsnArray);Attributes=Attributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],Attributes);var CertificationRequestInfo=function(){function e(e){if(e===void 0){e={}}this.version=0;this.subject=new Name$1;this.subjectPKInfo=new SubjectPublicKeyInfo;this.attributes=new Attributes;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificationRequestInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Name$1})],CertificationRequestInfo.prototype,"subject",void 0);__decorate$1([AsnProp({type:SubjectPublicKeyInfo})],CertificationRequestInfo.prototype,"subjectPKInfo",void 0);__decorate$1([AsnProp({type:Attributes,implicit:true,context:0})],CertificationRequestInfo.prototype,"attributes",void 0);var CertificationRequest=function(){function e(e){if(e===void 0){e={}}this.certificationRequestInfo=new CertificationRequestInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificationRequestInfo})],CertificationRequest.prototype,"certificationRequestInfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],CertificationRequest.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CertificationRequest.prototype,"signature",void 0);var globalCrypto=globalThis.crypto;function getCrypto(){return globalCrypto}var SshError=function(e){__extends(t,e);function t(t,r){var i=e.call(this,t)||this;i.code=r;i.name=i.constructor.name;if(Error.captureStackTrace){Error.captureStackTrace(i,i.constructor)}return i}return t}(Error);var UnsupportedAlgorithmError=function(e){__extends(t,e);function t(t,r){var i=r?" Supported: ".concat(r.join(", ")):"";return e.call(this,"Unsupported algorithm: ".concat(t,".").concat(i),"UNSUPPORTED_ALGORITHM")||this}return t}(SshError);var InvalidFormatError=function(e){__extends(t,e);function t(t,r){var i=r?" Expected: ".concat(r):"";return e.call(this,"Invalid format: ".concat(t,".").concat(i),"INVALID_FORMAT")||this}return t}(SshError);var UnsupportedKeyTypeError=function(e){__extends(t,e);function t(t,r){var i=r?" Supported: ".concat(r.join(", ")):"";return e.call(this,"Unsupported key type: ".concat(t,".").concat(i),"UNSUPPORTED_KEY_TYPE")||this}return t}(SshError);var InvalidPrivateKeyFormatError=function(e){__extends(t,e);function t(t){var r=t?"Invalid SSH private key format: ".concat(t):"Invalid SSH private key format";return e.call(this,r,"INVALID_PRIVATE_KEY_FORMAT")||this}return t}(SshError);var EncryptedKeyNotSupportedError=function(e){__extends(t,e);function t(t){var r=t?"Encrypted SSH private keys are not supported (cipher: ".concat(t,")"):"Encrypted SSH private keys are not supported";return e.call(this,r,"ENCRYPTED_KEY_NOT_SUPPORTED")||this}return t}(SshError);var InvalidKeyDataError=function(e){__extends(t,e);function t(t){var r=t?"Invalid key data: ".concat(t):"Invalid key data";return e.call(this,r,"INVALID_KEY_DATA")||this}return t}(SshError);var UnexpectedEOFError=function(e){__extends(t,e);function t(t,r){var i=t!==undefined&&r!==undefined?" Expected ".concat(t," bytes, got ").concat(r):"";return e.call(this,"Unexpected end of data".concat(i),"UNEXPECTED_EOF")||this}return t}(SshError);var encoder=new TextEncoder;var decoder=new TextDecoder;var SshReader=function(){function e(e){this.buffer=e;this.offset=0}e.prototype.readUint8=function(){if(this.offset>=this.buffer.length){throw new UnexpectedEOFError(1,0)}return this.buffer[this.offset++]};e.prototype.readUint32=function(){var e=this.readUint8()<<24|this.readUint8()<<16|this.readUint8()<<8|this.readUint8();return e>>>0};e.prototype.readUint64=function(){var e=this.readUint32();var t=this.readUint32();return BigInt(e)<<32n|BigInt(t)};e.prototype.readBytes=function(e){if(e<0){throw new InvalidFormatError("Invalid length: ".concat(e))}if(this.offset+e>this.buffer.length){throw new UnexpectedEOFError(e,this.buffer.length-this.offset)}var t=this.buffer.subarray(this.offset,this.offset+e);this.offset+=e;return t};e.prototype.readString=function(){var e=this.readUint32();var t=this.readBytes(e);return decoder.decode(t)};e.prototype.peekString=function(e){if(this.offset+e>this.buffer.length){throw new UnexpectedEOFError(e,this.buffer.length-this.offset)}var t=this.buffer.subarray(this.offset,this.offset+e);return decoder.decode(t)};e.prototype.readMpInt=function(e){if(e===void 0){e=false}var t=this.readUint32();var r=this.readBytes(t);if(e&&r.length>1&&r[0]===0){return r.subarray(1)}return r};e.prototype.readMpIntSsh=function(){return this.readMpInt(true)};e.prototype.remaining=function(){return this.buffer.length-this.offset};e.prototype.getOffset=function(){return this.offset};e.prototype.seek=function(e){if(e<0||e>this.buffer.length){throw new InvalidFormatError("Invalid offset: ".concat(e,". Buffer length: ").concat(this.buffer.length))}this.offset=e};return e}();var SshWriter=function(){function e(e){if(e===void 0){e=1024}this.buffer=new Uint8Array(e);this.offset=0}e.prototype.ensureCapacity=function(e){var t=this.offset+e;if(t>this.buffer.length){var r=Math.max(t,this.buffer.length*2);var i=new Uint8Array(r);i.set(this.buffer.subarray(0,this.offset));this.buffer=i}};e.prototype.reserve=function(e){if(e>this.buffer.length){var t=new Uint8Array(e);t.set(this.buffer.subarray(0,this.offset));this.buffer=t}};e.prototype.writeUint8=function(e){this.ensureCapacity(1);this.buffer[this.offset++]=e&255};e.prototype.writeUint32=function(e){this.ensureCapacity(4);this.buffer[this.offset++]=e>>>24&255;this.buffer[this.offset++]=e>>>16&255;this.buffer[this.offset++]=e>>>8&255;this.buffer[this.offset++]=e&255};e.prototype.writeUint64=function(e){this.ensureCapacity(8);var t=Number(e>>32n);var r=Number(e&0xffffffffn);this.writeUint32(t);this.writeUint32(r)};e.prototype.writeBytes=function(e){this.ensureCapacity(e.length);this.buffer.set(e,this.offset);this.offset+=e.length};e.prototype.writeString=function(e){var t=encoder.encode(e);this.writeUint32(t.length);this.writeBytes(t)};e.prototype.writeMpInt=function(e,t){if(t===void 0){t=false}if(t&&e.length>0&&(e[0]&128)!==0){var r=new Uint8Array(e.length+1);r[0]=0;r.set(e,1);this.writeUint32(r.length);this.writeBytes(r)}else{this.writeUint32(e.length);this.writeBytes(e)}};e.prototype.writeMpIntSsh=function(e){this.writeMpInt(e,true)};e.prototype.toUint8Array=function(){return this.buffer.subarray(0,this.offset)};e.prototype.getOffset=function(){return this.offset};e.prototype.seek=function(e){if(e<0||e>this.buffer.length){throw new InvalidFormatError("Invalid offset")}this.offset=e};return e}();var RsaBinding=function(){function e(e){if(e===void 0){e="SHA-256"}this.hash="SHA-256";this.hash=e}e.prototype.importPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){t=e.blob,r=e.crypto;i=new SshReader(t);i.readString();n=i.readMpInt(true);o=i.readMpInt(true);a={kty:"RSA",n:buildExports.Convert.ToBase64Url(o),e:buildExports.Convert.ToBase64Url(n)};return[2,r.subtle.importKey("jwk",a,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};e.prototype.exportPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){switch(s.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("jwk",t)];case 1:i=s.sent();if(!i.n||!i.e){throw new InvalidKeyDataError("RSA JWK missing required parameters (n, e)")}n=buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromBase64Url(i.n));o=buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromBase64Url(i.e));a=new SshWriter;a.writeString("ssh-rsa");a.writeMpInt(o,true);a.writeMpInt(n,true);return[2,a.toUint8Array()]}}))}))};e.prototype.importPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.spki,r=e.crypto;return[2,r.subtle.importKey("spki",t,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};e.prototype.exportPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("spki",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.pkcs8,r=e.crypto;return[2,r.subtle.importKey("pkcs8",t,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};e.prototype.exportPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.privateKey,r=e.crypto;return[4,r.subtle.exportKey("pkcs8",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g,m,C,P,T,E,I,b,w;return __generator(this,(function(D){t=e.sshKey,r=e.crypto;i=t.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=buildExports.Convert.FromBase64(i);o=new SshReader(buildExports.BufferSourceConverter.toUint8Array(n));a=o.readBytes(15);if(buildExports.Convert.ToHex(a)!=="6f70656e7373682d6b65792d763100"){throw new InvalidPrivateKeyFormatError("invalid magic string")}s=o.readString();o.readString();o.readString();if(s!=="none"){throw new EncryptedKeyNotSupportedError(s)}c=o.readUint32();if(c!==1){throw new InvalidPrivateKeyFormatError("multiple keys not supported")}u=o.readUint32();o.readBytes(u);p=o.readUint32();f=o.readBytes(p);d=new SshReader(f);l=d.readUint32();y=d.readUint32();if(l!==y){throw new InvalidPrivateKeyFormatError("invalid checkints")}d.readString();v=d.readMpInt(true);h=d.readMpInt(true);A=d.readMpInt(true);_=d.readMpInt(true);S=d.readMpInt(true);g=d.readMpInt(true);d.readString();m=BigInt("0x"+buildExports.Convert.ToHex(A));C=BigInt("0x"+buildExports.Convert.ToHex(S));P=BigInt("0x"+buildExports.Convert.ToHex(g));T=m%(C-1n);E=m%(P-1n);I=buildExports.Convert.FromHex(T.toString(16).padStart(S.length*2,"0"));b=buildExports.Convert.FromHex(E.toString(16).padStart(g.length*2,"0"));w={kty:"RSA",n:buildExports.Convert.ToBase64Url(v),e:buildExports.Convert.ToBase64Url(h),d:buildExports.Convert.ToBase64Url(A),p:buildExports.Convert.ToBase64Url(S),q:buildExports.Convert.ToBase64Url(g),dp:buildExports.Convert.ToBase64Url(I),dq:buildExports.Convert.ToBase64Url(b),qi:buildExports.Convert.ToBase64Url(_)};return[2,r.subtle.importKey("jwk",w,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};e.prototype.exportPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d;return __generator(this,(function(l){switch(l.label){case 0:t=e.privateKey,r=e.crypto,i=e.jwk;o=i;if(o)return[3,2];return[4,r.subtle.exportKey("jwk",t)];case 1:o=l.sent();l.label=2;case 2:n=o;if(!n.n||!n.e||!n.d||!n.p||!n.q){throw new InvalidKeyDataError("RSA JWK missing required parameters")}a=new Uint8Array(buildExports.Convert.FromBase64Url(n.n));s=new Uint8Array(buildExports.Convert.FromBase64Url(n.e));c=new Uint8Array(buildExports.Convert.FromBase64Url(n.d));u=new Uint8Array(buildExports.Convert.FromBase64Url(n.p));p=new Uint8Array(buildExports.Convert.FromBase64Url(n.q));f=n.qi?new Uint8Array(buildExports.Convert.FromBase64Url(n.qi)):new Uint8Array;d=new SshWriter;d.writeString("ssh-rsa");d.writeMpInt(a,true);d.writeMpInt(s,true);d.writeMpInt(c,true);d.writeMpInt(f,true);d.writeMpInt(u,true);d.writeMpInt(p,true);return[2,d.toUint8Array()]}}))}))};e.prototype.sign=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:t=e.privateKey,r=e.data,i=e.crypto,n=e.hash;if(n&&n!==this.hash){throw new InvalidKeyDataError("Hash ".concat(n," not supported for this RSA algorithm"))}if(!t.extractable){throw new InvalidKeyDataError("Private key is not extractable")}return[4,this.exportPrivatePkcs8({privateKey:t,crypto:i})];case 1:o=c.sent();return[4,this.importPrivatePkcs8({pkcs8:new Uint8Array(o),crypto:i})];case 2:a=c.sent();return[4,i.subtle.sign("RSASSA-PKCS1-v1_5",a,r)];case 3:s=c.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(s)]}}))}))};e.prototype.verify=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:t=e.publicKey,r=e.signature,i=e.data,n=e.crypto,o=e.hash;if(o&&o!==this.hash){return[2,false]}if(!t.extractable){throw new InvalidKeyDataError("Public key is not extractable")}return[4,this.exportPublicSpki({publicKey:t,crypto:n})];case 1:a=c.sent();return[4,this.importPublicSpki({spki:new Uint8Array(a),crypto:n})];case 2:s=c.sent();return[2,n.subtle.verify("RSASSA-PKCS1-v1_5",s,r,i)]}}))}))};e.prototype.encodeSignature=function(e){var t=e.signature,r=e.algo;var i=new SshWriter;i.writeString(r);i.writeUint32(t.byteLength);i.writeBytes(t);return i.toUint8Array()};e.prototype.decodeSignature=function(e){var t=e.signature;var r=new SshReader(t);var i=r.readString();var n=r.readUint32();var o=r.readBytes(n);return{signature:o,algo:i}};e.prototype.supportsCryptoKey=function(e){return e.algorithm.name==="RSASSA-PKCS1-v1_5"};e.prototype.parsePublicKey=function(e){var t=e.readBytes(e.readUint32());var r=e.readBytes(e.readUint32());var i=new SshWriter;i.writeString("ssh-rsa");i.writeMpInt(t);i.writeMpInt(r);return{type:"ssh-rsa",keyData:i.toUint8Array()}};e.prototype.writePublicKey=function(e,t){var r=new SshReader(t.keyData);r.readString();var i=r.readMpInt();var n=r.readMpInt();e.writeUint32(i.length);e.writeBytes(i);e.writeUint32(n.length);e.writeBytes(n)};e.prototype.getCertificateType=function(){return"ssh-rsa-cert-v01@openssh.com"};e.prototype.getSignatureAlgo=function(){return this.hash==="SHA-256"?"rsa-sha2-256":"rsa-sha2-512"};return e}();var EcdsaBinding=function(){function e(e,t,r){this.curveName=e;this.sshType=t;this.namedCurve=r}e.prototype.getHashAlgorithm=function(){switch(this.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:return"SHA-256"}};e.prototype.getExpectedLength=function(){switch(this.namedCurve){case"P-256":return 32;case"P-384":return 48;case"P-521":return 66;default:return 32}};e.prototype.getSignatureCoordLength=function(){return this.getExpectedLength()};e.prototype.importPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){t=e.blob,r=e.crypto;i=new SshReader(t);i.readString();n=i.readString();if(n!==this.curveName){throw new InvalidKeyDataError("ECDSA curve name ".concat(n,", expected ").concat(this.curveName))}o=i.readMpInt();a=Math.floor((o.length-1)/2);s={kty:"EC",crv:this.namedCurve,x:buildExports.Convert.ToBase64Url(o.slice(1,1+a)),y:buildExports.Convert.ToBase64Url(o.slice(1+a))};return[2,r.subtle.importKey("jwk",s,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};e.prototype.exportPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("jwk",t)];case 1:i=c.sent();if(!i.x||!i.y){throw new InvalidKeyDataError("ECDSA JWK missing x or y parameters")}n=new Uint8Array(buildExports.Convert.FromBase64Url(i.x));o=new Uint8Array(buildExports.Convert.FromBase64Url(i.y));a=new Uint8Array(1+n.length+o.length);a[0]=4;a.set(n,1);a.set(o,1+n.length);s=new SshWriter;s.writeString(this.sshType);s.writeString(this.curveName);s.writeMpInt(a);return[2,s.toUint8Array()]}}))}))};e.prototype.importPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.spki,r=e.crypto;return[2,r.subtle.importKey("spki",t,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};e.prototype.exportPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("spki",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.pkcs8,r=e.crypto;return[2,r.subtle.importKey("pkcs8",t,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};e.prototype.exportPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.privateKey,r=e.crypto;return[4,r.subtle.exportKey("pkcs8",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.exportPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p;return __generator(this,(function(f){switch(f.label){case 0:t=e.privateKey,r=e.crypto,i=e.jwk;o=i;if(o)return[3,2];return[4,r.subtle.exportKey("jwk",t)];case 1:o=f.sent();f.label=2;case 2:n=o;if(!n.d||!n.x||!n.y){throw new InvalidKeyDataError("ECDSA private key JWK missing required parameters")}a=new Uint8Array(buildExports.Convert.FromBase64Url(n.x));s=new Uint8Array(buildExports.Convert.FromBase64Url(n.y));c=new Uint8Array(buildExports.Convert.FromBase64Url(n.d));u=new Uint8Array(1+a.length+s.length);u[0]=4;u.set(a,1);u.set(s,1+a.length);p=new SshWriter;p.writeString(this.sshType);p.writeString(this.curveName);p.writeMpInt(u);p.writeMpInt(c);return[2,p.toUint8Array()]}}))}))};e.prototype.importPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g;return __generator(this,(function(m){t=e.sshKey,r=e.crypto;i=t.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=buildExports.Convert.FromBase64(i);o=new SshReader(buildExports.BufferSourceConverter.toUint8Array(n));a=o.readBytes(15);if(buildExports.Convert.ToHex(a)!=="6f70656e7373682d6b65792d763100"){throw new InvalidPrivateKeyFormatError("invalid magic string")}s=o.readString();o.readString();o.readString();if(s!=="none"){throw new EncryptedKeyNotSupportedError(s)}c=o.readUint32();if(c!==1){throw new InvalidPrivateKeyFormatError("multiple keys not supported")}u=o.readUint32();o.readBytes(u);p=o.readUint32();f=o.readBytes(p);d=new SshReader(f);l=d.readUint32();y=d.readUint32();if(l!==y){throw new InvalidPrivateKeyFormatError("invalid checkints")}d.readString();d.readString();v=d.readMpInt();h=d.readMpInt();d.readString();if(v[0]!==4){throw new InvalidKeyDataError("invalid ECDSA public key point format")}A=Math.floor((v.length-1)/2);_=v.slice(1,1+A);S=v.slice(1+A);g={kty:"EC",crv:this.namedCurve,x:buildExports.Convert.ToBase64Url(_),y:buildExports.Convert.ToBase64Url(S),d:buildExports.Convert.ToBase64Url(h)};return[2,r.subtle.importKey("jwk",g,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};e.prototype.sign=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){switch(s.label){case 0:t=e.privateKey,r=e.data,i=e.crypto,n=e.hash;o=this.getHashAlgorithm();if(n&&n!==o){throw new InvalidKeyDataError("ECDSA ".concat(this.namedCurve," requires ").concat(o,", got ").concat(n))}return[4,i.subtle.sign({name:"ECDSA",hash:o},t,r)];case 1:a=s.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(a)]}}))}))};e.prototype.verify=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){t=e.publicKey,r=e.signature,i=e.data,n=e.crypto,o=e.hash;a=this.getHashAlgorithm();if(o&&o!==a){throw new InvalidKeyDataError("ECDSA ".concat(this.namedCurve," requires ").concat(a,", got ").concat(o))}return[2,n.subtle.verify({name:"ECDSA",hash:a},t,r,i)]}))}))};e.prototype.encodeSignature=function(e){var t=e.signature,r=e.algo;if(r.startsWith("ecdsa-sha2-")){var i=this.getSignatureCoordLength();var n=t.subarray(0,i);var o=t.subarray(i);var a=new SshWriter;a.writeString(r);var s=new SshWriter;s.writeMpInt(n,true);s.writeMpInt(o,true);var c=s.toUint8Array();a.writeUint32(c.length);a.writeBytes(c);return a.toUint8Array()}var u=new SshWriter;u.writeString(r);u.writeUint32(t.byteLength);u.writeBytes(t);return u.toUint8Array()};e.prototype.decodeSignature=function(e){var t=e.signature;var r=new SshReader(t);var i=r.readString();var n=r.readUint32();var o=r.readBytes(n);if(i.startsWith("ecdsa-sha2-")){var a=new SshReader(o);var s=a.readMpInt();var c=a.readMpInt();if(s[0]===0&&s.length>1&&(s[1]&128)===0){s=s.slice(1)}if(c[0]===0&&c.length>1&&(c[1]&128)===0){c=c.slice(1)}var u=this.getExpectedLength();var p=new Uint8Array(u);var f=new Uint8Array(u);if(s.length<=u){p.set(s,u-s.length)}else{p.set(s.slice(s.length-u),0)}if(c.length<=u){f.set(c,u-c.length)}else{f.set(c.slice(c.length-u),0)}var d=new Uint8Array(__spreadArray(__spreadArray([],p,true),f,true));return{signature:d,algo:i}}return{signature:o,algo:i}};e.prototype.supportsCryptoKey=function(e){return e.algorithm.name==="ECDSA"&&e.algorithm.namedCurve===this.namedCurve};e.prototype.parsePublicKey=function(e){var t=e.readString();if(t!==this.curveName){throw new InvalidKeyDataError("ECDSA certificate curve name ".concat(t,", expected ").concat(this.curveName))}var r=e.readBytes(e.readUint32());var i=new SshWriter;i.writeString(this.sshType);i.writeString(t);i.writeMpInt(r);return{type:this.sshType,keyData:i.toUint8Array()}};e.prototype.writePublicKey=function(e,t){var r=new SshReader(t.keyData);r.readString();var i=r.readString();var n=r.readMpInt();e.writeString(i);e.writeUint32(n.length);e.writeBytes(n)};e.prototype.getCertificateType=function(){return"".concat(this.sshType,"-cert-v01@openssh.com")};e.prototype.getSignatureAlgo=function(){return this.sshType};return e}();var EcdsaP256Binding=new EcdsaBinding("nistp256","ecdsa-sha2-nistp256","P-256");var EcdsaP384Binding=new EcdsaBinding("nistp384","ecdsa-sha2-nistp384","P-384");var EcdsaP521Binding=new EcdsaBinding("nistp521","ecdsa-sha2-nistp521","P-521");var Ed25519Binding=function(){function e(){}e.prototype.importPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o;return __generator(this,(function(a){t=e.blob,r=e.crypto;i=new SshReader(t);i.readString();n=i.readUint32();if(n!==32){throw new InvalidKeyDataError("Ed25519 key length ".concat(n,", expected 32"))}o=i.readBytes(n);return[2,r.subtle.importKey("raw",o,"Ed25519",true,["verify"])]}))}))};e.prototype.exportPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o;return __generator(this,(function(a){switch(a.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("jwk",t)];case 1:i=a.sent();if(!i.x){throw new InvalidKeyDataError("Ed25519 JWK missing x parameter")}n=new Uint8Array(buildExports.Convert.FromBase64Url(i.x));o=new SshWriter;o.writeString("ssh-ed25519");o.writeUint32(n.length);o.writeBytes(n);return[2,o.toUint8Array()]}}))}))};e.prototype.importPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.spki,r=e.crypto;return[2,r.subtle.importKey("spki",t,"Ed25519",true,["verify"])]}))}))};e.prototype.exportPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("spki",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.pkcs8,r=e.crypto;return[2,r.subtle.importKey("pkcs8",t,"Ed25519",true,["sign"])]}))}))};e.prototype.exportPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.privateKey,r=e.crypto;return[4,r.subtle.exportKey("pkcs8",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.exportPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u;return __generator(this,(function(p){switch(p.label){case 0:t=e.privateKey,r=e.crypto,i=e.jwk;o=i;if(o)return[3,2];return[4,r.subtle.exportKey("jwk",t)];case 1:o=p.sent();p.label=2;case 2:n=o;if(!n.d||!n.x){throw new InvalidKeyDataError("Ed25519 private key JWK missing required parameters")}a=new Uint8Array(buildExports.Convert.FromBase64Url(n.d));s=new Uint8Array(buildExports.Convert.FromBase64Url(n.x));c=new SshWriter;c.writeString("ssh-ed25519");c.writeUint32(s.length);c.writeBytes(s);u=new Uint8Array(64);u.set(a,0);u.set(s,32);c.writeUint32(u.length);c.writeBytes(u);return[2,c.toUint8Array()]}}))}))};e.prototype.importPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g;return __generator(this,(function(m){t=e.sshKey,r=e.crypto;i=t.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=buildExports.Convert.FromBase64(i);o=new SshReader(buildExports.BufferSourceConverter.toUint8Array(n));a=o.readBytes(15);if(buildExports.Convert.ToHex(a)!=="6f70656e7373682d6b65792d763100"){throw new InvalidPrivateKeyFormatError("invalid magic string")}s=o.readString();o.readString();o.readString();if(s!=="none"){throw new EncryptedKeyNotSupportedError(s)}c=o.readUint32();if(c!==1){throw new InvalidPrivateKeyFormatError("multiple keys not supported")}u=o.readUint32();o.readBytes(u);p=o.readUint32();f=o.readBytes(p);d=new SshReader(f);l=d.readUint32();y=d.readUint32();if(l!==y){throw new InvalidPrivateKeyFormatError("invalid checkints")}d.readString();v=d.readUint32();h=d.readBytes(v);A=d.readUint32();_=d.readBytes(A);d.readString();S=_.slice(0,32);g={kty:"OKP",crv:"Ed25519",d:buildExports.Convert.ToBase64Url(S),x:buildExports.Convert.ToBase64Url(h)};return[2,r.subtle.importKey("jwk",g,"Ed25519",true,["sign"])]}))}))};e.prototype.sign=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n;return __generator(this,(function(o){switch(o.label){case 0:t=e.privateKey,r=e.data,i=e.crypto;return[4,i.subtle.sign("Ed25519",t,r)];case 1:n=o.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(n)]}}))}))};e.prototype.verify=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n;return __generator(this,(function(o){t=e.publicKey,r=e.signature,i=e.data,n=e.crypto;return[2,n.subtle.verify("Ed25519",t,r,i)]}))}))};e.prototype.encodeSignature=function(e){var t=e.signature,r=e.algo;var i=new Uint8Array(t);var n=new SshWriter;n.writeString(r);n.writeUint32(i.length);n.writeBytes(i);return n.toUint8Array()};e.prototype.decodeSignature=function(e){var t=e.signature;var r=new SshReader(t);var i=r.readString();var n=r.readUint32();var o=r.readBytes(n);return{signature:o,algo:i}};e.prototype.supportsCryptoKey=function(e){return e.algorithm.name==="Ed25519"};e.prototype.parsePublicKey=function(e){var t=e.readBytes(e.readUint32());var r=new SshWriter;r.writeString("ssh-ed25519");r.writeUint32(t.length);r.writeBytes(t);return{type:"ssh-ed25519",keyData:r.toUint8Array()}};e.prototype.writePublicKey=function(e,t){var r=new SshReader(t.keyData);r.readString();var i=r.readUint32();var n=r.readBytes(i);e.writeUint32(n.length);e.writeBytes(n)};e.prototype.getCertificateType=function(){return"ssh-ed25519-cert-v01@openssh.com"};e.prototype.getSignatureAlgo=function(){return"ssh-ed25519"};return e}();var registry=new Map;var AlgorithmRegistry=function(){function e(){}e.get=function(e){var t=registry.get(e);if(!t){throw new UnsupportedKeyTypeError(e,Array.from(registry.keys()))}return t};e.register=function(e,t){registry.set(e,t)};e.getSshTypeFromCryptoKey=function(e){for(var t=0,r=registry.entries();t<r.length;t++){var i=r[t],n=i[0],o=i[1];if(o.supportsCryptoKey(e)){return n}}throw new UnsupportedKeyTypeError(e.algorithm.name,Array.from(registry.keys()))};e.certTypeToKeyType=function(e){var t={"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"};return t[e]};e.getSupportedCertTypes=function(){return Object.keys({"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"})};return e}();AlgorithmRegistry.register("ssh-ed25519",new Ed25519Binding);AlgorithmRegistry.register("ssh-rsa",new RsaBinding("SHA-256"));AlgorithmRegistry.register("rsa-sha2-256",new RsaBinding("SHA-256"));AlgorithmRegistry.register("rsa-sha2-512",new RsaBinding("SHA-512"));AlgorithmRegistry.register("ecdsa-sha2-nistp256",EcdsaP256Binding);AlgorithmRegistry.register("ecdsa-sha2-nistp384",EcdsaP384Binding);AlgorithmRegistry.register("ecdsa-sha2-nistp521",EcdsaP521Binding);function parsePublicKey(e){var t=typeof e==="string"?e.trim().split(/\s+/):null;if(!t||t.length<2){throw new InvalidFormatError("Invalid SSH public key format")}var r=t[0];var i=new Uint8Array(buildExports.Convert.FromBase64(t[1]));var n=t.length>2?t.slice(2).join(" "):undefined;var o=new SshReader(i);var a=o.readString();if(a!==r){throw new InvalidFormatError("Key type mismatch")}return{type:r,keyData:i,comment:n}}function serializePublicKey(e){var t=buildExports.Convert.ToBase64(e.keyData);var r=[e.type,t];if(e.comment){r.push(e.comment)}return r.join(" ")}function parse(e){if(typeof e==="string"){var t=e.trim().split(/\s+/);if(t.length<2){throw new InvalidFormatError("SSH certificate string","type base64 [comment]")}var r=t[0];var i=new Uint8Array(buildExports.Convert.FromBase64(t[1]));var n=t.length>2?t.slice(2).join(" "):undefined;var o=new SshReader(i);var a=o.readString();if(a!==r){throw new InvalidFormatError("certificate blob type ".concat(a),"expected ".concat(r))}return{type:r,keyData:i,comment:n}}else{var o=new SshReader(e);var s=o.readString();var c=e.slice(o.getOffset());return{type:s,keyData:c}}}function parseCertificateData(e){var t=new SshReader(e);var r=t.readString();var i=t.readBytes(t.readUint32());var n=AlgorithmRegistry.certTypeToKeyType(r);if(!n){throw new UnsupportedAlgorithmError(r,AlgorithmRegistry.getSupportedCertTypes())}var o=AlgorithmRegistry.get(n);var a=o.parsePublicKey(t);var s=n;var c=t.readUint64();var u=t.readUint32();var p=u===1?"user":"host";var f=t.readString();var d=t.readUint32();var l=t.readBytes(d);var y=[];if(l.length>0){var v=new SshReader(l);while(v.getOffset()<l.length){try{var h=v.readString();y.push(h)}catch(e){break}}}var A=t.readUint64();var _=t.readUint64();var S={};var g=t.readUint32();var m=t.readBytes(g);if(m.length>0){var C=new SshReader(m);while(C.getOffset()<m.length){try{var P=C.readString();var T=C.readBytes(C.readUint32());var E=T.length===0?"":decoder.decode(T);S[P]=E}catch(e){break}}}var I={};var b=t.readUint32();var w=t.readBytes(b);if(w.length>0){var D=new SshReader(w);while(D.getOffset()<w.length){try{var B=D.readString();var T=D.readBytes(D.readUint32());var R=T.length===0?"":decoder.decode(T);I[B]=R}catch(e){break}}}var $=t.readUint32();var x=t.readBytes($);var N=t.readUint32();var O=t.readBytes(N);var K=new SshReader(O);var k=K.readString();var L={type:k,keyData:O};var M=t.readUint32();var V=t.readBytes(M);return{nonce:i,keyType:s,publicKey:a,serial:c,type:p,keyId:f,validPrincipals:y,validAfter:A,validBefore:_,criticalOptions:S,extensions:I,reserved:x,signatureKey:L,signature:V}}function serialize(e){var t=buildExports.Convert.ToBase64(e.keyData);var r=[e.type,t];if(e.comment){r.push(e.comment)}return r.join(" ")}function parseSignature(e){var t=new SshReader(e);if(e.length>=6&&(new TextDecoder).decode(e.subarray(0,6))==="SSHSIG"){return parseSshSignatureFormat(t)}else{return parseLegacyFormat(t)}}function parseSshSignatureFormat(e){var t=e.readBytes(6);var r=(new TextDecoder).decode(t);if(r!=="SSHSIG"){throw new InvalidFormatError(r,"SSHSIG")}var i=e.readUint32();var n=e.readUint32();var o=e.readBytes(n);var a=e.readString();var s=e.readString();var c=e.readString();var u=e.readUint32();var p=e.readBytes(u);var f=new SshReader(p);var d=f.readString();var l=f.readUint32();var y=f.readBytes(l);return{format:"ssh-signature",algorithm:d,signature:y,version:i,publicKey:o,namespace:a,reserved:s,hashAlgorithm:c}}function parseLegacyFormat(e){var t=e.readString();var r=e.readUint32();var i=e.readBytes(r);return{format:"legacy",algorithm:t,signature:i}}function serializeSignature(e){if(e.format==="ssh-signature"){return serializeSshSignatureFormat(e)}else{return serializeLegacyFormat(e)}}function serializeSshSignatureFormat(e){var t=new SshWriter;t.writeBytes((new TextEncoder).encode("SSHSIG"));t.writeUint32(e.version||1);if(e.publicKey){t.writeUint32(e.publicKey.length);t.writeBytes(e.publicKey)}else{t.writeUint32(0)}t.writeString(e.namespace||"file");t.writeString(e.reserved||"");t.writeString(e.hashAlgorithm||"sha512");var r=new SshWriter;r.writeString(e.algorithm);r.writeUint32(e.signature.length);r.writeBytes(e.signature);var i=r.toUint8Array();t.writeUint32(i.length);t.writeBytes(i);return t.toUint8Array()}function serializeLegacyFormat(e){var t=new SshWriter;t.writeString(e.algorithm);t.writeUint32(e.signature.length);t.writeBytes(e.signature);return t.toUint8Array()}var SshObject=function(){function e(){}return e}();var SshPublicKey=function(e){__extends(t,e);function t(r){var i=e.call(this)||this;i.type=t.TYPE;i.blob=r;return i}t.prototype.getCryptoKey=function(){return __awaiter(this,arguments,void 0,(function(e){var t,r;if(e===void 0){e=getCrypto()}return __generator(this,(function(i){switch(i.label){case 0:if(!!this.cachedCryptoKey)return[3,2];t=AlgorithmRegistry.get(this.blob.type);r=this;return[4,t.importPublicSsh({blob:this.blob.keyData,crypto:e})];case 1:r.cachedCryptoKey=i.sent();i.label=2;case 2:return[2,this.cachedCryptoKey]}}))}))};t.fromSSH=function(e){return __awaiter(this,arguments,void 0,(function(e,r){var i,n;if(r===void 0){r=getCrypto()}return __generator(this,(function(o){switch(o.label){case 0:i=parsePublicKey(e);n=AlgorithmRegistry.get(i.type);return[4,n.importPublicSsh({blob:i.keyData,crypto:r})];case 1:o.sent();return[2,new t(i)]}}))}))};t.fromSPKI=function(e,r){return __awaiter(this,arguments,void 0,(function(e,r,i){var n,o,a,s;if(i===void 0){i=getCrypto()}return __generator(this,(function(c){switch(c.label){case 0:n=AlgorithmRegistry.get(r);return[4,n.importPublicSpki({spki:e,crypto:i})];case 1:o=c.sent();return[4,n.exportPublicSsh({publicKey:o,crypto:i})];case 2:a=c.sent();s={type:r,keyData:a};return[2,new t(s)]}}))}))};t.fromWebCrypto=function(e,r){return __awaiter(this,arguments,void 0,(function(e,r,i){var n,o,a,s;if(i===void 0){i=getCrypto()}return __generator(this,(function(c){switch(c.label){case 0:n=r||AlgorithmRegistry.getSshTypeFromCryptoKey(e);o=AlgorithmRegistry.get(n);return[4,o.exportPublicSsh({publicKey:e,crypto:i})];case 1:a=c.sent();s={type:n,keyData:a};return[2,new t(s)]}}))}))};t.prototype.export=function(){return __awaiter(this,arguments,void 0,(function(e,t){var r,i,n;if(e===void 0){e="ssh"}if(t===void 0){t=getCrypto()}return __generator(this,(function(o){switch(o.label){case 0:if(!(e==="ssh"))return[3,1];return[2,serializePublicKey(this.blob)];case 1:if(!(e==="spki"))return[3,4];return[4,this.getCryptoKey(t)];case 2:r=o.sent();i=AlgorithmRegistry.get(this.blob.type);return[4,i.exportPublicSpki({publicKey:r,crypto:t})];case 3:n=o.sent();return[2,new Uint8Array(n)];case 4:throw new UnsupportedKeyTypeError("Unsupported export format: ".concat(e))}}))}))};t.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.export("ssh")];case 1:e=t.sent();return[2,e]}}))}))};t.prototype.toSPKI=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.export("spki")];case 1:e=t.sent();return[2,e]}}))}))};t.prototype.toWebCrypto=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=getCrypto()}return __generator(this,(function(t){return[2,this.getCryptoKey(e)]}))}))};t.prototype.verify=function(e,t,r){return __awaiter(this,arguments,void 0,(function(e,t,r,i){var n,o;if(i===void 0){i=getCrypto()}return __generator(this,(function(a){switch(a.label){case 0:n=AlgorithmRegistry.get(e);return[4,this.toWebCrypto(i)];case 1:o=a.sent();return[2,n.verify({publicKey:o,signature:t,data:r,crypto:i})]}}))}))};Object.defineProperty(t.prototype,"keyType",{get:function(){return this.blob.type},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"comment",{get:function(){return this.blob.comment},enumerable:false,configurable:true});t.prototype.getBlob=function(){return __assign({},this.blob)};t.prototype.thumbprint=function(){return __awaiter(this,arguments,void 0,(function(e,t){var r,i,n;if(e===void 0){e="sha256"}if(t===void 0){t=getCrypto()}return __generator(this,(function(o){switch(o.label){case 0:r=e==="sha256"?"SHA-256":"SHA-512";i=this.blob.keyData;return[4,t.subtle.digest(r,i)];case 1:n=o.sent();return[2,new Uint8Array(n)]}}))}))};t.TYPE="public-key";return t}(SshObject);var SshSignature=function(e){__extends(t,e);function t(r){var i=e.call(this)||this;i.type=t.TYPE;i.blob=r;i.format=r.format;i.algorithm=r.algorithm;i.signature=r.signature;i.version=r.version;i.namespace=r.namespace;i.reserved=r.reserved;i.hashAlgorithm=r.hashAlgorithm;if(r.publicKey){var n=new SshReader(r.publicKey);var o=n.readString();i.publicKey=new SshPublicKey({type:o,keyData:r.publicKey})}return i}t.parse=function(e){var r=parseSignature(e);return new t(r)};t.fromBlob=function(e){return new t(e)};t.fromBase64=function(e){var r=new Uint8Array(buildExports.Convert.FromBase64(e));return t.parse(r)};t.fromText=function(e){var r=e.replace(/-----BEGIN SSH SIGNATURE-----/,"").replace(/-----END SSH SIGNATURE-----/,"").replace(/[\r\n\s]/g,"");return t.fromBase64(r)};t.prototype.serialize=function(){return serializeSignature(this.blob)};t.prototype.toBase64=function(){return buildExports.Convert.ToBase64(this.serialize())};t.prototype.toText=function(){var e=this.toBase64();var t=[];for(var r=0;r<e.length;r+=70){t.push(e.substring(r,r+70))}return __spreadArray(__spreadArray(["-----BEGIN SSH SIGNATURE-----"],t,true),["-----END SSH SIGNATURE-----"],false).join("\n")};t.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.toText()]}))}))};t.prototype.verify=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A;return __generator(this,(function(_){switch(_.label){case 0:r=AlgorithmRegistry.get(this.algorithm);return[4,t["getCryptoKey"]()];case 1:i=_.sent();n=getCrypto();o=e;if(!(this.format==="ssh-signature"))return[3,3];a=this.hashAlgorithm||"sha512";s=this.namespace||"file";c=this.reserved||"";u=a==="sha256"?"SHA-256":"SHA-512";return[4,n.subtle.digest(u,e)];case 2:p=_.sent();f=new Uint8Array(p);d=new SshWriter;d.writeBytes((new TextEncoder).encode("SSHSIG"));d.writeString(s);d.writeString(c);d.writeString(a);d.writeUint32(f.length);d.writeBytes(f);o=d.toUint8Array();_.label=3;case 3:if(this.algorithm==="rsa-sha2-256"){l="SHA-256"}else if(this.algorithm==="rsa-sha2-512"){l="SHA-512"}if(this.format==="legacy"||this.format==="ssh-signature"){v=new SshWriter;v.writeString(this.algorithm);v.writeUint32(this.signature.length);v.writeBytes(this.signature);h=v.toUint8Array();A=r.decodeSignature({signature:h});y=A.signature}else{y=this.signature}return[2,r.verify({publicKey:i,signature:y,data:o,crypto:n,hash:l})]}}))}))};t.fromLegacy=function(e,r){var i=AlgorithmRegistry.get(e);var n=i.encodeSignature({signature:r,algo:e});var o=new SshReader(n);o.readString();var a=o.readUint32();var s=o.readBytes(a);return new t({format:"legacy",algorithm:e,signature:s})};t.fromSshSignature=function(e,r,i){if(i===void 0){i={}}var n={format:"ssh-signature",algorithm:e,signature:r,version:i.version||1,publicKey:i.publicKey?i.publicKey.getBlob().keyData:undefined,namespace:i.namespace||"file",reserved:i.reserved||"",hashAlgorithm:i.hashAlgorithm||"sha512"};return new t(n)};t.sign=function(e,r,i){return __awaiter(this,arguments,void 0,(function(e,r,i,n){var o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g,u,m,C,P,T;if(n===void 0){n={}}return __generator(this,(function(E){switch(E.label){case 0:o=n.format,a=o===void 0?"legacy":o,s=n.namespace,c=s===void 0?"file":s;if(!(a==="legacy"))return[3,2];return[4,r.sign(e,i)];case 1:u=E.sent();p=e||r.keyType;return[2,t.fromLegacy(p,u)];case 2:f=e;d=AlgorithmRegistry.get(f);l=e==="rsa-sha2-256"?"sha256":"sha512";return[4,r.getPublicKey()];case 3:y=E.sent();v=getCrypto();h=l==="sha256"?"SHA-256":"SHA-512";return[4,v.subtle.digest(h,i)];case 4:A=E.sent();_=new Uint8Array(A);S=new SshWriter;S.writeBytes((new TextEncoder).encode("SSHSIG"));S.writeString(c);S.writeString("");S.writeString(l);S.writeUint32(_.length);S.writeBytes(_);g=S.toUint8Array();return[4,r.sign(f,g)];case 5:u=E.sent();m=d.encodeSignature({signature:u,algo:f});C=new SshReader(m);C.readString();P=C.readUint32();T=C.readBytes(P);return[2,t.fromSshSignature(f,T,{namespace:c,hashAlgorithm:l,publicKey:y})]}}))}))};t.TYPE="signature";return t}(SshObject);var SshCertificate$1=(_e=function(e){__extends(t,e);function t(t){var r=e.call(this)||this;r.type=_e.TYPE;r._blob=t;r.data=parseCertificateData(t.keyData);r._validAfter=r.data.validAfter;r._validBefore=r.data.validBefore;r.keyId=r.data.keyId;r.principals=r.data.validPrincipals;r.certType=r.data.type;r.serial=r.data.serial;r.validAfter=new Date(Number(r.data.validAfter)*1e3);r.validBefore=new Date(Number(r.data.validBefore)*1e3);r.publicKey=new SshPublicKey(r.data.publicKey);r.signatureKey=new SshPublicKey(r.data.signatureKey);r.criticalOptions=__assign({},r.data.criticalOptions);r.extensions=__assign({},r.data.extensions);return r}t.fromSSH=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=parse(e);return[2,new _e(t)]}))}))};t.fromBlob=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,new _e(e)]}))}))};t.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,serialize(this._blob)]}))}))};t.prototype.toBlob=function(){return __assign({},this._blob)};Object.defineProperty(t.prototype,"blob",{get:function(){return this.toBlob()},enumerable:false,configurable:true});t.prototype.validate=function(e){if(e===void 0){e=new Date}var t=BigInt(Math.floor(e.getTime()/1e3));var r=this._validAfter;var i=this._validBefore;var n=0xffffffffffffffffn;var o=i===n?t:i;return t>=r&&t<=o};t.prototype.verify=function(e){return __awaiter(this,arguments,void 0,(function(e,t){var r,i,n,o,a;if(t===void 0){t=getCrypto()}return __generator(this,(function(s){switch(s.label){case 0:r=e||this.signatureKey;i=this.getSignedData();n=SshSignature.parse(this.data.signature);o=AlgorithmRegistry.get(n.algorithm);return[4,r.toWebCrypto(t)];case 1:a=s.sent();return[2,o.verify({publicKey:a,signature:n.signature,data:i,crypto:t})]}}))}))};t.prototype.getSignedData=function(){var e=new SshReader(this._blob.keyData);e.readString();e.readBytes(e.readUint32());if(this.data.keyType==="ssh-ed25519"){e.readBytes(e.readUint32())}else if(this.data.keyType==="ssh-rsa"){e.readBytes(e.readUint32());e.readBytes(e.readUint32())}else if(this.data.keyType.startsWith("ecdsa-sha2-")){e.readString();e.readBytes(e.readUint32())}e.readUint64();e.readUint32();e.readBytes(e.readUint32());e.readBytes(e.readUint32());e.readUint64();e.readUint64();e.readBytes(e.readUint32());e.readBytes(e.readUint32());e.readBytes(e.readUint32());e.readBytes(e.readUint32());var t=e.getOffset();return this._blob.keyData.slice(0,t)};return t}(SshObject),_e.TYPE="certificate",_e);var __classPrivateFieldSet=undefined&&undefined.__classPrivateFieldSet||function(e,t,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};var __classPrivateFieldGet=undefined&&undefined.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)};var _SshCertificate_cert;var SshCertificate=function(){function e(e){_SshCertificate_cert.set(this,void 0);var t=parse(e.trim());__classPrivateFieldSet(this,_SshCertificate_cert,new SshCertificate$1(t),"f");this.notBefore=__classPrivateFieldGet(this,_SshCertificate_cert,"f").validAfter;this.notAfter=__classPrivateFieldGet(this,_SshCertificate_cert,"f").validBefore;this.validity=dateDiff(this.notBefore,this.notAfter);this.type=[__classPrivateFieldGet(this,_SshCertificate_cert,"f").blob.type,__classPrivateFieldGet(this,_SshCertificate_cert,"f").certType,__classPrivateFieldGet(this,_SshCertificate_cert,"f").type].join(" ");this.serialNumber=__classPrivateFieldGet(this,_SshCertificate_cert,"f").serial.toString();this.keyId=__classPrivateFieldGet(this,_SshCertificate_cert,"f").keyId;this.principals=__classPrivateFieldGet(this,_SshCertificate_cert,"f").principals;this.extensions=__classPrivateFieldGet(this,_SshCertificate_cert,"f").extensions;this.criticalOptions=__classPrivateFieldGet(this,_SshCertificate_cert,"f").criticalOptions}e.prototype.parseSignatureKey=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,i;var n;return __generator(this,(function(o){switch(o.label){case 0:return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.toWebCrypto()];case 1:e=o.sent();t=__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.getBlob();return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.thumbprint("sha256")];case 2:r=o.sent();i=this;n={algorithm:e.algorithm.name,type:t.type};return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.toSSH()];case 3:i.signatureKey=(n.value=o.sent(),n.thumbprint=buildExports.Convert.ToBase64(r),n);return[2]}}))}))};e.prototype.parsePublicKey=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,i;var n;return __generator(this,(function(o){switch(o.label){case 0:return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.toWebCrypto()];case 1:e=o.sent();t=__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.getBlob();return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.thumbprint("sha256")];case 2:r=o.sent();i=this;n={algorithm:e.algorithm.name,type:t.type};return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.toSSH()];case 3:i.publicKey=(n.value=o.sent(),n.thumbprint=buildExports.Convert.ToBase64(r),n);return[2]}}))}))};e.prototype.toString=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e="pem"}return __generator(this,(function(e){return[2,__classPrivateFieldGet(this,_SshCertificate_cert,"f").toSSH()]}))}))};Object.defineProperty(e.prototype,"commonName",{get:function(){return __classPrivateFieldGet(this,_SshCertificate_cert,"f").principals.join("_")||__classPrivateFieldGet(this,_SshCertificate_cert,"f").keyId||__classPrivateFieldGet(this,_SshCertificate_cert,"f").certType},enumerable:false,configurable:true});e.prototype.downloadAsSSH=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){switch(i.label){case 0:r=(t=Download.certSSH).asSSH;return[4,this.toString()];case 1:r.apply(t,[i.sent(),e||this.commonName]);return[2]}}))}))};return e}();_SshCertificate_cert=new WeakMap;export{OIDs as $,AsnData as A,id_pkcs9_at_extensionRequest as B,Certificate as C,Download as D,ECParameters as E,id_pkcs9_at_unstructuredName as F,id_pkcs9_at_challengePassword as G,id_ValuationRanking as H,InsuranceValue as I,id_InsuranceValue as J,id_WebGDPR as K,id_ActivityDescription as L,id_TypeRelationship as M,Name as N,id_DomainNameTechnicalOperator as O,PemConverter as P,id_DomainNameOwner as Q,RSAPublicKey as R,id_DomainNameLegalRepresentative as S,TypeRelationship as T,UnstructuredName as U,ValuationRanking as V,WebGDPR as W,id_DomainNameBeneficiary as X,CertificationRequest as Y,l10n as Z,dateShort as _,dateDiff as a,id_ce_subjectDirectoryAttributes as a$,OctetString as a0,ByteStream as a1,SignedCertificateTimestamp as a2,Extension$1 as a3,CabforganizationIdentifier as a4,NonStandardKeyDescription as a5,BaseCRLNumber as a6,CRLNumber as a7,SubjectInfoAccessSyntax as a8,TNAuthorizationList as a9,IssuingDistributionPoint as aA,CRLDistributionPoints as aB,CertificatePolicies as aC,CertificateIssuer as aD,BasicConstraints as aE,AuthorityKeyIdentifier as aF,AuthorityInfoAccessSyntax as aG,id_cabforganizationIdentifier as aH,id_ce_keyDescription as aI,id_ce_deltaCRLIndicator as aJ,id_ce_cRLNumber as aK,id_pe_subjectInfoAccess as aL,id_pe_TNAuthList as aM,id_pe_biometricInfo as aN,id_entrust_entrustVersInfo as aO,id_ce_privateKeyUsagePeriod as aP,id_adbe_archiveRevInfo as aQ,id_adbe_timestamp as aR,id_role as aS,id_lei as aT,id_caVersion as aU,id_netscapeCertType as aV,id_netscapeComment as aW,id_enrollCertType as aX,id_certificateTemplate as aY,id_pe_qcStatements as aZ,id_ce_subjectKeyIdentifier as a_,LogotypeExtn as aa,BiometricSyntax as ab,EntrustVersionInfo as ac,PrivateKeyUsagePeriod as ad,ArchiveRevInfo as ae,Timestamp as af,LeiRole as ag,LeiChoice as ah,CaVersion as ai,NetscapeCertType as aj,NetscapeComment as ak,EnrollCertTypeChoice as al,CertificateTemplate as am,QCStatements as an,SubjectKeyIdentifier as ao,SubjectDirectoryAttributes as ap,SubjectAlternativeName as aq,PolicyMappings as ar,PolicyConstraints as as,NameConstraints as at,KeyUsage as au,IssueAlternativeName as av,InvalidityDate as aw,InhibitAnyPolicy as ax,ExtendedKeyUsage as ay,CRLReason as az,buildExports as b,id_ce_subjectAltName as b0,id_ce_policyMappings as b1,id_ce_policyConstraints as b2,id_ce_nameConstraints as b3,id_ce_keyUsage as b4,id_ce_issuerAltName as b5,id_ce_invalidityDate as b6,id_ce_inhibitAnyPolicy as b7,id_ce_extKeyUsage as b8,id_ce_cRLReasons as b9,AsnIntegerArrayBufferConverter as bA,AttestationApplicationId as bB,RootOfTrust as bC,IntegerSet as bD,id_ce_issuingDistributionPoint as ba,id_ce_cRLDistributionPoints as bb,id_ce_certificatePolicies as bc,id_ce_certificateIssuer as bd,id_ce_basicConstraints as be,id_ce_authorityKeyIdentifier as bf,id_pe_authorityInfoAccess as bg,SignedData as bh,EncapsulatedContent as bi,CertificateSet as bj,CertificateChoices as bk,ContentInfo as bl,SshCertificate as bm,Name$1 as bn,OtherName as bo,DisplayText as bp,UserNotice as bq,EDIPartyName as br,__decorate$1 as bs,AsnProp as bt,AsnPropTypes as bu,AsnType as bv,AsnTypeTypes as bw,AsnArray as bx,id_qcs_pkixQCSyntax_v2 as by,SemanticsInformation as bz,certificateRawToBuffer as c,downloadFromBuffer as d,AsnConvert as e,id_rsaEncryption as f,id_composite_key as g,CompositePublicKey as h,id_ecPublicKey as i,id_alg_composite as j,CompositeSignatureValue as k,CompositeParams as l,getCertificateThumbprint as m,AttributeCertificate as n,CertificateList as o,Attribute$1 as p,AsnParser as q,PrivateKeyPossessionStatement as r,ExtensionRequest as s,ChallengePassword as t,ActivityDescription as u,DomainNameTechnicalOperator as v,DomainNameOwner as w,DomainNameLegalRepresentative as x,DomainNameBeneficiary as y,id_at_statementOfPossession as z};
135
- //# sourceMappingURL=ssh_certificate-PCn0WXhQ.js.map
134
+ */var certificateRawToBuffer=function(e){if(PemConverter.isPem(e)){return PemConverter.decode(e)[0]}if(buildExports.Convert.isHex(e)){return buildExports.Convert.FromHex(e)}if(buildExports.Convert.isBase64(e)){return buildExports.Convert.FromBase64(e)}if(buildExports.Convert.isBase64Url(e)){return buildExports.Convert.FromBase64Url(e)}return buildExports.Convert.FromBinary(e)};var getCertificateThumbprint=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(i){r=cryptoProvider.get();if(r.subtle){return[2,r.subtle.digest(e,t)]}return[2,undefined]}))}))};var ACClearAttrs=function(){function e(e){if(e===void 0){e={}}this.acIssuer=new GeneralName;this.acSerial=0;this.attrs=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],ACClearAttrs.prototype,"acIssuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ACClearAttrs.prototype,"acSerial",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],ACClearAttrs.prototype,"attrs",void 0);var AttrSpec_1;var AttrSpec=AttrSpec_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AttrSpec_1.prototype);return r}return t}(AsnArray);AttrSpec=AttrSpec_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.ObjectIdentifier})],AttrSpec);var AAControls=function(){function e(e){if(e===void 0){e={}}this.permitUnSpecified=true;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],AAControls.prototype,"pathLenConstraint",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:0,optional:true})],AAControls.prototype,"permittedAttrs",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:1,optional:true})],AAControls.prototype,"excludedAttrs",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:true})],AAControls.prototype,"permitUnSpecified",void 0);var IssuerSerial=function(){function e(e){if(e===void 0){e={}}this.issuer=new GeneralNames;this.serial=new ArrayBuffer(0);this.issuerUID=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames})],IssuerSerial.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerSerial.prototype,"serial",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],IssuerSerial.prototype,"issuerUID",void 0);var DigestedObjectType;(function(e){e[e["publicKey"]=0]="publicKey";e[e["publicKeyCert"]=1]="publicKeyCert";e[e["otherObjectTypes"]=2]="otherObjectTypes"})(DigestedObjectType||(DigestedObjectType={}));var ObjectDigestInfo=function(){function e(e){if(e===void 0){e={}}this.digestedObjectType=DigestedObjectType.publicKey;this.digestAlgorithm=new AlgorithmIdentifier;this.objectDigest=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],ObjectDigestInfo.prototype,"digestedObjectType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,optional:true})],ObjectDigestInfo.prototype,"otherObjectTypeID",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],ObjectDigestInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],ObjectDigestInfo.prototype,"objectDigest",void 0);var V2Form=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,optional:true})],V2Form.prototype,"issuerName",void 0);__decorate$1([AsnProp({type:IssuerSerial,context:0,implicit:true,optional:true})],V2Form.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,context:1,implicit:true,optional:true})],V2Form.prototype,"objectDigestInfo",void 0);var AttCertIssuer=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,repeated:"sequence"})],AttCertIssuer.prototype,"v1Form",void 0);__decorate$1([AsnProp({type:V2Form,context:0,implicit:true})],AttCertIssuer.prototype,"v2Form",void 0);AttCertIssuer=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AttCertIssuer);var AttCertValidityPeriod=function(){function e(e){if(e===void 0){e={}}this.notBeforeTime=new Date;this.notAfterTime=new Date;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notBeforeTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notAfterTime",void 0);var Holder=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial,implicit:true,context:0,optional:true})],Holder.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:1,optional:true})],Holder.prototype,"entityName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,implicit:true,context:2,optional:true})],Holder.prototype,"objectDigestInfo",void 0);var AttCertVersion;(function(e){e[e["v2"]=1]="v2"})(AttCertVersion||(AttCertVersion={}));var AttributeCertificateInfo=function(){function e(e){if(e===void 0){e={}}this.version=AttCertVersion.v2;this.holder=new Holder;this.issuer=new AttCertIssuer;this.signature=new AlgorithmIdentifier;this.serialNumber=new ArrayBuffer(0);this.attrCertValidityPeriod=new AttCertValidityPeriod;this.attributes=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],AttributeCertificateInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Holder})],AttributeCertificateInfo.prototype,"holder",void 0);__decorate$1([AsnProp({type:AttCertIssuer})],AttributeCertificateInfo.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificateInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],AttributeCertificateInfo.prototype,"serialNumber",void 0);__decorate$1([AsnProp({type:AttCertValidityPeriod})],AttributeCertificateInfo.prototype,"attrCertValidityPeriod",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],AttributeCertificateInfo.prototype,"attributes",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],AttributeCertificateInfo.prototype,"issuerUniqueID",void 0);__decorate$1([AsnProp({type:Extensions,optional:true})],AttributeCertificateInfo.prototype,"extensions",void 0);var AttributeCertificate=function(){function e(e){if(e===void 0){e={}}this.acinfo=new AttributeCertificateInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signatureValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AttributeCertificateInfo})],AttributeCertificate.prototype,"acinfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificate.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],AttributeCertificate.prototype,"signatureValue",void 0);var ClassListFlags;(function(e){e[e["unmarked"]=1]="unmarked";e[e["unclassified"]=2]="unclassified";e[e["restricted"]=4]="restricted";e[e["confidential"]=8]="confidential";e[e["secret"]=16]="secret";e[e["topSecret"]=32]="topSecret"})(ClassListFlags||(ClassListFlags={}));var ClassList=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(BitString);var SecurityCategory=function(){function e(e){if(e===void 0){e={}}this.type="";this.value=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,implicit:true,context:0})],SecurityCategory.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,implicit:true,context:1})],SecurityCategory.prototype,"value",void 0);var Clearance=function(){function e(e){if(e===void 0){e={}}this.policyId="";this.classList=new ClassList(ClassListFlags.unclassified);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Clearance.prototype,"policyId",void 0);__decorate$1([AsnProp({type:ClassList,defaultValue:new ClassList(ClassListFlags.unclassified)})],Clearance.prototype,"classList",void 0);__decorate$1([AsnProp({type:SecurityCategory,repeated:"set"})],Clearance.prototype,"securityCategories",void 0);var IetfAttrSyntaxValueChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],IetfAttrSyntaxValueChoices.prototype,"cotets",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],IetfAttrSyntaxValueChoices.prototype,"oid",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],IetfAttrSyntaxValueChoices.prototype,"string",void 0);var IetfAttrSyntax=function(){function e(e){if(e===void 0){e={}}this.values=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],IetfAttrSyntax.prototype,"policyAuthority",void 0);__decorate$1([AsnProp({type:IetfAttrSyntaxValueChoices,repeated:"sequence"})],IetfAttrSyntax.prototype,"values",void 0);var Targets_1;var TargetCert=function(){function e(e){if(e===void 0){e={}}this.targetCertificate=new IssuerSerial;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial})],TargetCert.prototype,"targetCertificate",void 0);__decorate$1([AsnProp({type:GeneralName,optional:true})],TargetCert.prototype,"targetName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,optional:true})],TargetCert.prototype,"certDigestInfo",void 0);var Target=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0,implicit:true})],Target.prototype,"targetName",void 0);__decorate$1([AsnProp({type:GeneralName,context:1,implicit:true})],Target.prototype,"targetGroup",void 0);__decorate$1([AsnProp({type:TargetCert,context:2,implicit:true})],Target.prototype,"targetCert",void 0);Target=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Target);var Targets=Targets_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Targets_1.prototype);return r}return t}(AsnArray);Targets=Targets_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Target})],Targets);var ProxyInfo_1;var ProxyInfo=ProxyInfo_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ProxyInfo_1.prototype);return r}return t}(AsnArray);ProxyInfo=ProxyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Targets})],ProxyInfo);var RoleSyntax=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],RoleSyntax.prototype,"roleAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,implicit:true,context:1})],RoleSyntax.prototype,"roleName",void 0);var SvceAuthInfo=function(){function e(e){if(e===void 0){e={}}this.service=new GeneralName;this.ident=new GeneralName;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"service",void 0);__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"ident",void 0);__decorate$1([AsnProp({type:OctetString,optional:true})],SvceAuthInfo.prototype,"authInfo",void 0);var id_ntQWAC="0.4.0.9496";var id_ActivityDescription="".concat(id_ntQWAC,".6");var ActivityDescription=function(){function e(e){if(e===void 0){e={}}this.codeAuthority=new GeneralName;this.codeId=new GeneralName;this.shortName="";this.shortDescription="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],ActivityDescription.prototype,"codeAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],ActivityDescription.prototype,"codeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:2})],ActivityDescription.prototype,"shortName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:3})],ActivityDescription.prototype,"shortDescription",void 0);ActivityDescription=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ActivityDescription);var DomainName=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(Name$1);DomainName=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainName);var id_DomainNameBeneficiary="".concat(id_ntQWAC,".1");var DomainNameBeneficiary=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameBeneficiary=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameBeneficiary);var id_DomainNameLegalRepresentative="".concat(id_ntQWAC,".2");var DomainNameLegalRepresentative=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameLegalRepresentative=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameLegalRepresentative);var id_DomainNameOwner="".concat(id_ntQWAC,".3");var DomainNameOwner=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameOwner=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameOwner);var id_DomainNameTechnicalOperator="".concat(id_ntQWAC,".4");var DomainNameTechnicalOperator=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameTechnicalOperator=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameTechnicalOperator);var id_InsuranceValue="".concat(id_ntQWAC,".8");var InsuranceValue=function(){function e(e){if(e===void 0){e={}}this.location="";this.base=0;this.degree=0;Object.assign(this,e)}e.prototype.toString=function(){return"".concat(this.base," x 10^").concat(this.degree," ").concat(this.location)};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],InsuranceValue.prototype,"location",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"degree",void 0);InsuranceValue=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],InsuranceValue);var id_ValuationRanking="".concat(id_ntQWAC,".9");var ValuationRanking=function(){function e(e){if(e===void 0){e={}}this.stars5=0;this.stars4=0;this.stars3=0;this.stars2=0;this.stars1=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars5",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars4",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars3",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars1",void 0);ValuationRanking=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ValuationRanking);var id_TypeRelationship="".concat(id_ntQWAC,".5");var TypeRelationship=function(){function e(e){if(e===void 0){e={}}this.DNBvsDNO=new BitString(0);this.DNBvsDNT=new BitString(0);this.DNOvsDNT=new BitString(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:BitString,context:0})],TypeRelationship.prototype,"DNBvsDNO",void 0);__decorate$1([AsnProp({type:BitString,context:1})],TypeRelationship.prototype,"DNBvsDNT",void 0);__decorate$1([AsnProp({type:BitString,context:2})],TypeRelationship.prototype,"DNOvsDNT",void 0);TypeRelationship=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],TypeRelationship);var id_WebGDPR="".concat(id_ntQWAC,".7");var WebGDPR=function(){function e(e){if(e===void 0){e={}}this.assessmentAuthority=new GeneralName;this.assessmentRef=new GeneralName;this.assessmentLocation=new GeneralName;this.dataStorageTerritory="";this.description="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],WebGDPR.prototype,"assessmentAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],WebGDPR.prototype,"assessmentRef",void 0);__decorate$1([AsnProp({type:GeneralName,context:2})],WebGDPR.prototype,"assessmentLocation",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString,context:3})],WebGDPR.prototype,"dataStorageTerritory",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:4})],WebGDPR.prototype,"description",void 0);WebGDPR=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],WebGDPR);var IssuerAndSerialNumber=function(){function e(e){if(e===void 0){e={}}this.issuer=new Name$1;this.serialNumber=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Name$1})],IssuerAndSerialNumber.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerAndSerialNumber.prototype,"serialNumber",void 0);var SignerIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],SignerIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],SignerIdentifier.prototype,"issuerAndSerialNumber",void 0);SignerIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SignerIdentifier);var CMSVersion;(function(e){e[e["v0"]=0]="v0";e[e["v1"]=1]="v1";e[e["v2"]=2]="v2";e[e["v3"]=3]="v3";e[e["v4"]=4]="v4";e[e["v5"]=5]="v5"})(CMSVersion||(CMSVersion={}));var DigestAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);DigestAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DigestAlgorithmIdentifier);var SignatureAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SignatureAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SignatureAlgorithmIdentifier);var KeyEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyEncryptionAlgorithmIdentifier);var ContentEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);ContentEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ContentEncryptionAlgorithmIdentifier);var MessageAuthenticationCodeAlgorithm=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);MessageAuthenticationCodeAlgorithm=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],MessageAuthenticationCodeAlgorithm);var KeyDerivationAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyDerivationAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyDerivationAlgorithmIdentifier);var Attribute=function(){function e(e){if(e===void 0){e={}}this.attrType="";this.attrValues=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Attribute.prototype,"attrType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],Attribute.prototype,"attrValues",void 0);var SignerInfos_1;var SignerInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.sid=new SignerIdentifier;this.digestAlgorithm=new DigestAlgorithmIdentifier;this.signatureAlgorithm=new SignatureAlgorithmIdentifier;this.signature=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignerInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:SignerIdentifier})],SignerInfo.prototype,"sid",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifier})],SignerInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:0,implicit:true,optional:true})],SignerInfo.prototype,"signedAttrs",void 0);__decorate$1([AsnProp({type:SignatureAlgorithmIdentifier})],SignerInfo.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],SignerInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:1,implicit:true,optional:true})],SignerInfo.prototype,"unsignedAttrs",void 0);var SignerInfos=SignerInfos_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SignerInfos_1.prototype);return r}return t}(AsnArray);SignerInfos=SignerInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:SignerInfo})],SignerInfos);var SigningTime$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime$1=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime$1);var CounterSignature$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature$1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature$1);var CertificateSet_1;var OtherCertificateFormat=function(){function e(e){if(e===void 0){e={}}this.otherCertFormat="";this.otherCert=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherCertificateFormat.prototype,"otherCertFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherCertificateFormat.prototype,"otherCert",void 0);var CertificateChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Certificate})],CertificateChoices.prototype,"certificate",void 0);__decorate$1([AsnProp({type:AttributeCertificate,context:2,implicit:true})],CertificateChoices.prototype,"v2AttrCert",void 0);__decorate$1([AsnProp({type:OtherCertificateFormat,context:3,implicit:true})],CertificateChoices.prototype,"other",void 0);CertificateChoices=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CertificateChoices);var CertificateSet=CertificateSet_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CertificateSet_1.prototype);return r}return t}(AsnArray);CertificateSet=CertificateSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:CertificateChoices})],CertificateSet);var ContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.content=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],ContentInfo.prototype,"content",void 0);var EncapsulatedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],EncapsulatedContent.prototype,"single",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],EncapsulatedContent.prototype,"any",void 0);EncapsulatedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncapsulatedContent);var EncapsulatedContentInfo=function(){function e(e){if(e===void 0){e={}}this.eContentType="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncapsulatedContentInfo.prototype,"eContentType",void 0);__decorate$1([AsnProp({type:EncapsulatedContent,context:0,optional:true})],EncapsulatedContentInfo.prototype,"eContent",void 0);var EncryptedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString,context:0,implicit:true,optional:true})],EncryptedContent.prototype,"value",void 0);__decorate$1([AsnProp({type:OctetString,converter:AsnConstructedOctetStringConverter,context:0,implicit:true,optional:true,repeated:"sequence"})],EncryptedContent.prototype,"constructedValue",void 0);EncryptedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncryptedContent);var EncryptedContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.contentEncryptionAlgorithm=new ContentEncryptionAlgorithmIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncryptedContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:ContentEncryptionAlgorithmIdentifier})],EncryptedContentInfo.prototype,"contentEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:EncryptedContent,optional:true})],EncryptedContentInfo.prototype,"encryptedContent",void 0);var OtherKeyAttribute=function(){function e(e){if(e===void 0){e={}}this.keyAttrId="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherKeyAttribute.prototype,"keyAttrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],OtherKeyAttribute.prototype,"keyAttr",void 0);var RecipientEncryptedKeys_1;var RecipientKeyIdentifier=function(){function e(e){if(e===void 0){e={}}this.subjectKeyIdentifier=new SubjectKeyIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier})],RecipientKeyIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],RecipientKeyIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],RecipientKeyIdentifier.prototype,"other",void 0);var KeyAgreeRecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:RecipientKeyIdentifier,context:0,implicit:true,optional:true})],KeyAgreeRecipientIdentifier.prototype,"rKeyId",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],KeyAgreeRecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);KeyAgreeRecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],KeyAgreeRecipientIdentifier);var RecipientEncryptedKey=function(){function e(e){if(e===void 0){e={}}this.rid=new KeyAgreeRecipientIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyAgreeRecipientIdentifier})],RecipientEncryptedKey.prototype,"rid",void 0);__decorate$1([AsnProp({type:OctetString})],RecipientEncryptedKey.prototype,"encryptedKey",void 0);var RecipientEncryptedKeys=RecipientEncryptedKeys_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RecipientEncryptedKeys_1.prototype);return r}return t}(AsnArray);RecipientEncryptedKeys=RecipientEncryptedKeys_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:RecipientEncryptedKey})],RecipientEncryptedKeys);var OriginatorPublicKey=function(){function e(e){if(e===void 0){e={}}this.algorithm=new AlgorithmIdentifier;this.publicKey=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],OriginatorPublicKey.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],OriginatorPublicKey.prototype,"publicKey",void 0);var OriginatorIdentifierOrKey=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:OriginatorPublicKey,context:1,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"originatorKey",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],OriginatorIdentifierOrKey.prototype,"issuerAndSerialNumber",void 0);OriginatorIdentifierOrKey=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],OriginatorIdentifierOrKey);var KeyAgreeRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v3;this.originator=new OriginatorIdentifierOrKey;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.recipientEncryptedKeys=new RecipientEncryptedKeys;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyAgreeRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorIdentifierOrKey,context:0})],KeyAgreeRecipientInfo.prototype,"originator",void 0);__decorate$1([AsnProp({type:OctetString,context:1,optional:true})],KeyAgreeRecipientInfo.prototype,"ukm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyAgreeRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:RecipientEncryptedKeys})],KeyAgreeRecipientInfo.prototype,"recipientEncryptedKeys",void 0);var RecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],RecipientIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],RecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);RecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientIdentifier);var KeyTransRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.rid=new RecipientIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyTransRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:RecipientIdentifier})],KeyTransRecipientInfo.prototype,"rid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyTransRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KeyTransRecipientInfo.prototype,"encryptedKey",void 0);var KEKIdentifier=function(){function e(e){if(e===void 0){e={}}this.keyIdentifier=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],KEKIdentifier.prototype,"keyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],KEKIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],KEKIdentifier.prototype,"other",void 0);var KEKRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v4;this.kekid=new KEKIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KEKRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KEKIdentifier})],KEKRecipientInfo.prototype,"kekid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KEKRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KEKRecipientInfo.prototype,"encryptedKey",void 0);var PasswordRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PasswordRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KeyDerivationAlgorithmIdentifier,context:0,optional:true})],PasswordRecipientInfo.prototype,"keyDerivationAlgorithm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],PasswordRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],PasswordRecipientInfo.prototype,"encryptedKey",void 0);var OtherRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.oriType="";this.oriValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRecipientInfo.prototype,"oriType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRecipientInfo.prototype,"oriValue",void 0);var RecipientInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyTransRecipientInfo,optional:true})],RecipientInfo.prototype,"ktri",void 0);__decorate$1([AsnProp({type:KeyAgreeRecipientInfo,context:1,implicit:true,optional:true})],RecipientInfo.prototype,"kari",void 0);__decorate$1([AsnProp({type:KEKRecipientInfo,context:2,implicit:true,optional:true})],RecipientInfo.prototype,"kekri",void 0);__decorate$1([AsnProp({type:PasswordRecipientInfo,context:3,implicit:true,optional:true})],RecipientInfo.prototype,"pwri",void 0);__decorate$1([AsnProp({type:OtherRecipientInfo,context:4,implicit:true,optional:true})],RecipientInfo.prototype,"ori",void 0);RecipientInfo=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientInfo);var RecipientInfos_1;var RecipientInfos=RecipientInfos_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RecipientInfos_1.prototype);return r}return t}(AsnArray);RecipientInfos=RecipientInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RecipientInfo})],RecipientInfos);var RevocationInfoChoices_1;var OtherRevocationInfoFormat=function(){function e(e){if(e===void 0){e={}}this.otherRevInfoFormat="";this.otherRevInfo=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRevocationInfoFormat.prototype,"otherRevInfoFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRevocationInfoFormat.prototype,"otherRevInfo",void 0);var RevocationInfoChoice=function(){function e(e){if(e===void 0){e={}}this.other=new OtherRevocationInfoFormat;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OtherRevocationInfoFormat,context:1,implicit:true})],RevocationInfoChoice.prototype,"other",void 0);RevocationInfoChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RevocationInfoChoice);var RevocationInfoChoices=RevocationInfoChoices_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RevocationInfoChoices_1.prototype);return r}return t}(AsnArray);RevocationInfoChoices=RevocationInfoChoices_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RevocationInfoChoice})],RevocationInfoChoices);var OriginatorInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],OriginatorInfo.prototype,"certs",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],OriginatorInfo.prototype,"crls",void 0);var UnprotectedAttributes_1;var UnprotectedAttributes=UnprotectedAttributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,UnprotectedAttributes_1.prototype);return r}return t}(AsnArray);UnprotectedAttributes=UnprotectedAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],UnprotectedAttributes);var EnvelopedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.recipientInfos=new RecipientInfos;this.encryptedContentInfo=new EncryptedContentInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],EnvelopedData.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorInfo,context:0,implicit:true,optional:true})],EnvelopedData.prototype,"originatorInfo",void 0);__decorate$1([AsnProp({type:RecipientInfos})],EnvelopedData.prototype,"recipientInfos",void 0);__decorate$1([AsnProp({type:EncryptedContentInfo})],EnvelopedData.prototype,"encryptedContentInfo",void 0);__decorate$1([AsnProp({type:UnprotectedAttributes,context:1,implicit:true,optional:true})],EnvelopedData.prototype,"unprotectedAttrs",void 0);var DigestAlgorithmIdentifiers_1;var DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,DigestAlgorithmIdentifiers_1.prototype);return r}return t}(AsnArray);DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:DigestAlgorithmIdentifier})],DigestAlgorithmIdentifiers);var SignedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.digestAlgorithms=new DigestAlgorithmIdentifiers;this.encapContentInfo=new EncapsulatedContentInfo;this.signerInfos=new SignerInfos;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignedData.prototype,"version",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifiers})],SignedData.prototype,"digestAlgorithms",void 0);__decorate$1([AsnProp({type:EncapsulatedContentInfo})],SignedData.prototype,"encapContentInfo",void 0);__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],SignedData.prototype,"certificates",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],SignedData.prototype,"crls",void 0);__decorate$1([AsnProp({type:SignerInfos})],SignedData.prototype,"signerInfos",void 0);var PKCS12AttrSet_1;var PKCS12Attribute=function(){function e(e){if(e===void 0){e={}}this.attrId="";this.attrValues=[];Object.assign(e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PKCS12Attribute.prototype,"attrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],PKCS12Attribute.prototype,"attrValues",void 0);var PKCS12AttrSet=PKCS12AttrSet_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,PKCS12AttrSet_1.prototype);return r}return t}(AsnArray);PKCS12AttrSet=PKCS12AttrSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PKCS12Attribute})],PKCS12AttrSet);var AuthenticatedSafe_1;var AuthenticatedSafe=AuthenticatedSafe_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AuthenticatedSafe_1.prototype);return r}return t}(AsnArray);AuthenticatedSafe=AuthenticatedSafe_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:ContentInfo})],AuthenticatedSafe);var CertBag=function(){function e(e){if(e===void 0){e={}}this.certId="";this.certValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CertBag.prototype,"certId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CertBag.prototype,"certValue",void 0);var CRLBag=function(){function e(e){if(e===void 0){e={}}this.crlId="";this.crltValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CRLBag.prototype,"crlId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CRLBag.prototype,"crltValue",void 0);var KeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PrivateKeyInfo$1);KeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyBag);var PKCS8ShroudedKeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);PKCS8ShroudedKeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PKCS8ShroudedKeyBag);var SecretBag=function(){function e(e){if(e===void 0){e={}}this.secretTypeId="";this.secretValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SecretBag.prototype,"secretTypeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SecretBag.prototype,"secretValue",void 0);var MacData=function(){function e(e){if(e===void 0){e={}}this.mac=new DigestInfo;this.macSalt=new OctetString;this.iterations=1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DigestInfo})],MacData.prototype,"mac",void 0);__decorate$1([AsnProp({type:OctetString})],MacData.prototype,"macSalt",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,defaultValue:1})],MacData.prototype,"iterations",void 0);var PFX=function(){function e(e){if(e===void 0){e={}}this.version=3;this.authSafe=new ContentInfo;this.macData=new MacData;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PFX.prototype,"version",void 0);__decorate$1([AsnProp({type:ContentInfo})],PFX.prototype,"authSafe",void 0);__decorate$1([AsnProp({type:MacData,optional:true})],PFX.prototype,"macData",void 0);var SafeContents_1;var SafeBag=function(){function e(e){if(e===void 0){e={}}this.bagId="";this.bagValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SafeBag.prototype,"bagId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SafeBag.prototype,"bagValue",void 0);__decorate$1([AsnProp({type:PKCS12Attribute,repeated:"set",optional:true})],SafeBag.prototype,"bagAttributes",void 0);var SafeContents=SafeContents_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SafeContents_1.prototype);return r}return t}(AsnArray);SafeContents=SafeContents_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SafeBag})],SafeContents);var ExtensionRequest_1,ExtendedCertificateAttributes_1,SMIMECapabilities_1;var id_pkcs9="1.2.840.113549.1.9";var id_pkcs9_at_unstructuredName="".concat(id_pkcs9,".2");var id_pkcs9_at_challengePassword="".concat(id_pkcs9,".7");var id_pkcs9_at_extensionRequest="".concat(id_pkcs9,".14");var PKCS9String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}return e.call(this,t)||this}t.prototype.toString=function(){return this.ia5String||e.prototype.toString.call(this)};return t}(DirectoryString);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],PKCS9String.prototype,"ia5String",void 0);PKCS9String=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PKCS9String);var Pkcs7PDU=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ContentInfo);Pkcs7PDU=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Pkcs7PDU);var UserPKCS12=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PFX);UserPKCS12=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],UserPKCS12);var EncryptedPrivateKeyInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);EncryptedPrivateKeyInfo=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],EncryptedPrivateKeyInfo);var EmailAddress=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],EmailAddress.prototype,"value",void 0);EmailAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EmailAddress);var UnstructuredName=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PKCS9String);UnstructuredName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredName);var UnstructuredAddress=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);UnstructuredAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredAddress);var DateOfBirth=function(){function e(e){if(e===void 0){e=new Date}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],DateOfBirth.prototype,"value",void 0);DateOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DateOfBirth);var PlaceOfBirth=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);PlaceOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PlaceOfBirth);var Gender=function(){function e(e){if(e===void 0){e="M"}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],Gender.prototype,"value",void 0);Gender=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Gender);var CountryOfCitizenship=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],CountryOfCitizenship.prototype,"value",void 0);CountryOfCitizenship=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfCitizenship);var CountryOfResidence=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(CountryOfCitizenship);CountryOfResidence=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfResidence);var Pseudonym=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);Pseudonym=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Pseudonym);var ContentType=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentType.prototype,"value",void 0);ContentType=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ContentType);var SigningTime=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime);var SequenceNumber=function(){function e(e){if(e===void 0){e=0}this.value=e}e.prototype.toString=function(){return this.value.toString()};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SequenceNumber.prototype,"value",void 0);SequenceNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SequenceNumber);var CounterSignature=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature);var ChallengePassword=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);ChallengePassword=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ChallengePassword);var ExtensionRequest=ExtensionRequest_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ExtensionRequest_1.prototype);return r}return t}(Extensions);ExtensionRequest=ExtensionRequest_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ExtensionRequest);var ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ExtendedCertificateAttributes_1.prototype);return r}return t}(AsnArray);ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],ExtendedCertificateAttributes);var FriendlyName=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],FriendlyName.prototype,"value",void 0);FriendlyName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],FriendlyName);var SMIMECapability=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SMIMECapability=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SMIMECapability);var SMIMECapabilities=SMIMECapabilities_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SMIMECapabilities_1.prototype);return r}return t}(AsnArray);SMIMECapabilities=SMIMECapabilities_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SMIMECapability})],SMIMECapabilities);var id_at_statementOfPossession="1.3.6.1.4.1.22112.2.1";var PrivateKeyPossessionStatement=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerAndSerialNumber})],PrivateKeyPossessionStatement.prototype,"signer",void 0);__decorate$1([AsnProp({type:Certificate,optional:true})],PrivateKeyPossessionStatement.prototype,"cert",void 0);PrivateKeyPossessionStatement=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PrivateKeyPossessionStatement);var Attributes_1;var Attributes=Attributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Attributes_1.prototype);return r}return t}(AsnArray);Attributes=Attributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],Attributes);var CertificationRequestInfo=function(){function e(e){if(e===void 0){e={}}this.version=0;this.subject=new Name$1;this.subjectPKInfo=new SubjectPublicKeyInfo;this.attributes=new Attributes;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificationRequestInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Name$1})],CertificationRequestInfo.prototype,"subject",void 0);__decorate$1([AsnProp({type:SubjectPublicKeyInfo})],CertificationRequestInfo.prototype,"subjectPKInfo",void 0);__decorate$1([AsnProp({type:Attributes,implicit:true,context:0})],CertificationRequestInfo.prototype,"attributes",void 0);var CertificationRequest=function(){function e(e){if(e===void 0){e={}}this.certificationRequestInfo=new CertificationRequestInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificationRequestInfo})],CertificationRequest.prototype,"certificationRequestInfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],CertificationRequest.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CertificationRequest.prototype,"signature",void 0);var globalCrypto=globalThis.crypto;function getCrypto(){return globalCrypto}var SshError=function(e){__extends(t,e);function t(t,r){var i=e.call(this,t)||this;i.code=r;i.name=i.constructor.name;if(Error.captureStackTrace){Error.captureStackTrace(i,i.constructor)}return i}return t}(Error);var UnsupportedAlgorithmError=function(e){__extends(t,e);function t(t,r){var i=r?" Supported: ".concat(r.join(", ")):"";return e.call(this,"Unsupported algorithm: ".concat(t,".").concat(i),"UNSUPPORTED_ALGORITHM")||this}return t}(SshError);var InvalidFormatError=function(e){__extends(t,e);function t(t,r){var i=r?" Expected: ".concat(r):"";return e.call(this,"Invalid format: ".concat(t,".").concat(i),"INVALID_FORMAT")||this}return t}(SshError);var UnsupportedKeyTypeError=function(e){__extends(t,e);function t(t,r){var i=r?" Supported: ".concat(r.join(", ")):"";return e.call(this,"Unsupported key type: ".concat(t,".").concat(i),"UNSUPPORTED_KEY_TYPE")||this}return t}(SshError);var InvalidPrivateKeyFormatError=function(e){__extends(t,e);function t(t){var r=t?"Invalid SSH private key format: ".concat(t):"Invalid SSH private key format";return e.call(this,r,"INVALID_PRIVATE_KEY_FORMAT")||this}return t}(SshError);var EncryptedKeyNotSupportedError=function(e){__extends(t,e);function t(t){var r=t?"Encrypted SSH private keys are not supported (cipher: ".concat(t,")"):"Encrypted SSH private keys are not supported";return e.call(this,r,"ENCRYPTED_KEY_NOT_SUPPORTED")||this}return t}(SshError);var InvalidKeyDataError=function(e){__extends(t,e);function t(t){var r=t?"Invalid key data: ".concat(t):"Invalid key data";return e.call(this,r,"INVALID_KEY_DATA")||this}return t}(SshError);var UnexpectedEOFError=function(e){__extends(t,e);function t(t,r){var i=t!==undefined&&r!==undefined?" Expected ".concat(t," bytes, got ").concat(r):"";return e.call(this,"Unexpected end of data".concat(i),"UNEXPECTED_EOF")||this}return t}(SshError);var encoder=new TextEncoder;var decoder=new TextDecoder;var SshReader=function(){function e(e){this.buffer=e;this.offset=0}e.prototype.readUint8=function(){if(this.offset>=this.buffer.length){throw new UnexpectedEOFError(1,0)}return this.buffer[this.offset++]};e.prototype.readUint32=function(){var e=this.readUint8()<<24|this.readUint8()<<16|this.readUint8()<<8|this.readUint8();return e>>>0};e.prototype.readUint64=function(){var e=this.readUint32();var t=this.readUint32();return BigInt(e)<<32n|BigInt(t)};e.prototype.readBytes=function(e){if(e<0){throw new InvalidFormatError("Invalid length: ".concat(e))}if(this.offset+e>this.buffer.length){throw new UnexpectedEOFError(e,this.buffer.length-this.offset)}var t=this.buffer.subarray(this.offset,this.offset+e);this.offset+=e;return t};e.prototype.readString=function(){var e=this.readUint32();var t=this.readBytes(e);return decoder.decode(t)};e.prototype.peekString=function(e){if(this.offset+e>this.buffer.length){throw new UnexpectedEOFError(e,this.buffer.length-this.offset)}var t=this.buffer.subarray(this.offset,this.offset+e);return decoder.decode(t)};e.prototype.readMpInt=function(e){if(e===void 0){e=false}var t=this.readUint32();var r=this.readBytes(t);if(e&&r.length>1&&r[0]===0){return r.subarray(1)}return r};e.prototype.readMpIntSsh=function(){return this.readMpInt(true)};e.prototype.remaining=function(){return this.buffer.length-this.offset};e.prototype.getOffset=function(){return this.offset};e.prototype.seek=function(e){if(e<0||e>this.buffer.length){throw new InvalidFormatError("Invalid offset: ".concat(e,". Buffer length: ").concat(this.buffer.length))}this.offset=e};return e}();var SshWriter=function(){function e(e){if(e===void 0){e=1024}this.buffer=new Uint8Array(e);this.offset=0}e.prototype.ensureCapacity=function(e){var t=this.offset+e;if(t>this.buffer.length){var r=Math.max(t,this.buffer.length*2);var i=new Uint8Array(r);i.set(this.buffer.subarray(0,this.offset));this.buffer=i}};e.prototype.reserve=function(e){if(e>this.buffer.length){var t=new Uint8Array(e);t.set(this.buffer.subarray(0,this.offset));this.buffer=t}};e.prototype.writeUint8=function(e){this.ensureCapacity(1);this.buffer[this.offset++]=e&255};e.prototype.writeUint32=function(e){this.ensureCapacity(4);this.buffer[this.offset++]=e>>>24&255;this.buffer[this.offset++]=e>>>16&255;this.buffer[this.offset++]=e>>>8&255;this.buffer[this.offset++]=e&255};e.prototype.writeUint64=function(e){this.ensureCapacity(8);var t=Number(e>>32n);var r=Number(e&0xffffffffn);this.writeUint32(t);this.writeUint32(r)};e.prototype.writeBytes=function(e){this.ensureCapacity(e.length);this.buffer.set(e,this.offset);this.offset+=e.length};e.prototype.writeString=function(e){var t=encoder.encode(e);this.writeUint32(t.length);this.writeBytes(t)};e.prototype.writeMpInt=function(e,t){if(t===void 0){t=false}if(t&&e.length>0&&(e[0]&128)!==0){var r=new Uint8Array(e.length+1);r[0]=0;r.set(e,1);this.writeUint32(r.length);this.writeBytes(r)}else{this.writeUint32(e.length);this.writeBytes(e)}};e.prototype.writeMpIntSsh=function(e){this.writeMpInt(e,true)};e.prototype.toUint8Array=function(){return this.buffer.subarray(0,this.offset)};e.prototype.getOffset=function(){return this.offset};e.prototype.seek=function(e){if(e<0||e>this.buffer.length){throw new InvalidFormatError("Invalid offset")}this.offset=e};return e}();var RsaBinding=function(){function e(e){if(e===void 0){e="SHA-256"}this.hash="SHA-256";this.hash=e}e.prototype.importPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){t=e.blob,r=e.crypto;i=new SshReader(t);i.readString();n=i.readMpInt(true);o=i.readMpInt(true);a={kty:"RSA",n:buildExports.Convert.ToBase64Url(o),e:buildExports.Convert.ToBase64Url(n)};return[2,r.subtle.importKey("jwk",a,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};e.prototype.exportPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){switch(s.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("jwk",t)];case 1:i=s.sent();if(!i.n||!i.e){throw new InvalidKeyDataError("RSA JWK missing required parameters (n, e)")}n=buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromBase64Url(i.n));o=buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromBase64Url(i.e));a=new SshWriter;a.writeString("ssh-rsa");a.writeMpInt(o,true);a.writeMpInt(n,true);return[2,a.toUint8Array()]}}))}))};e.prototype.importPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.spki,r=e.crypto;return[2,r.subtle.importKey("spki",t,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};e.prototype.exportPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("spki",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.pkcs8,r=e.crypto;return[2,r.subtle.importKey("pkcs8",t,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};e.prototype.exportPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.privateKey,r=e.crypto;return[4,r.subtle.exportKey("pkcs8",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g,m,C,P,T,E,I,b,w;return __generator(this,(function(D){t=e.sshKey,r=e.crypto;i=t.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=buildExports.Convert.FromBase64(i);o=new SshReader(buildExports.BufferSourceConverter.toUint8Array(n));a=o.readBytes(15);if(buildExports.Convert.ToHex(a)!=="6f70656e7373682d6b65792d763100"){throw new InvalidPrivateKeyFormatError("invalid magic string")}s=o.readString();o.readString();o.readString();if(s!=="none"){throw new EncryptedKeyNotSupportedError(s)}c=o.readUint32();if(c!==1){throw new InvalidPrivateKeyFormatError("multiple keys not supported")}u=o.readUint32();o.readBytes(u);p=o.readUint32();f=o.readBytes(p);d=new SshReader(f);l=d.readUint32();y=d.readUint32();if(l!==y){throw new InvalidPrivateKeyFormatError("invalid checkints")}d.readString();v=d.readMpInt(true);h=d.readMpInt(true);A=d.readMpInt(true);_=d.readMpInt(true);S=d.readMpInt(true);g=d.readMpInt(true);d.readString();m=BigInt("0x"+buildExports.Convert.ToHex(A));C=BigInt("0x"+buildExports.Convert.ToHex(S));P=BigInt("0x"+buildExports.Convert.ToHex(g));T=m%(C-1n);E=m%(P-1n);I=buildExports.Convert.FromHex(T.toString(16).padStart(S.length*2,"0"));b=buildExports.Convert.FromHex(E.toString(16).padStart(g.length*2,"0"));w={kty:"RSA",n:buildExports.Convert.ToBase64Url(v),e:buildExports.Convert.ToBase64Url(h),d:buildExports.Convert.ToBase64Url(A),p:buildExports.Convert.ToBase64Url(S),q:buildExports.Convert.ToBase64Url(g),dp:buildExports.Convert.ToBase64Url(I),dq:buildExports.Convert.ToBase64Url(b),qi:buildExports.Convert.ToBase64Url(_)};return[2,r.subtle.importKey("jwk",w,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};e.prototype.exportPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d;return __generator(this,(function(l){switch(l.label){case 0:t=e.privateKey,r=e.crypto,i=e.jwk;o=i;if(o)return[3,2];return[4,r.subtle.exportKey("jwk",t)];case 1:o=l.sent();l.label=2;case 2:n=o;if(!n.n||!n.e||!n.d||!n.p||!n.q){throw new InvalidKeyDataError("RSA JWK missing required parameters")}a=new Uint8Array(buildExports.Convert.FromBase64Url(n.n));s=new Uint8Array(buildExports.Convert.FromBase64Url(n.e));c=new Uint8Array(buildExports.Convert.FromBase64Url(n.d));u=new Uint8Array(buildExports.Convert.FromBase64Url(n.p));p=new Uint8Array(buildExports.Convert.FromBase64Url(n.q));f=n.qi?new Uint8Array(buildExports.Convert.FromBase64Url(n.qi)):new Uint8Array;d=new SshWriter;d.writeString("ssh-rsa");d.writeMpInt(a,true);d.writeMpInt(s,true);d.writeMpInt(c,true);d.writeMpInt(f,true);d.writeMpInt(u,true);d.writeMpInt(p,true);return[2,d.toUint8Array()]}}))}))};e.prototype.sign=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:t=e.privateKey,r=e.data,i=e.crypto,n=e.hash;if(n&&n!==this.hash){throw new InvalidKeyDataError("Hash ".concat(n," not supported for this RSA algorithm"))}if(!t.extractable){throw new InvalidKeyDataError("Private key is not extractable")}return[4,this.exportPrivatePkcs8({privateKey:t,crypto:i})];case 1:o=c.sent();return[4,this.importPrivatePkcs8({pkcs8:new Uint8Array(o),crypto:i})];case 2:a=c.sent();return[4,i.subtle.sign("RSASSA-PKCS1-v1_5",a,r)];case 3:s=c.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(s)]}}))}))};e.prototype.verify=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:t=e.publicKey,r=e.signature,i=e.data,n=e.crypto,o=e.hash;if(o&&o!==this.hash){return[2,false]}if(!t.extractable){throw new InvalidKeyDataError("Public key is not extractable")}return[4,this.exportPublicSpki({publicKey:t,crypto:n})];case 1:a=c.sent();return[4,this.importPublicSpki({spki:new Uint8Array(a),crypto:n})];case 2:s=c.sent();return[2,n.subtle.verify("RSASSA-PKCS1-v1_5",s,r,i)]}}))}))};e.prototype.encodeSignature=function(e){var t=e.signature,r=e.algo;var i=new SshWriter;i.writeString(r);i.writeUint32(t.byteLength);i.writeBytes(t);return i.toUint8Array()};e.prototype.decodeSignature=function(e){var t=e.signature;var r=new SshReader(t);var i=r.readString();var n=r.readUint32();var o=r.readBytes(n);return{signature:o,algo:i}};e.prototype.supportsCryptoKey=function(e){return e.algorithm.name==="RSASSA-PKCS1-v1_5"};e.prototype.parsePublicKey=function(e){var t=e.readBytes(e.readUint32());var r=e.readBytes(e.readUint32());var i=new SshWriter;i.writeString("ssh-rsa");i.writeMpInt(t);i.writeMpInt(r);return{type:"ssh-rsa",keyData:i.toUint8Array()}};e.prototype.writePublicKey=function(e,t){var r=new SshReader(t.keyData);r.readString();var i=r.readMpInt();var n=r.readMpInt();e.writeUint32(i.length);e.writeBytes(i);e.writeUint32(n.length);e.writeBytes(n)};e.prototype.getCertificateType=function(){return"ssh-rsa-cert-v01@openssh.com"};e.prototype.getSignatureAlgo=function(){return this.hash==="SHA-256"?"rsa-sha2-256":"rsa-sha2-512"};return e}();var EcdsaBinding=function(){function e(e,t,r){this.curveName=e;this.sshType=t;this.namedCurve=r}e.prototype.getHashAlgorithm=function(){switch(this.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:return"SHA-256"}};e.prototype.getExpectedLength=function(){switch(this.namedCurve){case"P-256":return 32;case"P-384":return 48;case"P-521":return 66;default:return 32}};e.prototype.getSignatureCoordLength=function(){return this.getExpectedLength()};e.prototype.importPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){t=e.blob,r=e.crypto;i=new SshReader(t);i.readString();n=i.readString();if(n!==this.curveName){throw new InvalidKeyDataError("ECDSA curve name ".concat(n,", expected ").concat(this.curveName))}o=i.readMpInt();a=Math.floor((o.length-1)/2);s={kty:"EC",crv:this.namedCurve,x:buildExports.Convert.ToBase64Url(o.slice(1,1+a)),y:buildExports.Convert.ToBase64Url(o.slice(1+a))};return[2,r.subtle.importKey("jwk",s,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};e.prototype.exportPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("jwk",t)];case 1:i=c.sent();if(!i.x||!i.y){throw new InvalidKeyDataError("ECDSA JWK missing x or y parameters")}n=new Uint8Array(buildExports.Convert.FromBase64Url(i.x));o=new Uint8Array(buildExports.Convert.FromBase64Url(i.y));a=new Uint8Array(1+n.length+o.length);a[0]=4;a.set(n,1);a.set(o,1+n.length);s=new SshWriter;s.writeString(this.sshType);s.writeString(this.curveName);s.writeMpInt(a);return[2,s.toUint8Array()]}}))}))};e.prototype.importPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.spki,r=e.crypto;return[2,r.subtle.importKey("spki",t,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};e.prototype.exportPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("spki",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.pkcs8,r=e.crypto;return[2,r.subtle.importKey("pkcs8",t,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};e.prototype.exportPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.privateKey,r=e.crypto;return[4,r.subtle.exportKey("pkcs8",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.exportPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p;return __generator(this,(function(f){switch(f.label){case 0:t=e.privateKey,r=e.crypto,i=e.jwk;o=i;if(o)return[3,2];return[4,r.subtle.exportKey("jwk",t)];case 1:o=f.sent();f.label=2;case 2:n=o;if(!n.d||!n.x||!n.y){throw new InvalidKeyDataError("ECDSA private key JWK missing required parameters")}a=new Uint8Array(buildExports.Convert.FromBase64Url(n.x));s=new Uint8Array(buildExports.Convert.FromBase64Url(n.y));c=new Uint8Array(buildExports.Convert.FromBase64Url(n.d));u=new Uint8Array(1+a.length+s.length);u[0]=4;u.set(a,1);u.set(s,1+a.length);p=new SshWriter;p.writeString(this.sshType);p.writeString(this.curveName);p.writeMpInt(u);p.writeMpInt(c);return[2,p.toUint8Array()]}}))}))};e.prototype.importPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g;return __generator(this,(function(m){t=e.sshKey,r=e.crypto;i=t.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=buildExports.Convert.FromBase64(i);o=new SshReader(buildExports.BufferSourceConverter.toUint8Array(n));a=o.readBytes(15);if(buildExports.Convert.ToHex(a)!=="6f70656e7373682d6b65792d763100"){throw new InvalidPrivateKeyFormatError("invalid magic string")}s=o.readString();o.readString();o.readString();if(s!=="none"){throw new EncryptedKeyNotSupportedError(s)}c=o.readUint32();if(c!==1){throw new InvalidPrivateKeyFormatError("multiple keys not supported")}u=o.readUint32();o.readBytes(u);p=o.readUint32();f=o.readBytes(p);d=new SshReader(f);l=d.readUint32();y=d.readUint32();if(l!==y){throw new InvalidPrivateKeyFormatError("invalid checkints")}d.readString();d.readString();v=d.readMpInt();h=d.readMpInt();d.readString();if(v[0]!==4){throw new InvalidKeyDataError("invalid ECDSA public key point format")}A=Math.floor((v.length-1)/2);_=v.slice(1,1+A);S=v.slice(1+A);g={kty:"EC",crv:this.namedCurve,x:buildExports.Convert.ToBase64Url(_),y:buildExports.Convert.ToBase64Url(S),d:buildExports.Convert.ToBase64Url(h)};return[2,r.subtle.importKey("jwk",g,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};e.prototype.sign=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){switch(s.label){case 0:t=e.privateKey,r=e.data,i=e.crypto,n=e.hash;o=this.getHashAlgorithm();if(n&&n!==o){throw new InvalidKeyDataError("ECDSA ".concat(this.namedCurve," requires ").concat(o,", got ").concat(n))}return[4,i.subtle.sign({name:"ECDSA",hash:o},t,r)];case 1:a=s.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(a)]}}))}))};e.prototype.verify=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a;return __generator(this,(function(s){t=e.publicKey,r=e.signature,i=e.data,n=e.crypto,o=e.hash;a=this.getHashAlgorithm();if(o&&o!==a){throw new InvalidKeyDataError("ECDSA ".concat(this.namedCurve," requires ").concat(a,", got ").concat(o))}return[2,n.subtle.verify({name:"ECDSA",hash:a},t,r,i)]}))}))};e.prototype.encodeSignature=function(e){var t=e.signature,r=e.algo;if(r.startsWith("ecdsa-sha2-")){var i=this.getSignatureCoordLength();var n=t.subarray(0,i);var o=t.subarray(i);var a=new SshWriter;a.writeString(r);var s=new SshWriter;s.writeMpInt(n,true);s.writeMpInt(o,true);var c=s.toUint8Array();a.writeUint32(c.length);a.writeBytes(c);return a.toUint8Array()}var u=new SshWriter;u.writeString(r);u.writeUint32(t.byteLength);u.writeBytes(t);return u.toUint8Array()};e.prototype.decodeSignature=function(e){var t=e.signature;var r=new SshReader(t);var i=r.readString();var n=r.readUint32();var o=r.readBytes(n);if(i.startsWith("ecdsa-sha2-")){var a=new SshReader(o);var s=a.readMpInt();var c=a.readMpInt();if(s[0]===0&&s.length>1&&(s[1]&128)===0){s=s.slice(1)}if(c[0]===0&&c.length>1&&(c[1]&128)===0){c=c.slice(1)}var u=this.getExpectedLength();var p=new Uint8Array(u);var f=new Uint8Array(u);if(s.length<=u){p.set(s,u-s.length)}else{p.set(s.slice(s.length-u),0)}if(c.length<=u){f.set(c,u-c.length)}else{f.set(c.slice(c.length-u),0)}var d=new Uint8Array(__spreadArray(__spreadArray([],p,true),f,true));return{signature:d,algo:i}}return{signature:o,algo:i}};e.prototype.supportsCryptoKey=function(e){return e.algorithm.name==="ECDSA"&&e.algorithm.namedCurve===this.namedCurve};e.prototype.parsePublicKey=function(e){var t=e.readString();if(t!==this.curveName){throw new InvalidKeyDataError("ECDSA certificate curve name ".concat(t,", expected ").concat(this.curveName))}var r=e.readBytes(e.readUint32());var i=new SshWriter;i.writeString(this.sshType);i.writeString(t);i.writeMpInt(r);return{type:this.sshType,keyData:i.toUint8Array()}};e.prototype.writePublicKey=function(e,t){var r=new SshReader(t.keyData);r.readString();var i=r.readString();var n=r.readMpInt();e.writeString(i);e.writeUint32(n.length);e.writeBytes(n)};e.prototype.getCertificateType=function(){return"".concat(this.sshType,"-cert-v01@openssh.com")};e.prototype.getSignatureAlgo=function(){return this.sshType};return e}();var EcdsaP256Binding=new EcdsaBinding("nistp256","ecdsa-sha2-nistp256","P-256");var EcdsaP384Binding=new EcdsaBinding("nistp384","ecdsa-sha2-nistp384","P-384");var EcdsaP521Binding=new EcdsaBinding("nistp521","ecdsa-sha2-nistp521","P-521");var Ed25519Binding=function(){function e(){}e.prototype.importPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o;return __generator(this,(function(a){t=e.blob,r=e.crypto;i=new SshReader(t);i.readString();n=i.readUint32();if(n!==32){throw new InvalidKeyDataError("Ed25519 key length ".concat(n,", expected 32"))}o=i.readBytes(n);return[2,r.subtle.importKey("raw",o,"Ed25519",true,["verify"])]}))}))};e.prototype.exportPublicSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o;return __generator(this,(function(a){switch(a.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("jwk",t)];case 1:i=a.sent();if(!i.x){throw new InvalidKeyDataError("Ed25519 JWK missing x parameter")}n=new Uint8Array(buildExports.Convert.FromBase64Url(i.x));o=new SshWriter;o.writeString("ssh-ed25519");o.writeUint32(n.length);o.writeBytes(n);return[2,o.toUint8Array()]}}))}))};e.prototype.importPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.spki,r=e.crypto;return[2,r.subtle.importKey("spki",t,"Ed25519",true,["verify"])]}))}))};e.prototype.exportPublicSpki=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.publicKey,r=e.crypto;return[4,r.subtle.exportKey("spki",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.importPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){t=e.pkcs8,r=e.crypto;return[2,r.subtle.importKey("pkcs8",t,"Ed25519",true,["sign"])]}))}))};e.prototype.exportPrivatePkcs8=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(n){switch(n.label){case 0:t=e.privateKey,r=e.crypto;return[4,r.subtle.exportKey("pkcs8",t)];case 1:i=n.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(i)]}}))}))};e.prototype.exportPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u;return __generator(this,(function(p){switch(p.label){case 0:t=e.privateKey,r=e.crypto,i=e.jwk;o=i;if(o)return[3,2];return[4,r.subtle.exportKey("jwk",t)];case 1:o=p.sent();p.label=2;case 2:n=o;if(!n.d||!n.x){throw new InvalidKeyDataError("Ed25519 private key JWK missing required parameters")}a=new Uint8Array(buildExports.Convert.FromBase64Url(n.d));s=new Uint8Array(buildExports.Convert.FromBase64Url(n.x));c=new SshWriter;c.writeString("ssh-ed25519");c.writeUint32(s.length);c.writeBytes(s);u=new Uint8Array(64);u.set(a,0);u.set(s,32);c.writeUint32(u.length);c.writeBytes(u);return[2,c.toUint8Array()]}}))}))};e.prototype.importPrivateSsh=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g;return __generator(this,(function(m){t=e.sshKey,r=e.crypto;i=t.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=buildExports.Convert.FromBase64(i);o=new SshReader(buildExports.BufferSourceConverter.toUint8Array(n));a=o.readBytes(15);if(buildExports.Convert.ToHex(a)!=="6f70656e7373682d6b65792d763100"){throw new InvalidPrivateKeyFormatError("invalid magic string")}s=o.readString();o.readString();o.readString();if(s!=="none"){throw new EncryptedKeyNotSupportedError(s)}c=o.readUint32();if(c!==1){throw new InvalidPrivateKeyFormatError("multiple keys not supported")}u=o.readUint32();o.readBytes(u);p=o.readUint32();f=o.readBytes(p);d=new SshReader(f);l=d.readUint32();y=d.readUint32();if(l!==y){throw new InvalidPrivateKeyFormatError("invalid checkints")}d.readString();v=d.readUint32();h=d.readBytes(v);A=d.readUint32();_=d.readBytes(A);d.readString();S=_.slice(0,32);g={kty:"OKP",crv:"Ed25519",d:buildExports.Convert.ToBase64Url(S),x:buildExports.Convert.ToBase64Url(h)};return[2,r.subtle.importKey("jwk",g,"Ed25519",true,["sign"])]}))}))};e.prototype.sign=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n;return __generator(this,(function(o){switch(o.label){case 0:t=e.privateKey,r=e.data,i=e.crypto;return[4,i.subtle.sign("Ed25519",t,r)];case 1:n=o.sent();return[2,buildExports.BufferSourceConverter.toUint8Array(n)]}}))}))};e.prototype.verify=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,n;return __generator(this,(function(o){t=e.publicKey,r=e.signature,i=e.data,n=e.crypto;return[2,n.subtle.verify("Ed25519",t,r,i)]}))}))};e.prototype.encodeSignature=function(e){var t=e.signature,r=e.algo;var i=new Uint8Array(t);var n=new SshWriter;n.writeString(r);n.writeUint32(i.length);n.writeBytes(i);return n.toUint8Array()};e.prototype.decodeSignature=function(e){var t=e.signature;var r=new SshReader(t);var i=r.readString();var n=r.readUint32();var o=r.readBytes(n);return{signature:o,algo:i}};e.prototype.supportsCryptoKey=function(e){return e.algorithm.name==="Ed25519"};e.prototype.parsePublicKey=function(e){var t=e.readBytes(e.readUint32());var r=new SshWriter;r.writeString("ssh-ed25519");r.writeUint32(t.length);r.writeBytes(t);return{type:"ssh-ed25519",keyData:r.toUint8Array()}};e.prototype.writePublicKey=function(e,t){var r=new SshReader(t.keyData);r.readString();var i=r.readUint32();var n=r.readBytes(i);e.writeUint32(n.length);e.writeBytes(n)};e.prototype.getCertificateType=function(){return"ssh-ed25519-cert-v01@openssh.com"};e.prototype.getSignatureAlgo=function(){return"ssh-ed25519"};return e}();var registry=new Map;var AlgorithmRegistry=function(){function e(){}e.get=function(e){var t=registry.get(e);if(!t){throw new UnsupportedKeyTypeError(e,Array.from(registry.keys()))}return t};e.register=function(e,t){registry.set(e,t)};e.getSshTypeFromCryptoKey=function(e){for(var t=0,r=registry.entries();t<r.length;t++){var i=r[t],n=i[0],o=i[1];if(o.supportsCryptoKey(e)){return n}}throw new UnsupportedKeyTypeError(e.algorithm.name,Array.from(registry.keys()))};e.certTypeToKeyType=function(e){var t={"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"};return t[e]};e.getSupportedCertTypes=function(){return Object.keys({"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"})};return e}();AlgorithmRegistry.register("ssh-ed25519",new Ed25519Binding);AlgorithmRegistry.register("ssh-rsa",new RsaBinding("SHA-256"));AlgorithmRegistry.register("rsa-sha2-256",new RsaBinding("SHA-256"));AlgorithmRegistry.register("rsa-sha2-512",new RsaBinding("SHA-512"));AlgorithmRegistry.register("ecdsa-sha2-nistp256",EcdsaP256Binding);AlgorithmRegistry.register("ecdsa-sha2-nistp384",EcdsaP384Binding);AlgorithmRegistry.register("ecdsa-sha2-nistp521",EcdsaP521Binding);function parsePublicKey(e){var t=typeof e==="string"?e.trim().split(/\s+/):null;if(!t||t.length<2){throw new InvalidFormatError("Invalid SSH public key format")}var r=t[0];var i=new Uint8Array(buildExports.Convert.FromBase64(t[1]));var n=t.length>2?t.slice(2).join(" "):undefined;var o=new SshReader(i);var a=o.readString();if(a!==r){throw new InvalidFormatError("Key type mismatch")}return{type:r,keyData:i,comment:n}}function serializePublicKey(e){var t=buildExports.Convert.ToBase64(e.keyData);var r=[e.type,t];if(e.comment){r.push(e.comment)}return r.join(" ")}function parse(e){if(typeof e==="string"){var t=e.trim().split(/\s+/);if(t.length<2){throw new InvalidFormatError("SSH certificate string","type base64 [comment]")}var r=t[0];var i=new Uint8Array(buildExports.Convert.FromBase64(t[1]));var n=t.length>2?t.slice(2).join(" "):undefined;var o=new SshReader(i);var a=o.readString();if(a!==r){throw new InvalidFormatError("certificate blob type ".concat(a),"expected ".concat(r))}return{type:r,keyData:i,comment:n}}else{var o=new SshReader(e);var s=o.readString();var c=e.slice(o.getOffset());return{type:s,keyData:c}}}function parseCertificateData(e){var t=new SshReader(e);var r=t.readString();var i=t.readBytes(t.readUint32());var n=AlgorithmRegistry.certTypeToKeyType(r);if(!n){throw new UnsupportedAlgorithmError(r,AlgorithmRegistry.getSupportedCertTypes())}var o=AlgorithmRegistry.get(n);var a=o.parsePublicKey(t);var s=n;var c=t.readUint64();var u=t.readUint32();var p=u===1?"user":"host";var f=t.readString();var d=t.readUint32();var l=t.readBytes(d);var y=[];if(l.length>0){var v=new SshReader(l);while(v.getOffset()<l.length){try{var h=v.readString();y.push(h)}catch(e){break}}}var A=t.readUint64();var _=t.readUint64();var S={};var g=t.readUint32();var m=t.readBytes(g);if(m.length>0){var C=new SshReader(m);while(C.getOffset()<m.length){try{var P=C.readString();var T=C.readBytes(C.readUint32());var E=T.length===0?"":decoder.decode(T);S[P]=E}catch(e){break}}}var I={};var b=t.readUint32();var w=t.readBytes(b);if(w.length>0){var D=new SshReader(w);while(D.getOffset()<w.length){try{var B=D.readString();var T=D.readBytes(D.readUint32());var R=T.length===0?"":decoder.decode(T);I[B]=R}catch(e){break}}}var $=t.readUint32();var x=t.readBytes($);var N=t.readUint32();var O=t.readBytes(N);var K=new SshReader(O);var k=K.readString();var L={type:k,keyData:O};var M=t.readUint32();var V=t.readBytes(M);return{nonce:i,keyType:s,publicKey:a,serial:c,type:p,keyId:f,validPrincipals:y,validAfter:A,validBefore:_,criticalOptions:S,extensions:I,reserved:x,signatureKey:L,signature:V}}function serialize(e){var t=buildExports.Convert.ToBase64(e.keyData);var r=[e.type,t];if(e.comment){r.push(e.comment)}return r.join(" ")}function parseSignature(e){var t=new SshReader(e);if(e.length>=6&&(new TextDecoder).decode(e.subarray(0,6))==="SSHSIG"){return parseSshSignatureFormat(t)}else{return parseLegacyFormat(t)}}function parseSshSignatureFormat(e){var t=e.readBytes(6);var r=(new TextDecoder).decode(t);if(r!=="SSHSIG"){throw new InvalidFormatError(r,"SSHSIG")}var i=e.readUint32();var n=e.readUint32();var o=e.readBytes(n);var a=e.readString();var s=e.readString();var c=e.readString();var u=e.readUint32();var p=e.readBytes(u);var f=new SshReader(p);var d=f.readString();var l=f.readUint32();var y=f.readBytes(l);return{format:"ssh-signature",algorithm:d,signature:y,version:i,publicKey:o,namespace:a,reserved:s,hashAlgorithm:c}}function parseLegacyFormat(e){var t=e.readString();var r=e.readUint32();var i=e.readBytes(r);return{format:"legacy",algorithm:t,signature:i}}function serializeSignature(e){if(e.format==="ssh-signature"){return serializeSshSignatureFormat(e)}else{return serializeLegacyFormat(e)}}function serializeSshSignatureFormat(e){var t=new SshWriter;t.writeBytes((new TextEncoder).encode("SSHSIG"));t.writeUint32(e.version||1);if(e.publicKey){t.writeUint32(e.publicKey.length);t.writeBytes(e.publicKey)}else{t.writeUint32(0)}t.writeString(e.namespace||"file");t.writeString(e.reserved||"");t.writeString(e.hashAlgorithm||"sha512");var r=new SshWriter;r.writeString(e.algorithm);r.writeUint32(e.signature.length);r.writeBytes(e.signature);var i=r.toUint8Array();t.writeUint32(i.length);t.writeBytes(i);return t.toUint8Array()}function serializeLegacyFormat(e){var t=new SshWriter;t.writeString(e.algorithm);t.writeUint32(e.signature.length);t.writeBytes(e.signature);return t.toUint8Array()}var SshObject=function(){function e(){}return e}();var SshPublicKey=function(e){__extends(t,e);function t(r){var i=e.call(this)||this;i.type=t.TYPE;i.blob=r;return i}t.prototype.getCryptoKey=function(){return __awaiter(this,arguments,void 0,(function(e){var t,r;if(e===void 0){e=getCrypto()}return __generator(this,(function(i){switch(i.label){case 0:if(!!this.cachedCryptoKey)return[3,2];t=AlgorithmRegistry.get(this.blob.type);r=this;return[4,t.importPublicSsh({blob:this.blob.keyData,crypto:e})];case 1:r.cachedCryptoKey=i.sent();i.label=2;case 2:return[2,this.cachedCryptoKey]}}))}))};t.fromSSH=function(e){return __awaiter(this,arguments,void 0,(function(e,r){var i,n;if(r===void 0){r=getCrypto()}return __generator(this,(function(o){switch(o.label){case 0:i=parsePublicKey(e);n=AlgorithmRegistry.get(i.type);return[4,n.importPublicSsh({blob:i.keyData,crypto:r})];case 1:o.sent();return[2,new t(i)]}}))}))};t.fromSPKI=function(e,r){return __awaiter(this,arguments,void 0,(function(e,r,i){var n,o,a,s;if(i===void 0){i=getCrypto()}return __generator(this,(function(c){switch(c.label){case 0:n=AlgorithmRegistry.get(r);return[4,n.importPublicSpki({spki:e,crypto:i})];case 1:o=c.sent();return[4,n.exportPublicSsh({publicKey:o,crypto:i})];case 2:a=c.sent();s={type:r,keyData:a};return[2,new t(s)]}}))}))};t.fromWebCrypto=function(e,r){return __awaiter(this,arguments,void 0,(function(e,r,i){var n,o,a,s;if(i===void 0){i=getCrypto()}return __generator(this,(function(c){switch(c.label){case 0:n=r||AlgorithmRegistry.getSshTypeFromCryptoKey(e);o=AlgorithmRegistry.get(n);return[4,o.exportPublicSsh({publicKey:e,crypto:i})];case 1:a=c.sent();s={type:n,keyData:a};return[2,new t(s)]}}))}))};t.prototype.export=function(){return __awaiter(this,arguments,void 0,(function(e,t){var r,i,n;if(e===void 0){e="ssh"}if(t===void 0){t=getCrypto()}return __generator(this,(function(o){switch(o.label){case 0:if(!(e==="ssh"))return[3,1];return[2,serializePublicKey(this.blob)];case 1:if(!(e==="spki"))return[3,4];return[4,this.getCryptoKey(t)];case 2:r=o.sent();i=AlgorithmRegistry.get(this.blob.type);return[4,i.exportPublicSpki({publicKey:r,crypto:t})];case 3:n=o.sent();return[2,new Uint8Array(n)];case 4:throw new UnsupportedKeyTypeError("Unsupported export format: ".concat(e))}}))}))};t.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.export("ssh")];case 1:e=t.sent();return[2,e]}}))}))};t.prototype.toSPKI=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.export("spki")];case 1:e=t.sent();return[2,e]}}))}))};t.prototype.toWebCrypto=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=getCrypto()}return __generator(this,(function(t){return[2,this.getCryptoKey(e)]}))}))};t.prototype.verify=function(e,t,r){return __awaiter(this,arguments,void 0,(function(e,t,r,i){var n,o;if(i===void 0){i=getCrypto()}return __generator(this,(function(a){switch(a.label){case 0:n=AlgorithmRegistry.get(e);return[4,this.toWebCrypto(i)];case 1:o=a.sent();return[2,n.verify({publicKey:o,signature:t,data:r,crypto:i})]}}))}))};Object.defineProperty(t.prototype,"keyType",{get:function(){return this.blob.type},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"comment",{get:function(){return this.blob.comment},enumerable:false,configurable:true});t.prototype.getBlob=function(){return __assign({},this.blob)};t.prototype.thumbprint=function(){return __awaiter(this,arguments,void 0,(function(e,t){var r,i,n;if(e===void 0){e="sha256"}if(t===void 0){t=getCrypto()}return __generator(this,(function(o){switch(o.label){case 0:r=e==="sha256"?"SHA-256":"SHA-512";i=this.blob.keyData;return[4,t.subtle.digest(r,i)];case 1:n=o.sent();return[2,new Uint8Array(n)]}}))}))};t.TYPE="public-key";return t}(SshObject);var SshSignature=function(e){__extends(t,e);function t(r){var i=e.call(this)||this;i.type=t.TYPE;i.blob=r;i.format=r.format;i.algorithm=r.algorithm;i.signature=r.signature;i.version=r.version;i.namespace=r.namespace;i.reserved=r.reserved;i.hashAlgorithm=r.hashAlgorithm;if(r.publicKey){var n=new SshReader(r.publicKey);var o=n.readString();i.publicKey=new SshPublicKey({type:o,keyData:r.publicKey})}return i}t.parse=function(e){var r=parseSignature(e);return new t(r)};t.fromBlob=function(e){return new t(e)};t.fromBase64=function(e){var r=new Uint8Array(buildExports.Convert.FromBase64(e));return t.parse(r)};t.fromText=function(e){var r=e.replace(/-----BEGIN SSH SIGNATURE-----/,"").replace(/-----END SSH SIGNATURE-----/,"").replace(/[\r\n\s]/g,"");return t.fromBase64(r)};t.prototype.serialize=function(){return serializeSignature(this.blob)};t.prototype.toBase64=function(){return buildExports.Convert.ToBase64(this.serialize())};t.prototype.toText=function(){var e=this.toBase64();var t=[];for(var r=0;r<e.length;r+=70){t.push(e.substring(r,r+70))}return __spreadArray(__spreadArray(["-----BEGIN SSH SIGNATURE-----"],t,true),["-----END SSH SIGNATURE-----"],false).join("\n")};t.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.toText()]}))}))};t.prototype.verify=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,i,n,o,a,s,c,u,p,f,d,l,y,v,h,A;return __generator(this,(function(_){switch(_.label){case 0:r=AlgorithmRegistry.get(this.algorithm);return[4,t["getCryptoKey"]()];case 1:i=_.sent();n=getCrypto();o=e;if(!(this.format==="ssh-signature"))return[3,3];a=this.hashAlgorithm||"sha512";s=this.namespace||"file";c=this.reserved||"";u=a==="sha256"?"SHA-256":"SHA-512";return[4,n.subtle.digest(u,e)];case 2:p=_.sent();f=new Uint8Array(p);d=new SshWriter;d.writeBytes((new TextEncoder).encode("SSHSIG"));d.writeString(s);d.writeString(c);d.writeString(a);d.writeUint32(f.length);d.writeBytes(f);o=d.toUint8Array();_.label=3;case 3:if(this.algorithm==="rsa-sha2-256"){l="SHA-256"}else if(this.algorithm==="rsa-sha2-512"){l="SHA-512"}if(this.format==="legacy"||this.format==="ssh-signature"){v=new SshWriter;v.writeString(this.algorithm);v.writeUint32(this.signature.length);v.writeBytes(this.signature);h=v.toUint8Array();A=r.decodeSignature({signature:h});y=A.signature}else{y=this.signature}return[2,r.verify({publicKey:i,signature:y,data:o,crypto:n,hash:l})]}}))}))};t.fromLegacy=function(e,r){var i=AlgorithmRegistry.get(e);var n=i.encodeSignature({signature:r,algo:e});var o=new SshReader(n);o.readString();var a=o.readUint32();var s=o.readBytes(a);return new t({format:"legacy",algorithm:e,signature:s})};t.fromSshSignature=function(e,r,i){if(i===void 0){i={}}var n={format:"ssh-signature",algorithm:e,signature:r,version:i.version||1,publicKey:i.publicKey?i.publicKey.getBlob().keyData:undefined,namespace:i.namespace||"file",reserved:i.reserved||"",hashAlgorithm:i.hashAlgorithm||"sha512"};return new t(n)};t.sign=function(e,r,i){return __awaiter(this,arguments,void 0,(function(e,r,i,n){var o,a,s,c,u,p,f,d,l,y,v,h,A,_,S,g,u,m,C,P,T;if(n===void 0){n={}}return __generator(this,(function(E){switch(E.label){case 0:o=n.format,a=o===void 0?"legacy":o,s=n.namespace,c=s===void 0?"file":s;if(!(a==="legacy"))return[3,2];return[4,r.sign(e,i)];case 1:u=E.sent();p=e||r.keyType;return[2,t.fromLegacy(p,u)];case 2:f=e;d=AlgorithmRegistry.get(f);l=e==="rsa-sha2-256"?"sha256":"sha512";return[4,r.getPublicKey()];case 3:y=E.sent();v=getCrypto();h=l==="sha256"?"SHA-256":"SHA-512";return[4,v.subtle.digest(h,i)];case 4:A=E.sent();_=new Uint8Array(A);S=new SshWriter;S.writeBytes((new TextEncoder).encode("SSHSIG"));S.writeString(c);S.writeString("");S.writeString(l);S.writeUint32(_.length);S.writeBytes(_);g=S.toUint8Array();return[4,r.sign(f,g)];case 5:u=E.sent();m=d.encodeSignature({signature:u,algo:f});C=new SshReader(m);C.readString();P=C.readUint32();T=C.readBytes(P);return[2,t.fromSshSignature(f,T,{namespace:c,hashAlgorithm:l,publicKey:y})]}}))}))};t.TYPE="signature";return t}(SshObject);var SshCertificate$1=(_e=function(e){__extends(t,e);function t(t){var r=e.call(this)||this;r.type=_e.TYPE;r._blob=t;r.data=parseCertificateData(t.keyData);r._validAfter=r.data.validAfter;r._validBefore=r.data.validBefore;r.keyId=r.data.keyId;r.principals=r.data.validPrincipals;r.certType=r.data.type;r.serial=r.data.serial;r.validAfter=new Date(Number(r.data.validAfter)*1e3);r.validBefore=new Date(Number(r.data.validBefore)*1e3);r.publicKey=new SshPublicKey(r.data.publicKey);r.signatureKey=new SshPublicKey(r.data.signatureKey);r.criticalOptions=__assign({},r.data.criticalOptions);r.extensions=__assign({},r.data.extensions);return r}t.fromSSH=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=parse(e);return[2,new _e(t)]}))}))};t.fromBlob=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,new _e(e)]}))}))};t.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,serialize(this._blob)]}))}))};t.prototype.toBlob=function(){return __assign({},this._blob)};Object.defineProperty(t.prototype,"blob",{get:function(){return this.toBlob()},enumerable:false,configurable:true});t.prototype.validate=function(e){if(e===void 0){e=new Date}var t=BigInt(Math.floor(e.getTime()/1e3));var r=this._validAfter;var i=this._validBefore;var n=0xffffffffffffffffn;var o=i===n?t:i;return t>=r&&t<=o};t.prototype.verify=function(e){return __awaiter(this,arguments,void 0,(function(e,t){var r,i,n,o,a;if(t===void 0){t=getCrypto()}return __generator(this,(function(s){switch(s.label){case 0:r=e||this.signatureKey;i=this.getSignedData();n=SshSignature.parse(this.data.signature);o=AlgorithmRegistry.get(n.algorithm);return[4,r.toWebCrypto(t)];case 1:a=s.sent();return[2,o.verify({publicKey:a,signature:n.signature,data:i,crypto:t})]}}))}))};t.prototype.getSignedData=function(){var e=new SshReader(this._blob.keyData);e.readString();e.readBytes(e.readUint32());if(this.data.keyType==="ssh-ed25519"){e.readBytes(e.readUint32())}else if(this.data.keyType==="ssh-rsa"){e.readBytes(e.readUint32());e.readBytes(e.readUint32())}else if(this.data.keyType.startsWith("ecdsa-sha2-")){e.readString();e.readBytes(e.readUint32())}e.readUint64();e.readUint32();e.readBytes(e.readUint32());e.readBytes(e.readUint32());e.readUint64();e.readUint64();e.readBytes(e.readUint32());e.readBytes(e.readUint32());e.readBytes(e.readUint32());e.readBytes(e.readUint32());var t=e.getOffset();return this._blob.keyData.slice(0,t)};return t}(SshObject),_e.TYPE="certificate",_e);var __classPrivateFieldSet=undefined&&undefined.__classPrivateFieldSet||function(e,t,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};var __classPrivateFieldGet=undefined&&undefined.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)};var _SshCertificate_cert;var SshCertificate=function(){function e(e){_SshCertificate_cert.set(this,void 0);var t=parse(e.trim());__classPrivateFieldSet(this,_SshCertificate_cert,new SshCertificate$1(t),"f");this.notBefore=__classPrivateFieldGet(this,_SshCertificate_cert,"f").validAfter;this.notAfter=__classPrivateFieldGet(this,_SshCertificate_cert,"f").validBefore;this.validity=dateDiff(this.notBefore,this.notAfter);this.type=[__classPrivateFieldGet(this,_SshCertificate_cert,"f").blob.type,__classPrivateFieldGet(this,_SshCertificate_cert,"f").certType,__classPrivateFieldGet(this,_SshCertificate_cert,"f").type].join(" ");this.serialNumber=__classPrivateFieldGet(this,_SshCertificate_cert,"f").serial.toString();this.keyId=__classPrivateFieldGet(this,_SshCertificate_cert,"f").keyId;this.principals=__classPrivateFieldGet(this,_SshCertificate_cert,"f").principals;this.extensions=__classPrivateFieldGet(this,_SshCertificate_cert,"f").extensions;this.criticalOptions=__classPrivateFieldGet(this,_SshCertificate_cert,"f").criticalOptions}e.prototype.parseSignatureKey=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,i;var n;return __generator(this,(function(o){switch(o.label){case 0:return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.toWebCrypto()];case 1:e=o.sent();t=__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.getBlob();return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.thumbprint("sha256")];case 2:r=o.sent();i=this;n={algorithm:e.algorithm.name,type:t.type};return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").signatureKey.toSSH()];case 3:i.signatureKey=(n.value=o.sent(),n.thumbprint=buildExports.Convert.ToBase64(r),n);return[2]}}))}))};e.prototype.parsePublicKey=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,i;var n;return __generator(this,(function(o){switch(o.label){case 0:return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.toWebCrypto()];case 1:e=o.sent();t=__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.getBlob();return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.thumbprint("sha256")];case 2:r=o.sent();i=this;n={algorithm:e.algorithm.name,type:t.type};return[4,__classPrivateFieldGet(this,_SshCertificate_cert,"f").publicKey.toSSH()];case 3:i.publicKey=(n.value=o.sent(),n.thumbprint=buildExports.Convert.ToBase64(r),n);return[2]}}))}))};e.prototype.toString=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e="pem"}return __generator(this,(function(e){return[2,__classPrivateFieldGet(this,_SshCertificate_cert,"f").toSSH()]}))}))};Object.defineProperty(e.prototype,"commonName",{get:function(){return __classPrivateFieldGet(this,_SshCertificate_cert,"f").principals.join("_")||__classPrivateFieldGet(this,_SshCertificate_cert,"f").keyId||__classPrivateFieldGet(this,_SshCertificate_cert,"f").certType},enumerable:false,configurable:true});e.prototype.downloadAsPub=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){switch(i.label){case 0:r=(t=Download.certSSH).asPub;return[4,this.toString()];case 1:r.apply(t,[i.sent(),e||[this.commonName,"cert"].join("-")]);return[2]}}))}))};return e}();_SshCertificate_cert=new WeakMap;export{OIDs as $,AsnData as A,id_pkcs9_at_extensionRequest as B,Certificate as C,Download as D,ECParameters as E,id_pkcs9_at_unstructuredName as F,id_pkcs9_at_challengePassword as G,id_ValuationRanking as H,InsuranceValue as I,id_InsuranceValue as J,id_WebGDPR as K,id_ActivityDescription as L,id_TypeRelationship as M,Name as N,id_DomainNameTechnicalOperator as O,PemConverter as P,id_DomainNameOwner as Q,RSAPublicKey as R,id_DomainNameLegalRepresentative as S,TypeRelationship as T,UnstructuredName as U,ValuationRanking as V,WebGDPR as W,id_DomainNameBeneficiary as X,CertificationRequest as Y,l10n as Z,dateShort as _,dateDiff as a,id_ce_subjectDirectoryAttributes as a$,OctetString as a0,ByteStream as a1,SignedCertificateTimestamp as a2,Extension$1 as a3,CabforganizationIdentifier as a4,NonStandardKeyDescription as a5,BaseCRLNumber as a6,CRLNumber as a7,SubjectInfoAccessSyntax as a8,TNAuthorizationList as a9,IssuingDistributionPoint as aA,CRLDistributionPoints as aB,CertificatePolicies as aC,CertificateIssuer as aD,BasicConstraints as aE,AuthorityKeyIdentifier as aF,AuthorityInfoAccessSyntax as aG,id_cabforganizationIdentifier as aH,id_ce_keyDescription as aI,id_ce_deltaCRLIndicator as aJ,id_ce_cRLNumber as aK,id_pe_subjectInfoAccess as aL,id_pe_TNAuthList as aM,id_pe_biometricInfo as aN,id_entrust_entrustVersInfo as aO,id_ce_privateKeyUsagePeriod as aP,id_adbe_archiveRevInfo as aQ,id_adbe_timestamp as aR,id_role as aS,id_lei as aT,id_caVersion as aU,id_netscapeCertType as aV,id_netscapeComment as aW,id_enrollCertType as aX,id_certificateTemplate as aY,id_pe_qcStatements as aZ,id_ce_subjectKeyIdentifier as a_,LogotypeExtn as aa,BiometricSyntax as ab,EntrustVersionInfo as ac,PrivateKeyUsagePeriod as ad,ArchiveRevInfo as ae,Timestamp as af,LeiRole as ag,LeiChoice as ah,CaVersion as ai,NetscapeCertType as aj,NetscapeComment as ak,EnrollCertTypeChoice as al,CertificateTemplate as am,QCStatements as an,SubjectKeyIdentifier as ao,SubjectDirectoryAttributes as ap,SubjectAlternativeName as aq,PolicyMappings as ar,PolicyConstraints as as,NameConstraints as at,KeyUsage as au,IssueAlternativeName as av,InvalidityDate as aw,InhibitAnyPolicy as ax,ExtendedKeyUsage as ay,CRLReason as az,buildExports as b,id_ce_subjectAltName as b0,id_ce_policyMappings as b1,id_ce_policyConstraints as b2,id_ce_nameConstraints as b3,id_ce_keyUsage as b4,id_ce_issuerAltName as b5,id_ce_invalidityDate as b6,id_ce_inhibitAnyPolicy as b7,id_ce_extKeyUsage as b8,id_ce_cRLReasons as b9,AsnIntegerArrayBufferConverter as bA,AttestationApplicationId as bB,RootOfTrust as bC,IntegerSet as bD,id_ce_issuingDistributionPoint as ba,id_ce_cRLDistributionPoints as bb,id_ce_certificatePolicies as bc,id_ce_certificateIssuer as bd,id_ce_basicConstraints as be,id_ce_authorityKeyIdentifier as bf,id_pe_authorityInfoAccess as bg,SignedData as bh,EncapsulatedContent as bi,CertificateSet as bj,CertificateChoices as bk,ContentInfo as bl,SshCertificate as bm,Name$1 as bn,OtherName as bo,DisplayText as bp,UserNotice as bq,EDIPartyName as br,__decorate$1 as bs,AsnProp as bt,AsnPropTypes as bu,AsnType as bv,AsnTypeTypes as bw,AsnArray as bx,id_qcs_pkixQCSyntax_v2 as by,SemanticsInformation as bz,certificateRawToBuffer as c,downloadFromBuffer as d,AsnConvert as e,id_rsaEncryption as f,id_composite_key as g,CompositePublicKey as h,id_ecPublicKey as i,id_alg_composite as j,CompositeSignatureValue as k,CompositeParams as l,getCertificateThumbprint as m,AttributeCertificate as n,CertificateList as o,Attribute$1 as p,AsnParser as q,PrivateKeyPossessionStatement as r,ExtensionRequest as s,ChallengePassword as t,ActivityDescription as u,DomainNameTechnicalOperator as v,DomainNameOwner as w,DomainNameLegalRepresentative as x,DomainNameBeneficiary as y,id_at_statementOfPossession as z};
135
+ //# sourceMappingURL=ssh_certificate-rmToyzuK.js.map