UNPKG

437 kBJavaScriptView Raw
1class e{constructor(e){if(null==e)throw new Error("`crypto` is required");this.crypto=e}getAlgorithm(){return"VEDS512"}generateTokenSignature(e,t){return this.crypto.calculateSignature(e,t)}verifyTokenSignature(e,t,_){return this.crypto.verifySignature(e,t,_)}}class t{constructor(e){if(null==e)throw new Error("`crypto` is required");this.crypto=e}generateSignature(e,t){return this.crypto.calculateSignature(e,t)}verifySignature(e,t,_){return this.crypto.verifySignature(e,t,_)}exportPublicKey(e){return this.crypto.exportPublicKey(e)}importPublicKey(e){return this.crypto.importPublicKey(e)}generateSha512(e){return this.crypto.calculateHash(e)}}class _{constructor(e){if(null==e)throw new Error("`crypto` is required");this.crypto=e}exportPrivateKey(e){return this.crypto.exportPrivateKey(e)}importPrivateKey(e){return this.crypto.importPrivateKey(e)}}var r={exports:{}};!function(e,t){var _,r=(_="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,r,s=e;s.ready=new Promise(((e,_)=>{t=e,r=_}));var n=Object.assign({},s),c=(e,t)=>{throw t},i="";"undefined"!=typeof document&&document.currentScript&&(i=document.currentScript.src),_&&(i=_),i=0!==i.indexOf("blob:")?i.substr(0,i.replace(/[?#].*/,"").lastIndexOf("/")+1):"";var a,o=s.print||console.log.bind(console),l=s.printErr||console.error.bind(console);Object.assign(s,n),n=null,s.quit&&(c=s.quit),s.wasmBinary&&(a=s.wasmBinary),"object"!=typeof WebAssembly&&I("no native wasm support detected");var f,u,d,h,v,p,y,P=!1;function x(){var e=f.buffer;s.HEAP8=d=new Int8Array(e),s.HEAP16=v=new Int16Array(e),s.HEAPU8=h=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAP32=p=new Int32Array(e),s.HEAPU32=y=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e)}var g=[],m=[],E=[];function w(){var e=s.preRun.shift();g.unshift(e)}var b=0,k=null;function I(e){throw s.onAbort?.(e),l(e="Aborted("+e+")"),P=!0,u=1,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),r(e),e}var N,A,C,T=e=>e.startsWith("data:application/octet-stream;base64,");if(!T(N="libfoundation.browser.wasm")){var F=N;N=s.locateFile?s.locateFile(F,i):i+F}function K(e){if(e==N&&a)return new Uint8Array(a);throw"both async and sync fetching of the wasm failed"}function S(e,t,_){return function(e){return a||"function"!=typeof fetch?Promise.resolve().then((()=>K(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>K(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(_,(e=>{l(`failed to asynchronously prepare wasm: ${e}`),I(e)}))}function L(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var R,z=e=>{for(;0<e.length;)e.shift()(s)},B=s.noExitRuntime||!0,U=(e,t)=>{for(var _=0,r=e.length-1;0<=r;r--){var s=e[r];"."===s?e.splice(r,1):".."===s?(e.splice(r,1),_++):_&&(e.splice(r,1),_--)}if(t)for(;_;_--)e.unshift("..");return e},D=e=>{var t="/"===e.charAt(0),_="/"===e.substr(-1);return(e=U(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&_&&(e+="/"),(t?"/":"")+e},Y=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&=t.substr(0,t.length-1),e+t):"."},M=e=>{if("/"===e)return"/";var t=(e=(e=D(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},H=e=>(H=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);I("initRandomDevice")})())(e);function O(){for(var e="",t=!1,_=arguments.length-1;-1<=_&&!t;_--){if("string"!=typeof(t=0<=_?arguments[_]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=U(e.split("/").filter((e=>!!e)),!t).join("/"))||"."}var G="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,V=(e,t)=>{for(var _=t+NaN,r=t;e[r]&&!(r>=_);)++r;if(16<r-t&&e.buffer&&G)return G.decode(e.subarray(t,r));for(_="";t<r;){var s=e[t++];if(128&s){var n=63&e[t++];if(192==(224&s))_+=String.fromCharCode((31&s)<<6|n);else{var c=63&e[t++];65536>(s=224==(240&s)?(15&s)<<12|n<<6|c:(7&s)<<18|n<<12|c<<6|63&e[t++])?_+=String.fromCharCode(s):(s-=65536,_+=String.fromCharCode(55296|s>>10,56320|1023&s))}}else _+=String.fromCharCode(s)}return _},j=[],q=[];function X(e,t){q[e]={input:[],It:[],Mt:t},me(e,W)}var W={open(e){var t=q[e.node.Xt];if(!t)throw new ie(43);e.Gt=t,e.seekable=!1},close(e){e.Gt.Mt.Ut(e.Gt)},Ut(e){e.Gt.Mt.Ut(e.Gt)},read(e,t,_,r){if(!e.Gt||!e.Gt.Mt.fu)throw new ie(60);for(var s=0,n=0;n<r;n++){try{var c=e.Gt.Mt.fu(e.Gt)}catch(e){throw new ie(29)}if(void 0===c&&0===s)throw new ie(6);if(null==c)break;s++,t[_+n]=c}return s&&(e.node.timestamp=Date.now()),s},write(e,t,_,r){if(!e.Gt||!e.Gt.Mt.$t)throw new ie(60);try{for(var s=0;s<r;s++)e.Gt.Mt.$t(e.Gt,t[_+s])}catch(e){throw new ie(29)}return r&&(e.node.timestamp=Date.now()),s}},Z={fu(){e:{if(!j.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e){var t=null;break e}for(var _=t=0;_<e.length;++_){var r=e.charCodeAt(_);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++_):t+=3}var s=(t=Array(t+1)).length;if(_=0,0<s){r=_,s=_+s-1;for(var n=0;n<e.length;++n){var c=e.charCodeAt(n);if(55296<=c&&57343>=c&&(c=65536+((1023&c)<<10)|1023&e.charCodeAt(++n)),127>=c){if(_>=s)break;t[_++]=c}else{if(2047>=c){if(_+1>=s)break;t[_++]=192|c>>6}else{if(65535>=c){if(_+2>=s)break;t[_++]=224|c>>12}else{if(_+3>=s)break;t[_++]=240|c>>18,t[_++]=128|c>>12&63}t[_++]=128|c>>6&63}t[_++]=128|63&c}}t[_]=0,e=_-r}else e=0;t.length=e,j=t}t=j.shift()}return t},$t(e,t){null===t||10===t?(o(V(e.It,0)),e.It=[]):0!=t&&e.It.push(t)},Ut(e){e.It&&0<e.It.length&&(o(V(e.It,0)),e.It=[])},pu:()=>({Bu:25856,Du:5,Au:191,Cu:35387,zu:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),qu:()=>0,ru:()=>[24,80]},$={$t(e,t){null===t||10===t?(l(V(e.It,0)),e.It=[]):0!=t&&e.It.push(t)},Ut(e){e.It&&0<e.It.length&&(l(V(e.It,0)),e.It=[])}};function J(e,t){var _=e.Et?e.Et.length:0;_>=t||(t=Math.max(t,_*(1048576>_?2:1.125)>>>0),0!=_&&(t=Math.max(t,256)),_=e.Et,e.Et=new Uint8Array(t),0<e.Ht&&e.Et.set(_.subarray(0,e.Ht),0))}var Q={Jt:null,Lt:()=>Q.createNode(null,"/",16895,0),createNode(e,t,_,r){if(24576==(61440&_)||4096==(61440&_))throw new ie(63);return Q.Jt||(Q.Jt={dir:{node:{Ot:Q.Dt.Ot,Kt:Q.Dt.Kt,Rt:Q.Dt.Rt,Vt:Q.Dt.Vt,ku:Q.Dt.ku,mu:Q.Dt.mu,lu:Q.Dt.lu,ju:Q.Dt.ju,Yt:Q.Dt.Yt},stream:{Qt:Q.Ft.Qt}},file:{node:{Ot:Q.Dt.Ot,Kt:Q.Dt.Kt},stream:{Qt:Q.Ft.Qt,read:Q.Ft.read,write:Q.Ft.write,bu:Q.Ft.bu,gu:Q.Ft.gu,iu:Q.Ft.iu}},link:{node:{Ot:Q.Dt.Ot,Kt:Q.Dt.Kt,St:Q.Dt.St},stream:{}},cu:{node:{Ot:Q.Dt.Ot,Kt:Q.Dt.Kt},stream:ge}}),16384==(61440&(_=de(e,t,_,r)).mode)?(_.Dt=Q.Jt.dir.node,_.Ft=Q.Jt.dir.stream,_.Et={}):32768==(61440&_.mode)?(_.Dt=Q.Jt.file.node,_.Ft=Q.Jt.file.stream,_.Ht=0,_.Et=null):40960==(61440&_.mode)?(_.Dt=Q.Jt.link.node,_.Ft=Q.Jt.link.stream):8192==(61440&_.mode)&&(_.Dt=Q.Jt.cu.node,_.Ft=Q.Jt.cu.stream),_.timestamp=Date.now(),e&&(e.Et[t]=_,e.timestamp=_.timestamp),_},Gu:e=>e.Et?e.Et.subarray?e.Et.subarray(0,e.Ht):new Uint8Array(e.Et):new Uint8Array(0),Dt:{Ot(e){var t={};return t.Fu=8192==(61440&e.mode)?e.id:1,t.Iu=e.id,t.mode=e.mode,t.Ku=1,t.uid=0,t.Hu=0,t.Xt=e.Xt,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.Ht:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.xu=new Date(e.timestamp),t.Ju=new Date(e.timestamp),t.Eu=new Date(e.timestamp),t.nu=4096,t.yu=Math.ceil(t.size/t.nu),t},Kt(e,t){if(void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&(t=t.size,e.Ht!=t))if(0==t)e.Et=null,e.Ht=0;else{var _=e.Et;e.Et=new Uint8Array(t),_&&e.Et.set(_.subarray(0,Math.min(t,e.Ht))),e.Ht=t}},Rt(){throw ae[44]},Vt:(e,t,_,r)=>Q.createNode(e,t,_,r),ku(e,t,_){if(16384==(61440&e.mode)){try{var r=ue(t,_)}catch(e){}if(r)for(var s in r.Et)throw new ie(55)}delete e.parent.Et[e.name],e.parent.timestamp=Date.now(),e.name=_,t.Et[_]=e,t.timestamp=e.parent.timestamp,e.parent=t},mu(e,t){delete e.Et[t],e.timestamp=Date.now()},lu(e,t){var _,r=ue(e,t);for(_ in r.Et)throw new ie(55);delete e.Et[t],e.timestamp=Date.now()},ju(e){var t,_=[".",".."];for(t of Object.keys(e.Et))_.push(t);return _},Yt:(e,t,_)=>((e=Q.createNode(e,t,41471,0)).link=_,e),St(e){if(40960!=(61440&e.mode))throw new ie(28);return e.link}},Ft:{read(e,t,_,r,s){var n=e.node.Et;if(s>=e.node.Ht)return 0;if(8<(e=Math.min(e.node.Ht-s,r))&&n.subarray)t.set(n.subarray(s,s+e),_);else for(r=0;r<e;r++)t[_+r]=n[s+r];return e},write(e,t,_,r,s,n){if(t.buffer===d.buffer&&(n=!1),!r)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Et||e.Et.subarray)){if(n)return e.Et=t.subarray(_,_+r),e.Ht=r;if(0===e.Ht&&0===s)return e.Et=t.slice(_,_+r),e.Ht=r;if(s+r<=e.Ht)return e.Et.set(t.subarray(_,_+r),s),r}if(J(e,s+r),e.Et.subarray&&t.subarray)e.Et.set(t.subarray(_,_+r),s);else for(n=0;n<r;n++)e.Et[s+n]=t[_+n];return e.Ht=Math.max(e.Ht,s+r),r},Qt(e,t,_){if(1===_?t+=e.position:2===_&&32768==(61440&e.node.mode)&&(t+=e.node.Ht),0>t)throw new ie(28);return t},bu(e,t,_){J(e.node,t+_),e.node.Ht=Math.max(e.node.Ht,t+_)},gu(e,t,_,r,s){if(32768!=(61440&e.node.mode))throw new ie(43);if(e=e.node.Et,2&s||e.buffer!==d.buffer){if((0<_||_+t<e.length)&&(e=e.subarray?e.subarray(_,_+t):Array.prototype.slice.call(e,_,_+t)),_=!0,I(),!(t=void 0))throw new ie(48);d.set(e,t)}else _=!1,t=e.byteOffset;return{Mu:t,wu:_}},iu:(e,t,_,r)=>(Q.Ft.write(e,t,0,r,_,!1),0)}},ee=(e,t)=>{var _=0;return e&&(_|=365),t&&(_|=146),_},te=null,_e={},re=[],se=1,ne=null,ce=!0,ie=null,ae={};function oe(e,t={}){if(!(e=O(e)))return{path:"",node:null};if(8<(t=Object.assign({eu:!0,au:0},t)).au)throw new ie(32);e=e.split("/").filter((e=>!!e));for(var _=te,r="/",s=0;s<e.length;s++){var n=s===e.length-1;if(n&&t.parent)break;if(_=ue(_,e[s]),r=D(r+"/"+e[s]),_.Wt&&(!n||n&&t.eu)&&(_=_.Wt.root),!n||t.du)for(n=0;40960==(61440&_.mode);)if(_=Ne(r),_=oe(r=O(Y(r),_),{au:t.au+1}).node,40<n++)throw new ie(32)}return{path:r,node:_}}function le(e){for(var t;;){if(e===e.parent)return e=e.Lt.hu,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function fe(e,t){for(var _=0,r=0;r<t.length;r++)_=(_<<5)-_+t.charCodeAt(r)|0;return(e+_>>>0)%ne.length}function ue(e,t){var _;if(_=(_=ve(e,"x"))?_:e.Dt.Rt?0:2)throw new ie(_,e);for(_=ne[fe(e.id,t)];_;_=_.tu){var r=_.name;if(_.parent.id===e.id&&r===t)return _}return e.Dt.Rt(e,t)}function de(e,t,_,r){return t=fe((e=new He(e,t,_,r)).parent.id,e.name),e.tu=ne[t],ne[t]=e}function he(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function ve(e,t){return ce?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function pe(e,t){try{return ue(e,t),20}catch(e){}return ve(e,"wx")}function ye(e){if(!(e=re[e]))throw new ie(8);return e}function Pe(e,t=-1){return Se||((Se=function(){this.Tt={}}).prototype={},Object.defineProperties(Se.prototype,{object:{get(){return this.node},set(e){this.node=e}},flags:{get(){return this.Tt.flags},set(e){this.Tt.flags=e}},position:{get(){return this.Tt.position},set(e){this.Tt.position=e}}})),e=Object.assign(new Se,e),-1==t&&(t=function(){for(var e=0;4096>=e;e++)if(!re[e])return e;throw new ie(33)}()),e.Nt=t,re[t]=e}var xe,ge={open(e){e.Ft=_e[e.node.Xt].Ft,e.Ft.open?.(e)},Qt(){throw new ie(70)}};function me(e,t){_e[e]={Ft:t}}function Ee(e,t){var _="/"===t,r=!t;if(_&&te)throw new ie(10);if(!_&&!r){var s=oe(t,{eu:!1});if(t=s.path,(s=s.node).Wt)throw new ie(10);if(16384!=(61440&s.mode))throw new ie(54)}t={type:e,Lu:{},hu:t,su:[]},(e=e.Lt(t)).Lt=t,t.root=e,_?te=e:s&&(s.Wt=t,s.Lt&&s.Lt.su.push(t))}function we(e,t,_){var r=oe(e,{parent:!0}).node;if(!(e=M(e))||"."===e||".."===e)throw new ie(28);var s=pe(r,e);if(s)throw new ie(s);if(!r.Dt.Vt)throw new ie(63);return r.Dt.Vt(r,e,t,_)}function be(e){return we(e,16895,0)}function ke(e,t,_){void 0===_&&(_=t,t=438),we(e,8192|t,_)}function Ie(e,t){if(!O(e))throw new ie(44);var _=oe(t,{parent:!0}).node;if(!_)throw new ie(44);var r=pe(_,t=M(t));if(r)throw new ie(r);if(!_.Dt.Yt)throw new ie(63);_.Dt.Yt(_,t,e)}function Ne(e){if(!(e=oe(e).node))throw new ie(44);if(!e.Dt.St)throw new ie(28);return O(le(e.parent),e.Dt.St(e))}function Ae(e,t,_){if(""===e)throw new ie(44);if("string"==typeof t){var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(void 0===r)throw Error(`Unknown file open mode: ${t}`);t=r}if(_=64&t?4095&(void 0===_?438:_)|32768:0,"object"==typeof e)var n=e;else{e=D(e);try{n=oe(e,{du:!(131072&t)}).node}catch(e){}}if(r=!1,64&t)if(n){if(128&t)throw new ie(20)}else n=we(e,_,0),r=!0;if(!n)throw new ie(44);if(8192==(61440&n.mode)&&(t&=-513),65536&t&&16384!=(61440&n.mode))throw new ie(54);if(!r&&(_=n?40960==(61440&n.mode)?32:16384==(61440&n.mode)&&("r"!==he(t)||512&t)?31:ve(n,he(t)):44))throw new ie(_);if(512&t&&!r){if(!(_="string"==typeof(_=n)?oe(_,{du:!0}).node:_).Dt.Kt)throw new ie(63);if(16384==(61440&_.mode))throw new ie(31);if(32768!=(61440&_.mode))throw new ie(28);if(r=ve(_,"w"))throw new ie(r);_.Dt.Kt(_,{size:0,timestamp:Date.now()})}return t&=-131713,(n=Pe({node:n,path:le(n),flags:t,seekable:!0,position:0,Ft:n.Ft,vu:[],error:!1})).Ft.open&&n.Ft.open(n),!s.logReadFiles||1&t||(Le||={},e in Le||(Le[e]=1)),n}function Ce(e,t,_){if(null===e.Nt)throw new ie(8);if(!e.seekable||!e.Ft.Qt)throw new ie(70);if(0!=_&&1!=_&&2!=_)throw new ie(28);e.position=e.Ft.Qt(e,t,_),e.vu=[]}function Te(){ie||((ie=function(e,t){this.name="ErrnoError",this.node=t,this.uu=function(e){this.Pt=e},this.uu(e),this.message="FS error"}).prototype=Error(),ie.prototype.constructor=ie,[44].forEach((e=>{ae[e]=new ie(e),ae[e].stack="<generic error, no stack>"})))}function Fe(e,t,_){e=D("/dev/"+e);var r=ee(!!t,!!_);Ke||=64;var s=Ke++<<8|0;me(s,{open(e){e.seekable=!1},close(){_?.buffer?.length&&_(10)},read(e,_,r,s){for(var n=0,c=0;c<s;c++){try{var i=t()}catch(e){throw new ie(29)}if(void 0===i&&0===n)throw new ie(6);if(null==i)break;n++,_[r+c]=i}return n&&(e.node.timestamp=Date.now()),n},write(e,t,r,s){for(var n=0;n<s;n++)try{_(t[r+n])}catch(e){throw new ie(29)}return s&&(e.node.timestamp=Date.now()),n}}),ke(e,r,s)}var Ke,Se,Le,Re={},ze=void 0;function Be(){var e=p[+ze>>2];return ze+=4,e}var Ue,De={},Ye=0,Me=e=>{u=e,B||0<Ye||(s.onExit?.(e),P=!0),c(e,new L(e))};function He(e,t,_,r){e||=this,this.parent=e,this.Lt=e.Lt,this.Wt=null,this.id=se++,this.name=t,this.mode=_,this.Dt={},this.Ft={},this.Xt=r}Ue=()=>performance.now(),Object.defineProperties(He.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}}}),Te(),ne=Array(4096),Ee(Q,"/"),be("/tmp"),be("/home"),be("/home/web_user"),function(){be("/dev"),me(259,{read:()=>0,write:(e,t,_,r)=>r}),ke("/dev/null",259),X(1280,Z),X(1536,$),ke("/dev/tty",1280),ke("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,_=()=>(0===t&&(t=H(e).byteLength),e[--t]);Fe("random",_),Fe("urandom",_),be("/dev/shm"),be("/dev/shm/tmp")}(),function(){be("/proc");var e=be("/proc/self");be("/proc/self/fd"),Ee({Lt(){var t=de(e,"fd",16895,73);return t.Dt={Rt(e,t){var _=ye(+t);return(e={parent:null,Lt:{hu:"fake"},Dt:{St:()=>_.path}}).parent=e}},t}},"/proc/self/fd")}();var Oe={f:(e,t)=>R.get(e)(t),c:function(e,t,_){ze=_;try{var r=ye(e);switch(t){case 0:var s=Be();if(0>s)return-28;for(;re[s];)s++;return Pe(r,s).Nt;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:return s=Be(),r.flags|=s,0;case 5:return s=Be(),v[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return p[je()>>2]=28,-1}}catch(e){if(void 0===Re||"ErrnoError"!==e.name)throw e;return-e.Pt}},n:function(e,t,_){ze=_;try{var r=ye(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return r.Gt?0:-59;case 21505:if(!r.Gt)return-59;if(r.Gt.Mt.pu){t=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var s=Be();p[s>>2]=25856,p[s+4>>2]=5,p[s+8>>2]=191,p[s+12>>2]=35387;for(var n=0;32>n;n++)d[s+n+17>>0]=t[n]||0}return 0;case 21506:case 21507:case 21508:if(!r.Gt)return-59;if(r.Gt.Mt.qu)for(s=Be(),t=[],n=0;32>n;n++)t.push(d[s+n+17>>0]);return 0;case 21519:return r.Gt?(s=Be(),p[s>>2]=0):-59;case 21520:return r.Gt?-28:-59;case 21531:if(s=Be(),!r.Ft.ou)throw new ie(59);return r.Ft.ou(r,t,s);case 21523:return r.Gt?(r.Gt.Mt.ru&&(n=[24,80],s=Be(),v[s>>1]=n[0],v[s+2>>1]=n[1]),0):-59;default:return-28}}catch(e){if(void 0===Re||"ErrnoError"!==e.name)throw e;return-e.Pt}},e:function(e,t,_,r){ze=r;try{var s=t=t?V(h,t):"";if("/"===s.charAt(0))t=s;else{var n=-100===e?"/":ye(e).path;if(0==s.length)throw new ie(44);t=D(n+"/"+s)}return Ae(t,_,r?Be():0).Nt}catch(e){if(void 0===Re||"ErrnoError"!==e.name)throw e;return-e.Pt}},h:()=>{B=!1,Ye=0},i:(e,t)=>{if(De[e]&&(clearTimeout(De[e].id),delete De[e]),!t)return 0;var _=setTimeout((()=>{delete De[e],(e=>{if(!P)try{if(e(),!(B||0<Ye))try{u=e=u,Me(e)}catch(e){e instanceof L||"unwind"==e||c(1,e)}}catch(e){e instanceof L||"unwind"==e||c(1,e)}})((()=>qe(e,Ue())))}),t);return De[e]={id:_,Nu:t},0},a:()=>{I("")},j:()=>Date.now(),o:(e,t,_)=>h.copyWithin(e,t,t+_),k:e=>{var t=h.length;if(2147483648<(e>>>=0))return!1;for(var _=1;4>=_;_*=2){var r=t*(1+.2/_);r=Math.min(r,e+100663296);var s=Math;r=Math.max(e,r);e:{s=(s.min.call(s,2147483648,r+(65536-r%65536)%65536)-f.buffer.byteLength+65535)/65536;try{f.grow(s),x();var n=1;break e}catch(e){}n=void 0}if(n)return!0}return!1},b:function(e){try{var t=ye(e);if(null===t.Nt)throw new ie(8);t.Zt&&(t.Zt=null);try{t.Ft.close&&t.Ft.close(t)}catch(e){throw e}finally{re[t.Nt]=null}return t.Nt=null,0}catch(e){if(void 0===Re||"ErrnoError"!==e.name)throw e;return e.Pt}},m:function(e,t,_,r){try{e:{var s=ye(e);e=t;for(var n,c=t=0;c<_;c++){var i=y[e>>2],a=y[e+4>>2];e+=8;var o=s,l=i,f=a,u=n,h=d;if(0>f||0>u)throw new ie(28);if(null===o.Nt)throw new ie(8);if(1==(2097155&o.flags))throw new ie(8);if(16384==(61440&o.node.mode))throw new ie(31);if(!o.Ft.read)throw new ie(28);var v=void 0!==u;if(v){if(!o.seekable)throw new ie(70)}else u=o.position;var p=o.Ft.read(o,h,l,f,u);v||(o.position+=p);var P=p;if(0>P){var x=-1;break e}if(t+=P,P<a)break;void 0!==n&&(n+=P)}x=t}return y[r>>2]=x,0}catch(e){if(void 0===Re||"ErrnoError"!==e.name)throw e;return e.Pt}},l:function(e,t,_,r,s){t=_+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*_:NaN;try{if(isNaN(t))return 61;var n=ye(e);return Ce(n,t,r),C=[n.position>>>0,(A=n.position,1<=+Math.abs(A)?0<A?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],p[s>>2]=C[0],p[s+4>>2]=C[1],n.Zt&&0===t&&0===r&&(n.Zt=null),0}catch(e){if(void 0===Re||"ErrnoError"!==e.name)throw e;return e.Pt}},d:function(e,t,_,r){try{e:{var s=ye(e);e=t;for(var n,c=t=0;c<_;c++){var i=y[e>>2],a=y[e+4>>2];e+=8;var o=s,l=i,f=a,u=n,h=d;if(0>f||0>u)throw new ie(28);if(null===o.Nt)throw new ie(8);if(0==(2097155&o.flags))throw new ie(8);if(16384==(61440&o.node.mode))throw new ie(31);if(!o.Ft.write)throw new ie(28);o.seekable&&1024&o.flags&&Ce(o,0,2);var v=void 0!==u;if(v){if(!o.seekable)throw new ie(70)}else u=o.position;var p=o.Ft.write(o,h,l,f,u,void 0);v||(o.position+=p);var P=p;if(0>P){var x=-1;break e}t+=P,void 0!==n&&(n+=P)}x=t}return y[r>>2]=x,0}catch(e){if(void 0===Re||"ErrnoError"!==e.name)throw e;return e.Pt}},g:Me},Ge=function(){function e(e){return Ge=e.exports,f=Ge.p,x(),R=Ge.Ct,m.unshift(Ge.q),b--,s.monitorRunDependencies?.(b),0==b&&k&&(e=k,k=null,e()),Ge}var t={a:Oe};if(b++,s.monitorRunDependencies?.(b),s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(e){l(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return function(e,t){var _=N;return a||"function"!=typeof WebAssembly.instantiateStreaming||T(_)||"function"!=typeof fetch?S(_,e,t):fetch(_,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,e).then(t,(function(r){return l(`wasm streaming compile failed: ${r}`),l("falling back to ArrayBuffer instantiation"),S(_,e,t)}))))}(t,(function(t){e(t.instance)})).catch(r),{}}();s._vscf_impl_api=(e,t)=>(s._vscf_impl_api=Ge.r)(e,t),s._vscf_impl_tag=e=>(s._vscf_impl_tag=Ge.s)(e),s._vscf_impl_shallow_copy=e=>(s._vscf_impl_shallow_copy=Ge.t)(e),s._vscf_aes256_cbc_alg_id=e=>(s._vscf_aes256_cbc_alg_id=Ge.u)(e),s._vscf_aes256_cbc_produce_alg_info=e=>(s._vscf_aes256_cbc_produce_alg_info=Ge.v)(e),s._vscf_aes256_cbc_restore_alg_info=(e,t)=>(s._vscf_aes256_cbc_restore_alg_info=Ge.w)(e,t),s._vscf_aes256_cbc_set_nonce=(e,t)=>(s._vscf_aes256_cbc_set_nonce=Ge.x)(e,t),s._vscf_aes256_cbc_encrypt=(e,t,_)=>(s._vscf_aes256_cbc_encrypt=Ge.y)(e,t,_),s._vscf_aes256_cbc_start_encryption=e=>(s._vscf_aes256_cbc_start_encryption=Ge.z)(e),s._vscf_aes256_cbc_update=(e,t,_)=>(s._vscf_aes256_cbc_update=Ge.A)(e,t,_),s._vscf_aes256_cbc_finish=(e,t)=>(s._vscf_aes256_cbc_finish=Ge.B)(e,t),s._vscf_aes256_cbc_encrypted_len=(e,t)=>(s._vscf_aes256_cbc_encrypted_len=Ge.C)(e,t),s._vscf_aes256_cbc_precise_encrypted_len=(e,t)=>(s._vscf_aes256_cbc_precise_encrypted_len=Ge.D)(e,t),s._vscf_aes256_cbc_decrypt=(e,t,_)=>(s._vscf_aes256_cbc_decrypt=Ge.E)(e,t,_),s._vscf_aes256_cbc_start_decryption=e=>(s._vscf_aes256_cbc_start_decryption=Ge.F)(e),s._vscf_aes256_cbc_decrypted_len=(e,t)=>(s._vscf_aes256_cbc_decrypted_len=Ge.G)(e,t),s._vscf_aes256_cbc_set_key=(e,t)=>(s._vscf_aes256_cbc_set_key=Ge.H)(e,t),s._vscf_aes256_cbc_state=e=>(s._vscf_aes256_cbc_state=Ge.I)(e),s._vscf_aes256_cbc_out_len=(e,t)=>(s._vscf_aes256_cbc_out_len=Ge.J)(e,t),s._vscf_aes256_cbc_decrypted_out_len=(e,t)=>(s._vscf_aes256_cbc_decrypted_out_len=Ge.K)(e,t),s._vscf_aes256_cbc_encrypted_out_len=(e,t)=>(s._vscf_aes256_cbc_encrypted_out_len=Ge.L)(e,t),s._vscf_aes256_cbc_new=()=>(s._vscf_aes256_cbc_new=Ge.M)(),s._vscf_aes256_cbc_delete=e=>(s._vscf_aes256_cbc_delete=Ge.N)(e),s._vscf_aes256_cbc_shallow_copy=e=>(s._vscf_aes256_cbc_shallow_copy=Ge.O)(e),s._vscf_aes256_gcm_out_len=(e,t)=>(s._vscf_aes256_gcm_out_len=Ge.P)(e,t),s._vscf_aes256_gcm_alg_id=e=>(s._vscf_aes256_gcm_alg_id=Ge.Q)(e),s._vscf_aes256_gcm_produce_alg_info=e=>(s._vscf_aes256_gcm_produce_alg_info=Ge.R)(e),s._vscf_aes256_gcm_restore_alg_info=(e,t)=>(s._vscf_aes256_gcm_restore_alg_info=Ge.S)(e,t),s._vscf_aes256_gcm_set_nonce=(e,t)=>(s._vscf_aes256_gcm_set_nonce=Ge.T)(e,t),s._vscf_aes256_gcm_encrypt=(e,t,_)=>(s._vscf_aes256_gcm_encrypt=Ge.U)(e,t,_),s._vscf_aes256_gcm_start_encryption=e=>(s._vscf_aes256_gcm_start_encryption=Ge.V)(e),s._vscf_aes256_gcm_update=(e,t,_)=>(s._vscf_aes256_gcm_update=Ge.W)(e,t,_),s._vscf_aes256_gcm_finish=(e,t)=>(s._vscf_aes256_gcm_finish=Ge.X)(e,t),s._vscf_aes256_gcm_encrypted_len=(e,t)=>(s._vscf_aes256_gcm_encrypted_len=Ge.Y)(e,t),s._vscf_aes256_gcm_finish_auth_decryption=(e,t,_)=>(s._vscf_aes256_gcm_finish_auth_decryption=Ge.Z)(e,t,_),s._vscf_aes256_gcm_finish_auth_encryption=(e,t,_)=>(s._vscf_aes256_gcm_finish_auth_encryption=Ge._)(e,t,_),s._vscf_aes256_gcm_precise_encrypted_len=(e,t)=>(s._vscf_aes256_gcm_precise_encrypted_len=Ge.$)(e,t),s._vscf_aes256_gcm_decrypt=(e,t,_)=>(s._vscf_aes256_gcm_decrypt=Ge.aa)(e,t,_),s._vscf_aes256_gcm_start_decryption=e=>(s._vscf_aes256_gcm_start_decryption=Ge.ba)(e),s._vscf_aes256_gcm_decrypted_len=(e,t)=>(s._vscf_aes256_gcm_decrypted_len=Ge.ca)(e,t),s._vscf_aes256_gcm_set_key=(e,t)=>(s._vscf_aes256_gcm_set_key=Ge.da)(e,t),s._vscf_aes256_gcm_state=e=>(s._vscf_aes256_gcm_state=Ge.ea)(e),s._vscf_aes256_gcm_decrypted_out_len=(e,t)=>(s._vscf_aes256_gcm_decrypted_out_len=Ge.fa)(e,t),s._vscf_aes256_gcm_encrypted_out_len=(e,t)=>(s._vscf_aes256_gcm_encrypted_out_len=Ge.ga)(e,t),s._vscf_aes256_gcm_auth_encrypt=(e,t,_,r,n)=>(s._vscf_aes256_gcm_auth_encrypt=Ge.ha)(e,t,_,r,n),s._vscf_aes256_gcm_auth_encrypted_len=(e,t)=>(s._vscf_aes256_gcm_auth_encrypted_len=Ge.ia)(e,t),s._vscf_aes256_gcm_set_auth_data=(e,t)=>(s._vscf_aes256_gcm_set_auth_data=Ge.ja)(e,t),s._vscf_aes256_gcm_auth_decrypt=(e,t,_,r,n)=>(s._vscf_aes256_gcm_auth_decrypt=Ge.ka)(e,t,_,r,n),s._vscf_aes256_gcm_auth_decrypted_len=(e,t)=>(s._vscf_aes256_gcm_auth_decrypted_len=Ge.la)(e,t),s._vscf_aes256_gcm_new=()=>(s._vscf_aes256_gcm_new=Ge.ma)(),s._vscf_aes256_gcm_delete=e=>(s._vscf_aes256_gcm_delete=Ge.na)(e),s._vscf_aes256_gcm_shallow_copy=e=>(s._vscf_aes256_gcm_shallow_copy=Ge.oa)(e),s._vscf_alg_info_der_deserializer_setup_defaults=e=>(s._vscf_alg_info_der_deserializer_setup_defaults=Ge.pa)(e),s._vscf_alg_info_der_deserializer_deserialize_inplace=(e,t)=>(s._vscf_alg_info_der_deserializer_deserialize_inplace=Ge.qa)(e,t),s._vscf_alg_info_der_deserializer_deserialize=(e,t,_)=>(s._vscf_alg_info_der_deserializer_deserialize=Ge.ra)(e,t,_),s._vscf_alg_info_der_deserializer_release_asn1_reader=e=>(s._vscf_alg_info_der_deserializer_release_asn1_reader=Ge.sa)(e),s._vscf_alg_info_der_deserializer_new=()=>(s._vscf_alg_info_der_deserializer_new=Ge.ta)(),s._vscf_alg_info_der_deserializer_delete=e=>(s._vscf_alg_info_der_deserializer_delete=Ge.ua)(e),s._vscf_alg_info_der_deserializer_shallow_copy=e=>(s._vscf_alg_info_der_deserializer_shallow_copy=Ge.va)(e),s._vscf_alg_info_der_deserializer_use_asn1_reader=(e,t)=>(s._vscf_alg_info_der_deserializer_use_asn1_reader=Ge.wa)(e,t),s._vscf_alg_info_der_serializer_setup_defaults=e=>(s._vscf_alg_info_der_serializer_setup_defaults=Ge.xa)(e),s._vscf_alg_info_der_serializer_serialize_inplace=(e,t)=>(s._vscf_alg_info_der_serializer_serialize_inplace=Ge.ya)(e,t),s._vscf_alg_info_der_serializer_serialized_len=(e,t)=>(s._vscf_alg_info_der_serializer_serialized_len=Ge.za)(e,t),s._vscf_alg_info_der_serializer_serialize=(e,t,_)=>(s._vscf_alg_info_der_serializer_serialize=Ge.Aa)(e,t,_),s._vscf_alg_info_der_serializer_release_asn1_writer=e=>(s._vscf_alg_info_der_serializer_release_asn1_writer=Ge.Ba)(e),s._vscf_alg_info_der_serializer_new=()=>(s._vscf_alg_info_der_serializer_new=Ge.Ca)(),s._vscf_alg_info_der_serializer_delete=e=>(s._vscf_alg_info_der_serializer_delete=Ge.Da)(e),s._vscf_alg_info_der_serializer_shallow_copy=e=>(s._vscf_alg_info_der_serializer_shallow_copy=Ge.Ea)(e),s._vscf_alg_info_der_serializer_use_asn1_writer=(e,t)=>(s._vscf_alg_info_der_serializer_use_asn1_writer=Ge.Fa)(e,t),s._vscf_asn1rd_reset=(e,t)=>(s._vscf_asn1rd_reset=Ge.Ga)(e,t),s._vscf_asn1rd_left_len=e=>(s._vscf_asn1rd_left_len=Ge.Ha)(e),s._vscf_asn1rd_has_error=e=>(s._vscf_asn1rd_has_error=Ge.Ia)(e),s._vscf_asn1rd_status=e=>(s._vscf_asn1rd_status=Ge.Ja)(e),s._vscf_asn1rd_get_tag=e=>(s._vscf_asn1rd_get_tag=Ge.Ka)(e),s._vscf_asn1rd_get_len=e=>(s._vscf_asn1rd_get_len=Ge.La)(e),s._vscf_asn1rd_get_data_len=e=>(s._vscf_asn1rd_get_data_len=Ge.Ma)(e),s._vscf_asn1rd_read_tag=(e,t)=>(s._vscf_asn1rd_read_tag=Ge.Na)(e,t),s._vscf_asn1rd_read_context_tag=(e,t)=>(s._vscf_asn1rd_read_context_tag=Ge.Oa)(e,t),s._vscf_asn1rd_read_int=e=>(s._vscf_asn1rd_read_int=Ge.Pa)(e),s._vscf_asn1rd_read_int64=e=>(s._vscf_asn1rd_read_int64=Ge.Qa)(e),s._vscf_asn1rd_read_int8=e=>(s._vscf_asn1rd_read_int8=Ge.Ra)(e),s._vscf_asn1rd_read_int16=e=>(s._vscf_asn1rd_read_int16=Ge.Sa)(e),s._vscf_asn1rd_read_int32=e=>(s._vscf_asn1rd_read_int32=Ge.Ta)(e),s._vscf_asn1rd_read_uint=e=>(s._vscf_asn1rd_read_uint=Ge.Ua)(e),s._vscf_asn1rd_read_uint64=e=>(s._vscf_asn1rd_read_uint64=Ge.Va)(e),s._vscf_asn1rd_read_uint8=e=>(s._vscf_asn1rd_read_uint8=Ge.Wa)(e),s._vscf_asn1rd_read_uint16=e=>(s._vscf_asn1rd_read_uint16=Ge.Xa)(e),s._vscf_asn1rd_read_uint32=e=>(s._vscf_asn1rd_read_uint32=Ge.Ya)(e),s._vscf_asn1rd_read_bool=e=>(s._vscf_asn1rd_read_bool=Ge.Za)(e),s._vscf_asn1rd_read_null=e=>(s._vscf_asn1rd_read_null=Ge._a)(e),s._vscf_asn1rd_read_null_optional=e=>(s._vscf_asn1rd_read_null_optional=Ge.$a)(e),s._vscf_asn1rd_read_octet_str=(e,t)=>(s._vscf_asn1rd_read_octet_str=Ge.ab)(e,t),s._vscf_asn1rd_read_bitstring_as_octet_str=(e,t)=>(s._vscf_asn1rd_read_bitstring_as_octet_str=Ge.bb)(e,t),s._vscf_asn1rd_read_utf8_str=(e,t)=>(s._vscf_asn1rd_read_utf8_str=Ge.cb)(e,t),s._vscf_asn1rd_read_oid=(e,t)=>(s._vscf_asn1rd_read_oid=Ge.db)(e,t),s._vscf_asn1rd_read_data=(e,t,_)=>(s._vscf_asn1rd_read_data=Ge.eb)(e,t,_),s._vscf_asn1rd_read_sequence=e=>(s._vscf_asn1rd_read_sequence=Ge.fb)(e),s._vscf_asn1rd_read_set=e=>(s._vscf_asn1rd_read_set=Ge.gb)(e),s._vscf_asn1rd_new=()=>(s._vscf_asn1rd_new=Ge.hb)(),s._vscf_asn1rd_delete=e=>(s._vscf_asn1rd_delete=Ge.ib)(e),s._vscf_asn1rd_shallow_copy=e=>(s._vscf_asn1rd_shallow_copy=Ge.jb)(e),s._vscf_asn1wr_reset=(e,t,_)=>(s._vscf_asn1wr_reset=Ge.kb)(e,t,_),s._vscf_asn1wr_finish=(e,t)=>(s._vscf_asn1wr_finish=Ge.lb)(e,t),s._vscf_asn1wr_bytes=e=>(s._vscf_asn1wr_bytes=Ge.mb)(e),s._vscf_asn1wr_len=e=>(s._vscf_asn1wr_len=Ge.nb)(e),s._vscf_asn1wr_written_len=e=>(s._vscf_asn1wr_written_len=Ge.ob)(e),s._vscf_asn1wr_unwritten_len=e=>(s._vscf_asn1wr_unwritten_len=Ge.pb)(e),s._vscf_asn1wr_has_error=e=>(s._vscf_asn1wr_has_error=Ge.qb)(e),s._vscf_asn1wr_status=e=>(s._vscf_asn1wr_status=Ge.rb)(e),s._vscf_asn1wr_reserve=(e,t)=>(s._vscf_asn1wr_reserve=Ge.sb)(e,t),s._vscf_asn1wr_write_tag=(e,t)=>(s._vscf_asn1wr_write_tag=Ge.tb)(e,t),s._vscf_asn1wr_write_context_tag=(e,t,_)=>(s._vscf_asn1wr_write_context_tag=Ge.ub)(e,t,_),s._vscf_asn1wr_write_len=(e,t)=>(s._vscf_asn1wr_write_len=Ge.vb)(e,t),s._vscf_asn1wr_write_int=(e,t)=>(s._vscf_asn1wr_write_int=Ge.wb)(e,t),s._vscf_asn1wr_write_int64=(e,t,_)=>(s._vscf_asn1wr_write_int64=Ge.xb)(e,t,_),s._vscf_asn1wr_write_int8=(e,t)=>(s._vscf_asn1wr_write_int8=Ge.yb)(e,t),s._vscf_asn1wr_write_int16=(e,t)=>(s._vscf_asn1wr_write_int16=Ge.zb)(e,t),s._vscf_asn1wr_write_int32=(e,t)=>(s._vscf_asn1wr_write_int32=Ge.Ab)(e,t),s._vscf_asn1wr_write_uint=(e,t)=>(s._vscf_asn1wr_write_uint=Ge.Bb)(e,t),s._vscf_asn1wr_write_uint64=(e,t,_)=>(s._vscf_asn1wr_write_uint64=Ge.Cb)(e,t,_),s._vscf_asn1wr_write_uint8=(e,t)=>(s._vscf_asn1wr_write_uint8=Ge.Db)(e,t),s._vscf_asn1wr_write_uint16=(e,t)=>(s._vscf_asn1wr_write_uint16=Ge.Eb)(e,t),s._vscf_asn1wr_write_uint32=(e,t)=>(s._vscf_asn1wr_write_uint32=Ge.Fb)(e,t),s._vscf_asn1wr_write_bool=(e,t)=>(s._vscf_asn1wr_write_bool=Ge.Gb)(e,t),s._vscf_asn1wr_write_null=e=>(s._vscf_asn1wr_write_null=Ge.Hb)(e),s._vscf_asn1wr_write_octet_str=(e,t)=>(s._vscf_asn1wr_write_octet_str=Ge.Ib)(e,t),s._vscf_asn1wr_write_octet_str_as_bitstring=(e,t)=>(s._vscf_asn1wr_write_octet_str_as_bitstring=Ge.Jb)(e,t),s._vscf_asn1wr_write_data=(e,t)=>(s._vscf_asn1wr_write_data=Ge.Kb)(e,t),s._vscf_asn1wr_write_utf8_str=(e,t)=>(s._vscf_asn1wr_write_utf8_str=Ge.Lb)(e,t),s._vscf_asn1wr_write_oid=(e,t)=>(s._vscf_asn1wr_write_oid=Ge.Mb)(e,t),s._vscf_asn1wr_write_sequence=(e,t)=>(s._vscf_asn1wr_write_sequence=Ge.Nb)(e,t),s._vscf_asn1wr_write_set=(e,t)=>(s._vscf_asn1wr_write_set=Ge.Ob)(e,t),s._vscf_asn1wr_new=()=>(s._vscf_asn1wr_new=Ge.Pb)(),s._vscf_asn1wr_delete=e=>(s._vscf_asn1wr_delete=Ge.Qb)(e),s._vscf_asn1wr_shallow_copy=e=>(s._vscf_asn1wr_shallow_copy=Ge.Rb)(e),s._vscf_cipher_alg_info_nonce=(e,t)=>(s._vscf_cipher_alg_info_nonce=Ge.Sb)(e,t),s._vscf_cipher_alg_info_alg_id=e=>(s._vscf_cipher_alg_info_alg_id=Ge.Tb)(e),s._vscf_cipher_alg_info_new=()=>(s._vscf_cipher_alg_info_new=Ge.Ub)(),s._vscf_cipher_alg_info_delete=e=>(s._vscf_cipher_alg_info_delete=Ge.Vb)(e),s._vscf_cipher_alg_info_shallow_copy=e=>(s._vscf_cipher_alg_info_shallow_copy=Ge.Wb)(e),s._vscf_cipher_alg_info_new_with_members=(e,t)=>(s._vscf_cipher_alg_info_new_with_members=Ge.Xb)(e,t),s._vscf_compound_key_alg_setup_defaults=e=>(s._vscf_compound_key_alg_setup_defaults=Ge.Yb)(e),s._vscf_compound_key_alg_make_key=(e,t,_,r)=>(s._vscf_compound_key_alg_make_key=Ge.Zb)(e,t,_,r),s._vscf_compound_key_alg_alg_id=e=>(s._vscf_compound_key_alg_alg_id=Ge._b)(e),s._vscf_compound_key_alg_produce_alg_info=e=>(s._vscf_compound_key_alg_produce_alg_info=Ge.$b)(e),s._vscf_compound_key_alg_restore_alg_info=(e,t)=>(s._vscf_compound_key_alg_restore_alg_info=Ge.ac)(e,t),s._vscf_compound_key_alg_generate_ephemeral_key=(e,t,_)=>(s._vscf_compound_key_alg_generate_ephemeral_key=Ge.bc)(e,t,_),s._vscf_compound_key_alg_import_public_key=(e,t,_)=>(s._vscf_compound_key_alg_import_public_key=Ge.cc)(e,t,_),s._vscf_compound_key_alg_import_public_key_data=(e,t,_,r)=>(s._vscf_compound_key_alg_import_public_key_data=Ge.dc)(e,t,_,r),s._vscf_compound_key_alg_export_public_key=(e,t,_)=>(s._vscf_compound_key_alg_export_public_key=Ge.ec)(e,t,_),s._vscf_compound_key_alg_exported_public_key_data_len=(e,t)=>(s._vscf_compound_key_alg_exported_public_key_data_len=Ge.fc)(e,t),s._vscf_compound_key_alg_export_public_key_data=(e,t,_)=>(s._vscf_compound_key_alg_export_public_key_data=Ge.gc)(e,t,_),s._vscf_compound_key_alg_import_private_key=(e,t,_)=>(s._vscf_compound_key_alg_import_private_key=Ge.hc)(e,t,_),s._vscf_compound_key_alg_import_private_key_data=(e,t,_,r)=>(s._vscf_compound_key_alg_import_private_key_data=Ge.ic)(e,t,_,r),s._vscf_compound_key_alg_export_private_key=(e,t,_)=>(s._vscf_compound_key_alg_export_private_key=Ge.jc)(e,t,_),s._vscf_compound_key_alg_exported_private_key_data_len=(e,t)=>(s._vscf_compound_key_alg_exported_private_key_data_len=Ge.kc)(e,t),s._vscf_compound_key_alg_export_private_key_data=(e,t,_)=>(s._vscf_compound_key_alg_export_private_key_data=Ge.lc)(e,t,_),s._vscf_compound_key_alg_can_encrypt=(e,t,_)=>(s._vscf_compound_key_alg_can_encrypt=Ge.mc)(e,t,_),s._vscf_compound_key_alg_encrypted_len=(e,t,_)=>(s._vscf_compound_key_alg_encrypted_len=Ge.nc)(e,t,_),s._vscf_compound_key_alg_encrypt=(e,t,_,r)=>(s._vscf_compound_key_alg_encrypt=Ge.oc)(e,t,_,r),s._vscf_compound_key_alg_can_decrypt=(e,t,_)=>(s._vscf_compound_key_alg_can_decrypt=Ge.pc)(e,t,_),s._vscf_compound_key_alg_decrypted_len=(e,t,_)=>(s._vscf_compound_key_alg_decrypted_len=Ge.qc)(e,t,_),s._vscf_compound_key_alg_decrypt=(e,t,_,r)=>(s._vscf_compound_key_alg_decrypt=Ge.rc)(e,t,_,r),s._vscf_compound_key_alg_can_sign=(e,t)=>(s._vscf_compound_key_alg_can_sign=Ge.sc)(e,t),s._vscf_compound_key_alg_signature_len=(e,t)=>(s._vscf_compound_key_alg_signature_len=Ge.tc)(e,t),s._vscf_compound_key_alg_sign_hash=(e,t,_,r,n)=>(s._vscf_compound_key_alg_sign_hash=Ge.uc)(e,t,_,r,n),s._vscf_compound_key_alg_can_verify=(e,t)=>(s._vscf_compound_key_alg_can_verify=Ge.vc)(e,t),s._vscf_compound_key_alg_verify_hash=(e,t,_,r,n)=>(s._vscf_compound_key_alg_verify_hash=Ge.wc)(e,t,_,r,n),s._vscf_compound_key_alg_release_random=e=>(s._vscf_compound_key_alg_release_random=Ge.xc)(e),s._vscf_compound_key_alg_new=()=>(s._vscf_compound_key_alg_new=Ge.yc)(),s._vscf_compound_key_alg_delete=e=>(s._vscf_compound_key_alg_delete=Ge.zc)(e),s._vscf_compound_key_alg_shallow_copy=e=>(s._vscf_compound_key_alg_shallow_copy=Ge.Ac)(e),s._vscf_compound_key_alg_use_random=(e,t)=>(s._vscf_compound_key_alg_use_random=Ge.Bc)(e,t),s._vscf_compound_key_alg_info_cipher_alg_info=e=>(s._vscf_compound_key_alg_info_cipher_alg_info=Ge.Cc)(e),s._vscf_compound_key_alg_info_signer_alg_info=e=>(s._vscf_compound_key_alg_info_signer_alg_info=Ge.Dc)(e),s._vscf_compound_key_alg_info_alg_id=e=>(s._vscf_compound_key_alg_info_alg_id=Ge.Ec)(e),s._vscf_compound_key_alg_info_new=()=>(s._vscf_compound_key_alg_info_new=Ge.Fc)(),s._vscf_compound_key_alg_info_delete=e=>(s._vscf_compound_key_alg_info_delete=Ge.Gc)(e),s._vscf_compound_key_alg_info_shallow_copy=e=>(s._vscf_compound_key_alg_info_shallow_copy=Ge.Hc)(e),s._vscf_compound_private_key_cipher_key=e=>(s._vscf_compound_private_key_cipher_key=Ge.Ic)(e),s._vscf_compound_private_key_signer_key=e=>(s._vscf_compound_private_key_signer_key=Ge.Jc)(e),s._vscf_compound_private_key_alg_id=e=>(s._vscf_compound_private_key_alg_id=Ge.Kc)(e),s._vscf_compound_private_key_alg_info=e=>(s._vscf_compound_private_key_alg_info=Ge.Lc)(e),s._vscf_compound_private_key_len=e=>(s._vscf_compound_private_key_len=Ge.Mc)(e),s._vscf_compound_private_key_bitlen=e=>(s._vscf_compound_private_key_bitlen=Ge.Nc)(e),s._vscf_compound_private_key_impl_tag=e=>(s._vscf_compound_private_key_impl_tag=Ge.Oc)(e),s._vscf_compound_private_key_is_valid=e=>(s._vscf_compound_private_key_is_valid=Ge.Pc)(e),s._vscf_compound_private_key_extract_public_key=e=>(s._vscf_compound_private_key_extract_public_key=Ge.Qc)(e),s._vscf_compound_private_key_new=()=>(s._vscf_compound_private_key_new=Ge.Rc)(),s._vscf_compound_private_key_delete=e=>(s._vscf_compound_private_key_delete=Ge.Sc)(e),s._vscf_compound_private_key_shallow_copy=e=>(s._vscf_compound_private_key_shallow_copy=Ge.Tc)(e),s._vscf_compound_public_key_cipher_key=e=>(s._vscf_compound_public_key_cipher_key=Ge.Uc)(e),s._vscf_compound_public_key_signer_key=e=>(s._vscf_compound_public_key_signer_key=Ge.Vc)(e),s._vscf_compound_public_key_alg_id=e=>(s._vscf_compound_public_key_alg_id=Ge.Wc)(e),s._vscf_compound_public_key_alg_info=e=>(s._vscf_compound_public_key_alg_info=Ge.Xc)(e),s._vscf_compound_public_key_len=e=>(s._vscf_compound_public_key_len=Ge.Yc)(e),s._vscf_compound_public_key_bitlen=e=>(s._vscf_compound_public_key_bitlen=Ge.Zc)(e),s._vscf_compound_public_key_impl_tag=e=>(s._vscf_compound_public_key_impl_tag=Ge._c)(e),s._vscf_compound_public_key_is_valid=e=>(s._vscf_compound_public_key_is_valid=Ge.$c)(e),s._vscf_compound_public_key_new=()=>(s._vscf_compound_public_key_new=Ge.ad)(),s._vscf_compound_public_key_delete=e=>(s._vscf_compound_public_key_delete=Ge.bd)(e),s._vscf_compound_public_key_shallow_copy=e=>(s._vscf_compound_public_key_shallow_copy=Ge.cd)(e),s._vscf_ctr_drbg_setup_defaults=e=>(s._vscf_ctr_drbg_setup_defaults=Ge.dd)(e),s._vscf_ctr_drbg_enable_prediction_resistance=e=>(s._vscf_ctr_drbg_enable_prediction_resistance=Ge.ed)(e),s._vscf_ctr_drbg_set_reseed_interval=(e,t)=>(s._vscf_ctr_drbg_set_reseed_interval=Ge.fd)(e,t),s._vscf_ctr_drbg_set_entropy_len=(e,t)=>(s._vscf_ctr_drbg_set_entropy_len=Ge.gd)(e,t),s._vscf_ctr_drbg_random=(e,t,_)=>(s._vscf_ctr_drbg_random=Ge.hd)(e,t,_),s._vscf_ctr_drbg_reseed=e=>(s._vscf_ctr_drbg_reseed=Ge.id)(e),s._vscf_ctr_drbg_release_entropy_source=e=>(s._vscf_ctr_drbg_release_entropy_source=Ge.jd)(e),s._vscf_ctr_drbg_new=()=>(s._vscf_ctr_drbg_new=Ge.kd)(),s._vscf_ctr_drbg_delete=e=>(s._vscf_ctr_drbg_delete=Ge.ld)(e),s._vscf_ctr_drbg_shallow_copy=e=>(s._vscf_ctr_drbg_shallow_copy=Ge.md)(e),s._vscf_ctr_drbg_use_entropy_source=(e,t)=>(s._vscf_ctr_drbg_use_entropy_source=Ge.nd)(e,t),s._vscf_curve25519_setup_defaults=e=>(s._vscf_curve25519_setup_defaults=Ge.od)(e),s._vscf_curve25519_generate_key=(e,t)=>(s._vscf_curve25519_generate_key=Ge.pd)(e,t),s._vscf_curve25519_generate_ephemeral_key=(e,t,_)=>(s._vscf_curve25519_generate_ephemeral_key=Ge.qd)(e,t,_),s._vscf_curve25519_import_public_key=(e,t,_)=>(s._vscf_curve25519_import_public_key=Ge.rd)(e,t,_),s._vscf_curve25519_import_public_key_data=(e,t,_,r)=>(s._vscf_curve25519_import_public_key_data=Ge.sd)(e,t,_,r),s._vscf_curve25519_export_public_key=(e,t,_)=>(s._vscf_curve25519_export_public_key=Ge.td)(e,t,_),s._vscf_curve25519_exported_public_key_data_len=(e,t)=>(s._vscf_curve25519_exported_public_key_data_len=Ge.ud)(e,t),s._vscf_curve25519_export_public_key_data=(e,t,_)=>(s._vscf_curve25519_export_public_key_data=Ge.vd)(e,t,_),s._vscf_curve25519_import_private_key=(e,t,_)=>(s._vscf_curve25519_import_private_key=Ge.wd)(e,t,_),s._vscf_curve25519_import_private_key_data=(e,t,_,r)=>(s._vscf_curve25519_import_private_key_data=Ge.xd)(e,t,_,r),s._vscf_curve25519_export_private_key=(e,t,_)=>(s._vscf_curve25519_export_private_key=Ge.yd)(e,t,_),s._vscf_curve25519_exported_private_key_data_len=(e,t)=>(s._vscf_curve25519_exported_private_key_data_len=Ge.zd)(e,t),s._vscf_curve25519_export_private_key_data=(e,t,_)=>(s._vscf_curve25519_export_private_key_data=Ge.Ad)(e,t,_),s._vscf_curve25519_can_encrypt=(e,t,_)=>(s._vscf_curve25519_can_encrypt=Ge.Bd)(e,t,_),s._vscf_curve25519_encrypted_len=(e,t,_)=>(s._vscf_curve25519_encrypted_len=Ge.Cd)(e,t,_),s._vscf_curve25519_encrypt=(e,t,_,r)=>(s._vscf_curve25519_encrypt=Ge.Dd)(e,t,_,r),s._vscf_curve25519_can_decrypt=(e,t,_)=>(s._vscf_curve25519_can_decrypt=Ge.Ed)(e,t,_),s._vscf_curve25519_decrypted_len=(e,t,_)=>(s._vscf_curve25519_decrypted_len=Ge.Fd)(e,t,_),s._vscf_curve25519_decrypt=(e,t,_,r)=>(s._vscf_curve25519_decrypt=Ge.Gd)(e,t,_,r),s._vscf_curve25519_compute_shared_key=(e,t,_,r)=>(s._vscf_curve25519_compute_shared_key=Ge.Hd)(e,t,_,r),s._vscf_curve25519_shared_key_len=(e,t)=>(s._vscf_curve25519_shared_key_len=Ge.Id)(e,t),s._vscf_curve25519_kem_shared_key_len=(e,t)=>(s._vscf_curve25519_kem_shared_key_len=Ge.Jd)(e,t),s._vscf_curve25519_kem_encapsulated_key_len=(e,t)=>(s._vscf_curve25519_kem_encapsulated_key_len=Ge.Kd)(e,t),s._vscf_curve25519_kem_encapsulate=(e,t,_,r)=>(s._vscf_curve25519_kem_encapsulate=Ge.Ld)(e,t,_,r),s._vscf_curve25519_kem_decapsulate=(e,t,_,r)=>(s._vscf_curve25519_kem_decapsulate=Ge.Md)(e,t,_,r),s._vscf_curve25519_release_random=e=>(s._vscf_curve25519_release_random=Ge.Nd)(e),s._vscf_curve25519_release_ecies=e=>(s._vscf_curve25519_release_ecies=Ge.Od)(e),s._vscf_curve25519_new=()=>(s._vscf_curve25519_new=Ge.Pd)(),s._vscf_curve25519_delete=e=>(s._vscf_curve25519_delete=Ge.Qd)(e),s._vscf_curve25519_shallow_copy=e=>(s._vscf_curve25519_shallow_copy=Ge.Rd)(e),s._vscf_curve25519_use_random=(e,t)=>(s._vscf_curve25519_use_random=Ge.Sd)(e,t),s._vscf_curve25519_use_ecies=(e,t)=>(s._vscf_curve25519_use_ecies=Ge.Td)(e,t),s._vscf_ecc_setup_defaults=e=>(s._vscf_ecc_setup_defaults=Ge.Ud)(e),s._vscf_ecc_generate_key=(e,t,_)=>(s._vscf_ecc_generate_key=Ge.Vd)(e,t,_),s._vscf_ecc_generate_ephemeral_key=(e,t,_)=>(s._vscf_ecc_generate_ephemeral_key=Ge.Wd)(e,t,_),s._vscf_ecc_import_public_key=(e,t,_)=>(s._vscf_ecc_import_public_key=Ge.Xd)(e,t,_),s._vscf_ecc_import_public_key_data=(e,t,_,r)=>(s._vscf_ecc_import_public_key_data=Ge.Yd)(e,t,_,r),s._vscf_ecc_export_public_key=(e,t,_)=>(s._vscf_ecc_export_public_key=Ge.Zd)(e,t,_),s._vscf_ecc_exported_public_key_data_len=(e,t)=>(s._vscf_ecc_exported_public_key_data_len=Ge._d)(e,t),s._vscf_ecc_export_public_key_data=(e,t,_)=>(s._vscf_ecc_export_public_key_data=Ge.$d)(e,t,_),s._vscf_ecc_import_private_key=(e,t,_)=>(s._vscf_ecc_import_private_key=Ge.ae)(e,t,_),s._vscf_ecc_import_private_key_data=(e,t,_,r)=>(s._vscf_ecc_import_private_key_data=Ge.be)(e,t,_,r),s._vscf_ecc_export_private_key=(e,t,_)=>(s._vscf_ecc_export_private_key=Ge.ce)(e,t,_),s._vscf_ecc_exported_private_key_data_len=(e,t)=>(s._vscf_ecc_exported_private_key_data_len=Ge.de)(e,t),s._vscf_ecc_export_private_key_data=(e,t,_)=>(s._vscf_ecc_export_private_key_data=Ge.ee)(e,t,_),s._vscf_ecc_can_encrypt=(e,t,_)=>(s._vscf_ecc_can_encrypt=Ge.fe)(e,t,_),s._vscf_ecc_encrypted_len=(e,t,_)=>(s._vscf_ecc_encrypted_len=Ge.ge)(e,t,_),s._vscf_ecc_encrypt=(e,t,_,r)=>(s._vscf_ecc_encrypt=Ge.he)(e,t,_,r),s._vscf_ecc_can_decrypt=(e,t,_)=>(s._vscf_ecc_can_decrypt=Ge.ie)(e,t,_),s._vscf_ecc_decrypted_len=(e,t,_)=>(s._vscf_ecc_decrypted_len=Ge.je)(e,t,_),s._vscf_ecc_decrypt=(e,t,_,r)=>(s._vscf_ecc_decrypt=Ge.ke)(e,t,_,r),s._vscf_ecc_can_sign=(e,t)=>(s._vscf_ecc_can_sign=Ge.le)(e,t),s._vscf_ecc_signature_len=(e,t)=>(s._vscf_ecc_signature_len=Ge.me)(e,t),s._vscf_ecc_sign_hash=(e,t,_,r,n)=>(s._vscf_ecc_sign_hash=Ge.ne)(e,t,_,r,n),s._vscf_ecc_can_verify=(e,t)=>(s._vscf_ecc_can_verify=Ge.oe)(e,t),s._vscf_ecc_verify_hash=(e,t,_,r,n)=>(s._vscf_ecc_verify_hash=Ge.pe)(e,t,_,r,n),s._vscf_ecc_compute_shared_key=(e,t,_,r)=>(s._vscf_ecc_compute_shared_key=Ge.qe)(e,t,_,r),s._vscf_ecc_shared_key_len=(e,t)=>(s._vscf_ecc_shared_key_len=Ge.re)(e,t),s._vscf_ecc_kem_shared_key_len=(e,t)=>(s._vscf_ecc_kem_shared_key_len=Ge.se)(e,t),s._vscf_ecc_kem_encapsulated_key_len=(e,t)=>(s._vscf_ecc_kem_encapsulated_key_len=Ge.te)(e,t),s._vscf_ecc_kem_encapsulate=(e,t,_,r)=>(s._vscf_ecc_kem_encapsulate=Ge.ue)(e,t,_,r),s._vscf_ecc_kem_decapsulate=(e,t,_,r)=>(s._vscf_ecc_kem_decapsulate=Ge.ve)(e,t,_,r),s._vscf_ecc_release_random=e=>(s._vscf_ecc_release_random=Ge.we)(e),s._vscf_ecc_release_ecies=e=>(s._vscf_ecc_release_ecies=Ge.xe)(e),s._vscf_ecc_new=()=>(s._vscf_ecc_new=Ge.ye)(),s._vscf_ecc_delete=e=>(s._vscf_ecc_delete=Ge.ze)(e),s._vscf_ecc_shallow_copy=e=>(s._vscf_ecc_shallow_copy=Ge.Ae)(e),s._vscf_ecc_use_random=(e,t)=>(s._vscf_ecc_use_random=Ge.Be)(e,t),s._vscf_ecc_use_ecies=(e,t)=>(s._vscf_ecc_use_ecies=Ge.Ce)(e,t),s._vscf_ecc_alg_info_key_id=e=>(s._vscf_ecc_alg_info_key_id=Ge.De)(e),s._vscf_ecc_alg_info_domain_id=e=>(s._vscf_ecc_alg_info_domain_id=Ge.Ee)(e),s._vscf_ecc_alg_info_alg_id=e=>(s._vscf_ecc_alg_info_alg_id=Ge.Fe)(e),s._vscf_ecc_alg_info_new=()=>(s._vscf_ecc_alg_info_new=Ge.Ge)(),s._vscf_ecc_alg_info_delete=e=>(s._vscf_ecc_alg_info_delete=Ge.He)(e),s._vscf_ecc_alg_info_shallow_copy=e=>(s._vscf_ecc_alg_info_shallow_copy=Ge.Ie)(e),s._vscf_ecc_alg_info_new_with_members=(e,t,_)=>(s._vscf_ecc_alg_info_new_with_members=Ge.Je)(e,t,_),s._vscf_ecc_private_key_alg_id=e=>(s._vscf_ecc_private_key_alg_id=Ge.Ke)(e),s._vscf_ecc_private_key_alg_info=e=>(s._vscf_ecc_private_key_alg_info=Ge.Le)(e),s._vscf_ecc_private_key_len=e=>(s._vscf_ecc_private_key_len=Ge.Me)(e),s._vscf_ecc_private_key_bitlen=e=>(s._vscf_ecc_private_key_bitlen=Ge.Ne)(e),s._vscf_ecc_private_key_impl_tag=e=>(s._vscf_ecc_private_key_impl_tag=Ge.Oe)(e),s._vscf_ecc_private_key_is_valid=e=>(s._vscf_ecc_private_key_is_valid=Ge.Pe)(e),s._vscf_ecc_private_key_extract_public_key=e=>(s._vscf_ecc_private_key_extract_public_key=Ge.Qe)(e),s._vscf_ecc_private_key_new=()=>(s._vscf_ecc_private_key_new=Ge.Re)(),s._vscf_ecc_private_key_delete=e=>(s._vscf_ecc_private_key_delete=Ge.Se)(e),s._vscf_ecc_private_key_shallow_copy=e=>(s._vscf_ecc_private_key_shallow_copy=Ge.Te)(e),s._vscf_ecc_public_key_alg_id=e=>(s._vscf_ecc_public_key_alg_id=Ge.Ue)(e),s._vscf_ecc_public_key_alg_info=e=>(s._vscf_ecc_public_key_alg_info=Ge.Ve)(e),s._vscf_ecc_public_key_len=e=>(s._vscf_ecc_public_key_len=Ge.We)(e),s._vscf_ecc_public_key_bitlen=e=>(s._vscf_ecc_public_key_bitlen=Ge.Xe)(e),s._vscf_ecc_public_key_impl_tag=e=>(s._vscf_ecc_public_key_impl_tag=Ge.Ye)(e),s._vscf_ecc_public_key_is_valid=e=>(s._vscf_ecc_public_key_is_valid=Ge.Ze)(e),s._vscf_ecc_public_key_new=()=>(s._vscf_ecc_public_key_new=Ge._e)(),s._vscf_ecc_public_key_delete=e=>(s._vscf_ecc_public_key_delete=Ge.$e)(e),s._vscf_ecc_public_key_shallow_copy=e=>(s._vscf_ecc_public_key_shallow_copy=Ge.af)(e),s._vscf_ed25519_setup_defaults=e=>(s._vscf_ed25519_setup_defaults=Ge.bf)(e),s._vscf_ed25519_generate_key=(e,t)=>(s._vscf_ed25519_generate_key=Ge.cf)(e,t),s._vscf_ed25519_generate_ephemeral_key=(e,t,_)=>(s._vscf_ed25519_generate_ephemeral_key=Ge.df)(e,t,_),s._vscf_ed25519_import_public_key=(e,t,_)=>(s._vscf_ed25519_import_public_key=Ge.ef)(e,t,_),s._vscf_ed25519_import_public_key_data=(e,t,_,r)=>(s._vscf_ed25519_import_public_key_data=Ge.ff)(e,t,_,r),s._vscf_ed25519_export_public_key=(e,t,_)=>(s._vscf_ed25519_export_public_key=Ge.gf)(e,t,_),s._vscf_ed25519_exported_public_key_data_len=(e,t)=>(s._vscf_ed25519_exported_public_key_data_len=Ge.hf)(e,t),s._vscf_ed25519_export_public_key_data=(e,t,_)=>(s._vscf_ed25519_export_public_key_data=Ge.jf)(e,t,_),s._vscf_ed25519_import_private_key=(e,t,_)=>(s._vscf_ed25519_import_private_key=Ge.kf)(e,t,_),s._vscf_ed25519_import_private_key_data=(e,t,_,r)=>(s._vscf_ed25519_import_private_key_data=Ge.lf)(e,t,_,r),s._vscf_ed25519_export_private_key=(e,t,_)=>(s._vscf_ed25519_export_private_key=Ge.mf)(e,t,_),s._vscf_ed25519_exported_private_key_data_len=(e,t)=>(s._vscf_ed25519_exported_private_key_data_len=Ge.nf)(e,t),s._vscf_ed25519_export_private_key_data=(e,t,_)=>(s._vscf_ed25519_export_private_key_data=Ge.of)(e,t,_),s._vscf_ed25519_can_encrypt=(e,t,_)=>(s._vscf_ed25519_can_encrypt=Ge.pf)(e,t,_),s._vscf_ed25519_encrypted_len=(e,t,_)=>(s._vscf_ed25519_encrypted_len=Ge.qf)(e,t,_),s._vscf_ed25519_encrypt=(e,t,_,r)=>(s._vscf_ed25519_encrypt=Ge.rf)(e,t,_,r),s._vscf_ed25519_can_decrypt=(e,t,_)=>(s._vscf_ed25519_can_decrypt=Ge.sf)(e,t,_),s._vscf_ed25519_decrypted_len=(e,t,_)=>(s._vscf_ed25519_decrypted_len=Ge.tf)(e,t,_),s._vscf_ed25519_decrypt=(e,t,_,r)=>(s._vscf_ed25519_decrypt=Ge.uf)(e,t,_,r),s._vscf_ed25519_can_sign=(e,t)=>(s._vscf_ed25519_can_sign=Ge.vf)(e,t),s._vscf_ed25519_signature_len=(e,t)=>(s._vscf_ed25519_signature_len=Ge.wf)(e,t),s._vscf_ed25519_sign_hash=(e,t,_,r,n)=>(s._vscf_ed25519_sign_hash=Ge.xf)(e,t,_,r,n),s._vscf_ed25519_can_verify=(e,t)=>(s._vscf_ed25519_can_verify=Ge.yf)(e,t),s._vscf_ed25519_verify_hash=(e,t,_,r,n)=>(s._vscf_ed25519_verify_hash=Ge.zf)(e,t,_,r,n),s._vscf_ed25519_compute_shared_key=(e,t,_,r)=>(s._vscf_ed25519_compute_shared_key=Ge.Af)(e,t,_,r),s._vscf_ed25519_shared_key_len=(e,t)=>(s._vscf_ed25519_shared_key_len=Ge.Bf)(e,t),s._vscf_ed25519_kem_shared_key_len=(e,t)=>(s._vscf_ed25519_kem_shared_key_len=Ge.Cf)(e,t),s._vscf_ed25519_kem_encapsulated_key_len=(e,t)=>(s._vscf_ed25519_kem_encapsulated_key_len=Ge.Df)(e,t),s._vscf_ed25519_kem_encapsulate=(e,t,_,r)=>(s._vscf_ed25519_kem_encapsulate=Ge.Ef)(e,t,_,r),s._vscf_ed25519_kem_decapsulate=(e,t,_,r)=>(s._vscf_ed25519_kem_decapsulate=Ge.Ff)(e,t,_,r),s._vscf_ed25519_release_random=e=>(s._vscf_ed25519_release_random=Ge.Gf)(e),s._vscf_ed25519_release_ecies=e=>(s._vscf_ed25519_release_ecies=Ge.Hf)(e),s._vscf_ed25519_new=()=>(s._vscf_ed25519_new=Ge.If)(),s._vscf_ed25519_delete=e=>(s._vscf_ed25519_delete=Ge.Jf)(e),s._vscf_ed25519_shallow_copy=e=>(s._vscf_ed25519_shallow_copy=Ge.Kf)(e),s._vscf_ed25519_use_random=(e,t)=>(s._vscf_ed25519_use_random=Ge.Lf)(e,t),s._vscf_ed25519_use_ecies=(e,t)=>(s._vscf_ed25519_use_ecies=Ge.Mf)(e,t),s._vscf_entropy_accumulator_setup_defaults=e=>(s._vscf_entropy_accumulator_setup_defaults=Ge.Nf)(e),s._vscf_entropy_accumulator_add_source=(e,t,_)=>(s._vscf_entropy_accumulator_add_source=Ge.Of)(e,t,_),s._vscf_entropy_accumulator_is_strong=e=>(s._vscf_entropy_accumulator_is_strong=Ge.Pf)(e),s._vscf_entropy_accumulator_gather=(e,t,_)=>(s._vscf_entropy_accumulator_gather=Ge.Qf)(e,t,_),s._vscf_entropy_accumulator_new=()=>(s._vscf_entropy_accumulator_new=Ge.Rf)(),s._vscf_entropy_accumulator_delete=e=>(s._vscf_entropy_accumulator_delete=Ge.Sf)(e),s._vscf_entropy_accumulator_shallow_copy=e=>(s._vscf_entropy_accumulator_shallow_copy=Ge.Tf)(e),s._vscf_fake_random_setup_source_byte=(e,t)=>(s._vscf_fake_random_setup_source_byte=Ge.Uf)(e,t),s._vscf_fake_random_setup_source_data=(e,t)=>(s._vscf_fake_random_setup_source_data=Ge.Vf)(e,t),s._vscf_fake_random_random=(e,t,_)=>(s._vscf_fake_random_random=Ge.Wf)(e,t,_),s._vscf_fake_random_reseed=e=>(s._vscf_fake_random_reseed=Ge.Xf)(e),s._vscf_fake_random_is_strong=e=>(s._vscf_fake_random_is_strong=Ge.Yf)(e),s._vscf_fake_random_gather=(e,t,_)=>(s._vscf_fake_random_gather=Ge.Zf)(e,t,_),s._vscf_fake_random_new=()=>(s._vscf_fake_random_new=Ge._f)(),s._vscf_fake_random_delete=e=>(s._vscf_fake_random_delete=Ge.$f)(e),s._vscf_fake_random_shallow_copy=e=>(s._vscf_fake_random_shallow_copy=Ge.ag)(e),s._vscf_falcon_setup_defaults=e=>(s._vscf_falcon_setup_defaults=Ge.bg)(e),s._vscf_falcon_generate_key=(e,t)=>(s._vscf_falcon_generate_key=Ge.cg)(e,t),s._vscf_falcon_produce_alg_info=e=>(s._vscf_falcon_produce_alg_info=Ge.dg)(e),s._vscf_falcon_alg_id=e=>(s._vscf_falcon_alg_id=Ge.eg)(e),s._vscf_falcon_restore_alg_info=(e,t)=>(s._vscf_falcon_restore_alg_info=Ge.fg)(e,t),s._vscf_falcon_generate_ephemeral_key=(e,t,_)=>(s._vscf_falcon_generate_ephemeral_key=Ge.gg)(e,t,_),s._vscf_falcon_import_public_key=(e,t,_)=>(s._vscf_falcon_import_public_key=Ge.hg)(e,t,_),s._vscf_falcon_import_public_key_data=(e,t,_,r)=>(s._vscf_falcon_import_public_key_data=Ge.ig)(e,t,_,r),s._vscf_falcon_export_public_key=(e,t,_)=>(s._vscf_falcon_export_public_key=Ge.jg)(e,t,_),s._vscf_falcon_exported_public_key_data_len=(e,t)=>(s._vscf_falcon_exported_public_key_data_len=Ge.kg)(e,t),s._vscf_falcon_export_public_key_data=(e,t,_)=>(s._vscf_falcon_export_public_key_data=Ge.lg)(e,t,_),s._vscf_falcon_import_private_key=(e,t,_)=>(s._vscf_falcon_import_private_key=Ge.mg)(e,t,_),s._vscf_falcon_import_private_key_data=(e,t,_,r)=>(s._vscf_falcon_import_private_key_data=Ge.ng)(e,t,_,r),s._vscf_falcon_export_private_key=(e,t,_)=>(s._vscf_falcon_export_private_key=Ge.og)(e,t,_),s._vscf_falcon_exported_private_key_data_len=(e,t)=>(s._vscf_falcon_exported_private_key_data_len=Ge.pg)(e,t),s._vscf_falcon_export_private_key_data=(e,t,_)=>(s._vscf_falcon_export_private_key_data=Ge.qg)(e,t,_),s._vscf_falcon_can_sign=(e,t)=>(s._vscf_falcon_can_sign=Ge.rg)(e,t),s._vscf_falcon_signature_len=(e,t)=>(s._vscf_falcon_signature_len=Ge.sg)(e,t),s._vscf_falcon_sign_hash=(e,t,_,r,n)=>(s._vscf_falcon_sign_hash=Ge.tg)(e,t,_,r,n),s._vscf_falcon_can_verify=(e,t)=>(s._vscf_falcon_can_verify=Ge.ug)(e,t),s._vscf_falcon_verify_hash=(e,t,_,r,n)=>(s._vscf_falcon_verify_hash=Ge.vg)(e,t,_,r,n),s._vscf_falcon_release_random=e=>(s._vscf_falcon_release_random=Ge.wg)(e),s._vscf_falcon_new=()=>(s._vscf_falcon_new=Ge.xg)(),s._vscf_falcon_delete=e=>(s._vscf_falcon_delete=Ge.yg)(e),s._vscf_falcon_shallow_copy=e=>(s._vscf_falcon_shallow_copy=Ge.zg)(e),s._vscf_falcon_use_random=(e,t)=>(s._vscf_falcon_use_random=Ge.Ag)(e,t),s._vscf_hash_based_alg_info_hash_alg_info=e=>(s._vscf_hash_based_alg_info_hash_alg_info=Ge.Bg)(e),s._vscf_hash_based_alg_info_alg_id=e=>(s._vscf_hash_based_alg_info_alg_id=Ge.Cg)(e),s._vscf_hash_based_alg_info_new=()=>(s._vscf_hash_based_alg_info_new=Ge.Dg)(),s._vscf_hash_based_alg_info_delete=e=>(s._vscf_hash_based_alg_info_delete=Ge.Eg)(e),s._vscf_hash_based_alg_info_shallow_copy=e=>(s._vscf_hash_based_alg_info_shallow_copy=Ge.Fg)(e),s._vscf_hkdf_alg_id=e=>(s._vscf_hkdf_alg_id=Ge.Gg)(e),s._vscf_hkdf_produce_alg_info=e=>(s._vscf_hkdf_produce_alg_info=Ge.Hg)(e),s._vscf_hkdf_restore_alg_info=(e,t)=>(s._vscf_hkdf_restore_alg_info=Ge.Ig)(e,t),s._vscf_hkdf_derive=(e,t,_,r)=>(s._vscf_hkdf_derive=Ge.Jg)(e,t,_,r),s._vscf_hkdf_reset=(e,t,_)=>(s._vscf_hkdf_reset=Ge.Kg)(e,t,_),s._vscf_hkdf_set_info=(e,t)=>(s._vscf_hkdf_set_info=Ge.Lg)(e,t),s._vscf_hkdf_release_hash=e=>(s._vscf_hkdf_release_hash=Ge.Mg)(e),s._vscf_hkdf_new=()=>(s._vscf_hkdf_new=Ge.Ng)(),s._vscf_hkdf_delete=e=>(s._vscf_hkdf_delete=Ge.Og)(e),s._vscf_hkdf_shallow_copy=e=>(s._vscf_hkdf_shallow_copy=Ge.Pg)(e),s._vscf_hkdf_use_hash=(e,t)=>(s._vscf_hkdf_use_hash=Ge.Qg)(e,t),s._vscf_hmac_alg_id=e=>(s._vscf_hmac_alg_id=Ge.Rg)(e),s._vscf_hmac_produce_alg_info=e=>(s._vscf_hmac_produce_alg_info=Ge.Sg)(e),s._vscf_hmac_restore_alg_info=(e,t)=>(s._vscf_hmac_restore_alg_info=Ge.Tg)(e,t),s._vscf_hmac_digest_len=e=>(s._vscf_hmac_digest_len=Ge.Ug)(e),s._vscf_hmac_mac=(e,t,_,r)=>(s._vscf_hmac_mac=Ge.Vg)(e,t,_,r),s._vscf_hmac_start=(e,t)=>(s._vscf_hmac_start=Ge.Wg)(e,t),s._vscf_hmac_finish=(e,t)=>(s._vscf_hmac_finish=Ge.Xg)(e,t),s._vscf_hmac_update=(e,t)=>(s._vscf_hmac_update=Ge.Yg)(e,t),s._vscf_hmac_reset=e=>(s._vscf_hmac_reset=Ge.Zg)(e),s._vscf_hmac_release_hash=e=>(s._vscf_hmac_release_hash=Ge._g)(e),s._vscf_hmac_new=()=>(s._vscf_hmac_new=Ge.$g)(),s._vscf_hmac_delete=e=>(s._vscf_hmac_delete=Ge.ah)(e),s._vscf_hmac_shallow_copy=e=>(s._vscf_hmac_shallow_copy=Ge.bh)(e),s._vscf_hmac_use_hash=(e,t)=>(s._vscf_hmac_use_hash=Ge.ch)(e,t),s._vscf_hybrid_key_alg_setup_defaults=e=>(s._vscf_hybrid_key_alg_setup_defaults=Ge.dh)(e),s._vscf_hybrid_key_alg_make_key=(e,t,_,r)=>(s._vscf_hybrid_key_alg_make_key=Ge.eh)(e,t,_,r),s._vscf_hybrid_key_alg_generate_ephemeral_key=(e,t,_)=>(s._vscf_hybrid_key_alg_generate_ephemeral_key=Ge.fh)(e,t,_),s._vscf_hybrid_key_alg_import_public_key=(e,t,_)=>(s._vscf_hybrid_key_alg_import_public_key=Ge.gh)(e,t,_),s._vscf_hybrid_key_alg_import_public_key_data=(e,t,_,r)=>(s._vscf_hybrid_key_alg_import_public_key_data=Ge.hh)(e,t,_,r),s._vscf_hybrid_key_alg_export_public_key=(e,t,_)=>(s._vscf_hybrid_key_alg_export_public_key=Ge.ih)(e,t,_),s._vscf_hybrid_key_alg_exported_public_key_data_len=(e,t)=>(s._vscf_hybrid_key_alg_exported_public_key_data_len=Ge.jh)(e,t),s._vscf_hybrid_key_alg_export_public_key_data=(e,t,_)=>(s._vscf_hybrid_key_alg_export_public_key_data=Ge.kh)(e,t,_),s._vscf_hybrid_key_alg_import_private_key=(e,t,_)=>(s._vscf_hybrid_key_alg_import_private_key=Ge.lh)(e,t,_),s._vscf_hybrid_key_alg_import_private_key_data=(e,t,_,r)=>(s._vscf_hybrid_key_alg_import_private_key_data=Ge.mh)(e,t,_,r),s._vscf_hybrid_key_alg_export_private_key=(e,t,_)=>(s._vscf_hybrid_key_alg_export_private_key=Ge.nh)(e,t,_),s._vscf_hybrid_key_alg_exported_private_key_data_len=(e,t)=>(s._vscf_hybrid_key_alg_exported_private_key_data_len=Ge.oh)(e,t),s._vscf_hybrid_key_alg_export_private_key_data=(e,t,_)=>(s._vscf_hybrid_key_alg_export_private_key_data=Ge.ph)(e,t,_),s._vscf_hybrid_key_alg_can_encrypt=(e,t,_)=>(s._vscf_hybrid_key_alg_can_encrypt=Ge.qh)(e,t,_),s._vscf_hybrid_key_alg_encrypted_len=(e,t,_)=>(s._vscf_hybrid_key_alg_encrypted_len=Ge.rh)(e,t,_),s._vscf_hybrid_key_alg_encrypt=(e,t,_,r)=>(s._vscf_hybrid_key_alg_encrypt=Ge.sh)(e,t,_,r),s._vscf_hybrid_key_alg_can_decrypt=(e,t,_)=>(s._vscf_hybrid_key_alg_can_decrypt=Ge.th)(e,t,_),s._vscf_hybrid_key_alg_decrypted_len=(e,t,_)=>(s._vscf_hybrid_key_alg_decrypted_len=Ge.uh)(e,t,_),s._vscf_hybrid_key_alg_decrypt=(e,t,_,r)=>(s._vscf_hybrid_key_alg_decrypt=Ge.vh)(e,t,_,r),s._vscf_hybrid_key_alg_can_sign=(e,t)=>(s._vscf_hybrid_key_alg_can_sign=Ge.wh)(e,t),s._vscf_hybrid_key_alg_signature_len=(e,t)=>(s._vscf_hybrid_key_alg_signature_len=Ge.xh)(e,t),s._vscf_hybrid_key_alg_sign_hash=(e,t,_,r,n)=>(s._vscf_hybrid_key_alg_sign_hash=Ge.yh)(e,t,_,r,n),s._vscf_hybrid_key_alg_can_verify=(e,t)=>(s._vscf_hybrid_key_alg_can_verify=Ge.zh)(e,t),s._vscf_hybrid_key_alg_verify_hash=(e,t,_,r,n)=>(s._vscf_hybrid_key_alg_verify_hash=Ge.Ah)(e,t,_,r,n),s._vscf_hybrid_key_alg_release_random=e=>(s._vscf_hybrid_key_alg_release_random=Ge.Bh)(e),s._vscf_hybrid_key_alg_release_cipher=e=>(s._vscf_hybrid_key_alg_release_cipher=Ge.Ch)(e),s._vscf_hybrid_key_alg_release_hash=e=>(s._vscf_hybrid_key_alg_release_hash=Ge.Dh)(e),s._vscf_hybrid_key_alg_new=()=>(s._vscf_hybrid_key_alg_new=Ge.Eh)(),s._vscf_hybrid_key_alg_delete=e=>(s._vscf_hybrid_key_alg_delete=Ge.Fh)(e),s._vscf_hybrid_key_alg_shallow_copy=e=>(s._vscf_hybrid_key_alg_shallow_copy=Ge.Gh)(e),s._vscf_hybrid_key_alg_use_random=(e,t)=>(s._vscf_hybrid_key_alg_use_random=Ge.Hh)(e,t),s._vscf_hybrid_key_alg_use_cipher=(e,t)=>(s._vscf_hybrid_key_alg_use_cipher=Ge.Ih)(e,t),s._vscf_hybrid_key_alg_use_hash=(e,t)=>(s._vscf_hybrid_key_alg_use_hash=Ge.Jh)(e,t),s._vscf_hybrid_key_alg_info_first_key_alg_info=e=>(s._vscf_hybrid_key_alg_info_first_key_alg_info=Ge.Kh)(e),s._vscf_hybrid_key_alg_info_second_key_alg_info=e=>(s._vscf_hybrid_key_alg_info_second_key_alg_info=Ge.Lh)(e),s._vscf_hybrid_key_alg_info_alg_id=e=>(s._vscf_hybrid_key_alg_info_alg_id=Ge.Mh)(e),s._vscf_hybrid_key_alg_info_new=()=>(s._vscf_hybrid_key_alg_info_new=Ge.Nh)(),s._vscf_hybrid_key_alg_info_delete=e=>(s._vscf_hybrid_key_alg_info_delete=Ge.Oh)(e),s._vscf_hybrid_key_alg_info_shallow_copy=e=>(s._vscf_hybrid_key_alg_info_shallow_copy=Ge.Ph)(e),s._vscf_hybrid_private_key_first_key=e=>(s._vscf_hybrid_private_key_first_key=Ge.Qh)(e),s._vscf_hybrid_private_key_second_key=e=>(s._vscf_hybrid_private_key_second_key=Ge.Rh)(e),s._vscf_hybrid_private_key_alg_id=e=>(s._vscf_hybrid_private_key_alg_id=Ge.Sh)(e),s._vscf_hybrid_private_key_alg_info=e=>(s._vscf_hybrid_private_key_alg_info=Ge.Th)(e),s._vscf_hybrid_private_key_len=e=>(s._vscf_hybrid_private_key_len=Ge.Uh)(e),s._vscf_hybrid_private_key_bitlen=e=>(s._vscf_hybrid_private_key_bitlen=Ge.Vh)(e),s._vscf_hybrid_private_key_impl_tag=e=>(s._vscf_hybrid_private_key_impl_tag=Ge.Wh)(e),s._vscf_hybrid_private_key_is_valid=e=>(s._vscf_hybrid_private_key_is_valid=Ge.Xh)(e),s._vscf_hybrid_private_key_extract_public_key=e=>(s._vscf_hybrid_private_key_extract_public_key=Ge.Yh)(e),s._vscf_hybrid_private_key_new=()=>(s._vscf_hybrid_private_key_new=Ge.Zh)(),s._vscf_hybrid_private_key_delete=e=>(s._vscf_hybrid_private_key_delete=Ge._h)(e),s._vscf_hybrid_private_key_shallow_copy=e=>(s._vscf_hybrid_private_key_shallow_copy=Ge.$h)(e),s._vscf_hybrid_public_key_first_key=e=>(s._vscf_hybrid_public_key_first_key=Ge.ai)(e),s._vscf_hybrid_public_key_second_key=e=>(s._vscf_hybrid_public_key_second_key=Ge.bi)(e),s._vscf_hybrid_public_key_alg_id=e=>(s._vscf_hybrid_public_key_alg_id=Ge.ci)(e),s._vscf_hybrid_public_key_alg_info=e=>(s._vscf_hybrid_public_key_alg_info=Ge.di)(e),s._vscf_hybrid_public_key_len=e=>(s._vscf_hybrid_public_key_len=Ge.ei)(e),s._vscf_hybrid_public_key_bitlen=e=>(s._vscf_hybrid_public_key_bitlen=Ge.fi)(e),s._vscf_hybrid_public_key_impl_tag=e=>(s._vscf_hybrid_public_key_impl_tag=Ge.gi)(e),s._vscf_hybrid_public_key_is_valid=e=>(s._vscf_hybrid_public_key_is_valid=Ge.hi)(e),s._vscf_hybrid_public_key_new=()=>(s._vscf_hybrid_public_key_new=Ge.ii)(),s._vscf_hybrid_public_key_delete=e=>(s._vscf_hybrid_public_key_delete=Ge.ji)(e),s._vscf_hybrid_public_key_shallow_copy=e=>(s._vscf_hybrid_public_key_shallow_copy=Ge.ki)(e),s._vscf_kdf1_alg_id=e=>(s._vscf_kdf1_alg_id=Ge.li)(e),s._vscf_kdf1_produce_alg_info=e=>(s._vscf_kdf1_produce_alg_info=Ge.mi)(e),s._vscf_kdf1_restore_alg_info=(e,t)=>(s._vscf_kdf1_restore_alg_info=Ge.ni)(e,t),s._vscf_kdf1_derive=(e,t,_,r)=>(s._vscf_kdf1_derive=Ge.oi)(e,t,_,r),s._vscf_kdf1_release_hash=e=>(s._vscf_kdf1_release_hash=Ge.pi)(e),s._vscf_kdf1_new=()=>(s._vscf_kdf1_new=Ge.qi)(),s._vscf_kdf1_delete=e=>(s._vscf_kdf1_delete=Ge.ri)(e),s._vscf_kdf1_shallow_copy=e=>(s._vscf_kdf1_shallow_copy=Ge.si)(e),s._vscf_kdf1_use_hash=(e,t)=>(s._vscf_kdf1_use_hash=Ge.ti)(e,t),s._vscf_kdf2_alg_id=e=>(s._vscf_kdf2_alg_id=Ge.ui)(e),s._vscf_kdf2_produce_alg_info=e=>(s._vscf_kdf2_produce_alg_info=Ge.vi)(e),s._vscf_kdf2_restore_alg_info=(e,t)=>(s._vscf_kdf2_restore_alg_info=Ge.wi)(e,t),s._vscf_kdf2_derive=(e,t,_,r)=>(s._vscf_kdf2_derive=Ge.xi)(e,t,_,r),s._vscf_kdf2_release_hash=e=>(s._vscf_kdf2_release_hash=Ge.yi)(e),s._vscf_kdf2_new=()=>(s._vscf_kdf2_new=Ge.zi)(),s._vscf_kdf2_delete=e=>(s._vscf_kdf2_delete=Ge.Ai)(e),s._vscf_kdf2_shallow_copy=e=>(s._vscf_kdf2_shallow_copy=Ge.Bi)(e),s._vscf_kdf2_use_hash=(e,t)=>(s._vscf_kdf2_use_hash=Ge.Ci)(e,t),s._vscf_key_asn1_deserializer_setup_defaults=e=>(s._vscf_key_asn1_deserializer_setup_defaults=Ge.Di)(e),s._vscf_key_asn1_deserializer_deserialize_public_key_inplace=(e,t)=>(s._vscf_key_asn1_deserializer_deserialize_public_key_inplace=Ge.Ei)(e,t),s._vscf_key_asn1_deserializer_deserialize_private_key_inplace=(e,t)=>(s._vscf_key_asn1_deserializer_deserialize_private_key_inplace=Ge.Fi)(e,t),s._vscf_key_asn1_deserializer_deserialize_public_key=(e,t,_)=>(s._vscf_key_asn1_deserializer_deserialize_public_key=Ge.Gi)(e,t,_),s._vscf_key_asn1_deserializer_deserialize_private_key=(e,t,_)=>(s._vscf_key_asn1_deserializer_deserialize_private_key=Ge.Hi)(e,t,_),s._vscf_key_asn1_deserializer_release_asn1_reader=e=>(s._vscf_key_asn1_deserializer_release_asn1_reader=Ge.Ii)(e),s._vscf_key_asn1_deserializer_new=()=>(s._vscf_key_asn1_deserializer_new=Ge.Ji)(),s._vscf_key_asn1_deserializer_delete=e=>(s._vscf_key_asn1_deserializer_delete=Ge.Ki)(e),s._vscf_key_asn1_deserializer_shallow_copy=e=>(s._vscf_key_asn1_deserializer_shallow_copy=Ge.Li)(e),s._vscf_key_asn1_deserializer_use_asn1_reader=(e,t)=>(s._vscf_key_asn1_deserializer_use_asn1_reader=Ge.Mi)(e,t),s._vscf_key_asn1_serializer_setup_defaults=e=>(s._vscf_key_asn1_serializer_setup_defaults=Ge.Ni)(e),s._vscf_key_asn1_serializer_serialize_public_key_inplace=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_public_key_inplace=Ge.Oi)(e,t,_),s._vscf_key_asn1_serializer_serialized_public_key_len=(e,t)=>(s._vscf_key_asn1_serializer_serialized_public_key_len=Ge.Pi)(e,t),s._vscf_key_asn1_serializer_serialize_private_key_inplace=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_private_key_inplace=Ge.Qi)(e,t,_),s._vscf_key_asn1_serializer_serialized_private_key_len=(e,t)=>(s._vscf_key_asn1_serializer_serialized_private_key_len=Ge.Ri)(e,t),s._vscf_key_asn1_serializer_serialize_public_key=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_public_key=Ge.Si)(e,t,_),s._vscf_key_asn1_serializer_serialize_private_key=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_private_key=Ge.Ti)(e,t,_),s._vscf_key_asn1_serializer_release_asn1_writer=e=>(s._vscf_key_asn1_serializer_release_asn1_writer=Ge.Ui)(e),s._vscf_key_asn1_serializer_new=()=>(s._vscf_key_asn1_serializer_new=Ge.Vi)(),s._vscf_key_asn1_serializer_delete=e=>(s._vscf_key_asn1_serializer_delete=Ge.Wi)(e),s._vscf_key_asn1_serializer_shallow_copy=e=>(s._vscf_key_asn1_serializer_shallow_copy=Ge.Xi)(e),s._vscf_key_asn1_serializer_use_asn1_writer=(e,t)=>(s._vscf_key_asn1_serializer_use_asn1_writer=Ge.Yi)(e,t),s._vscf_key_material_rng_reset_key_material=(e,t)=>(s._vscf_key_material_rng_reset_key_material=Ge.Zi)(e,t),s._vscf_key_material_rng_random=(e,t,_)=>(s._vscf_key_material_rng_random=Ge._i)(e,t,_),s._vscf_key_material_rng_reseed=e=>(s._vscf_key_material_rng_reseed=Ge.$i)(e),s._vscf_key_material_rng_new=()=>(s._vscf_key_material_rng_new=Ge.aj)(),s._vscf_key_material_rng_delete=e=>(s._vscf_key_material_rng_delete=Ge.bj)(e),s._vscf_key_material_rng_shallow_copy=e=>(s._vscf_key_material_rng_shallow_copy=Ge.cj)(e),s._vscf_message_info_der_serializer_setup_defaults=e=>(s._vscf_message_info_der_serializer_setup_defaults=Ge.dj)(e),s._vscf_message_info_der_serializer_serialized_len=(e,t)=>(s._vscf_message_info_der_serializer_serialized_len=Ge.ej)(e,t),s._vscf_message_info_der_serializer_serialize=(e,t,_)=>(s._vscf_message_info_der_serializer_serialize=Ge.fj)(e,t,_),s._vscf_message_info_der_serializer_read_prefix=(e,t)=>(s._vscf_message_info_der_serializer_read_prefix=Ge.gj)(e,t),s._vscf_message_info_der_serializer_deserialize=(e,t,_)=>(s._vscf_message_info_der_serializer_deserialize=Ge.hj)(e,t,_),s._vscf_message_info_der_serializer_serialized_footer_len=(e,t)=>(s._vscf_message_info_der_serializer_serialized_footer_len=Ge.ij)(e,t),s._vscf_message_info_der_serializer_serialize_footer=(e,t,_)=>(s._vscf_message_info_der_serializer_serialize_footer=Ge.jj)(e,t,_),s._vscf_message_info_der_serializer_deserialize_footer=(e,t,_)=>(s._vscf_message_info_der_serializer_deserialize_footer=Ge.kj)(e,t,_),s._vscf_message_info_der_serializer_release_asn1_reader=e=>(s._vscf_message_info_der_serializer_release_asn1_reader=Ge.lj)(e),s._vscf_message_info_der_serializer_release_asn1_writer=e=>(s._vscf_message_info_der_serializer_release_asn1_writer=Ge.mj)(e),s._vscf_message_info_der_serializer_new=()=>(s._vscf_message_info_der_serializer_new=Ge.nj)(),s._vscf_message_info_der_serializer_delete=e=>(s._vscf_message_info_der_serializer_delete=Ge.oj)(e),s._vscf_message_info_der_serializer_shallow_copy=e=>(s._vscf_message_info_der_serializer_shallow_copy=Ge.pj)(e),s._vscf_message_info_der_serializer_use_asn1_reader=(e,t)=>(s._vscf_message_info_der_serializer_use_asn1_reader=Ge.qj)(e,t),s._vscf_message_info_der_serializer_use_asn1_writer=(e,t)=>(s._vscf_message_info_der_serializer_use_asn1_writer=Ge.rj)(e,t),s._vscf_pbe_alg_info_kdf_alg_info=e=>(s._vscf_pbe_alg_info_kdf_alg_info=Ge.sj)(e),s._vscf_pbe_alg_info_cipher_alg_info=e=>(s._vscf_pbe_alg_info_cipher_alg_info=Ge.tj)(e),s._vscf_pbe_alg_info_alg_id=e=>(s._vscf_pbe_alg_info_alg_id=Ge.uj)(e),s._vscf_pbe_alg_info_new=()=>(s._vscf_pbe_alg_info_new=Ge.vj)(),s._vscf_pbe_alg_info_delete=e=>(s._vscf_pbe_alg_info_delete=Ge.wj)(e),s._vscf_pbe_alg_info_shallow_copy=e=>(s._vscf_pbe_alg_info_shallow_copy=Ge.xj)(e),s._vscf_pkcs5_pbes2_reset=(e,t)=>(s._vscf_pkcs5_pbes2_reset=Ge.yj)(e,t),s._vscf_pkcs5_pbes2_alg_id=e=>(s._vscf_pkcs5_pbes2_alg_id=Ge.zj)(e),s._vscf_pkcs5_pbes2_produce_alg_info=e=>(s._vscf_pkcs5_pbes2_produce_alg_info=Ge.Aj)(e),s._vscf_pkcs5_pbes2_restore_alg_info=(e,t)=>(s._vscf_pkcs5_pbes2_restore_alg_info=Ge.Bj)(e,t),s._vscf_pkcs5_pbes2_encrypt=(e,t,_)=>(s._vscf_pkcs5_pbes2_encrypt=Ge.Cj)(e,t,_),s._vscf_pkcs5_pbes2_encrypted_len=(e,t)=>(s._vscf_pkcs5_pbes2_encrypted_len=Ge.Dj)(e,t),s._vscf_pkcs5_pbes2_precise_encrypted_len=(e,t)=>(s._vscf_pkcs5_pbes2_precise_encrypted_len=Ge.Ej)(e,t),s._vscf_pkcs5_pbes2_decrypt=(e,t,_)=>(s._vscf_pkcs5_pbes2_decrypt=Ge.Fj)(e,t,_),s._vscf_pkcs5_pbes2_decrypted_len=(e,t)=>(s._vscf_pkcs5_pbes2_decrypted_len=Ge.Gj)(e,t),s._vscf_pkcs5_pbes2_release_kdf=e=>(s._vscf_pkcs5_pbes2_release_kdf=Ge.Hj)(e),s._vscf_pkcs5_pbes2_release_cipher=e=>(s._vscf_pkcs5_pbes2_release_cipher=Ge.Ij)(e),s._vscf_pkcs5_pbes2_new=()=>(s._vscf_pkcs5_pbes2_new=Ge.Jj)(),s._vscf_pkcs5_pbes2_delete=e=>(s._vscf_pkcs5_pbes2_delete=Ge.Kj)(e),s._vscf_pkcs5_pbes2_shallow_copy=e=>(s._vscf_pkcs5_pbes2_shallow_copy=Ge.Lj)(e),s._vscf_pkcs5_pbes2_use_kdf=(e,t)=>(s._vscf_pkcs5_pbes2_use_kdf=Ge.Mj)(e,t),s._vscf_pkcs5_pbes2_use_cipher=(e,t)=>(s._vscf_pkcs5_pbes2_use_cipher=Ge.Nj)(e,t),s._vscf_pkcs5_pbkdf2_setup_defaults=e=>(s._vscf_pkcs5_pbkdf2_setup_defaults=Ge.Oj)(e),s._vscf_pkcs5_pbkdf2_alg_id=e=>(s._vscf_pkcs5_pbkdf2_alg_id=Ge.Pj)(e),s._vscf_pkcs5_pbkdf2_produce_alg_info=e=>(s._vscf_pkcs5_pbkdf2_produce_alg_info=Ge.Qj)(e),s._vscf_pkcs5_pbkdf2_restore_alg_info=(e,t)=>(s._vscf_pkcs5_pbkdf2_restore_alg_info=Ge.Rj)(e,t),s._vscf_pkcs5_pbkdf2_reset=(e,t,_)=>(s._vscf_pkcs5_pbkdf2_reset=Ge.Sj)(e,t,_),s._vscf_pkcs5_pbkdf2_derive=(e,t,_,r)=>(s._vscf_pkcs5_pbkdf2_derive=Ge.Tj)(e,t,_,r),s._vscf_pkcs5_pbkdf2_set_info=(e,t)=>(s._vscf_pkcs5_pbkdf2_set_info=Ge.Uj)(e,t),s._vscf_pkcs5_pbkdf2_release_hmac=e=>(s._vscf_pkcs5_pbkdf2_release_hmac=Ge.Vj)(e),s._vscf_pkcs5_pbkdf2_new=()=>(s._vscf_pkcs5_pbkdf2_new=Ge.Wj)(),s._vscf_pkcs5_pbkdf2_delete=e=>(s._vscf_pkcs5_pbkdf2_delete=Ge.Xj)(e),s._vscf_pkcs5_pbkdf2_shallow_copy=e=>(s._vscf_pkcs5_pbkdf2_shallow_copy=Ge.Yj)(e),s._vscf_pkcs5_pbkdf2_use_hmac=(e,t)=>(s._vscf_pkcs5_pbkdf2_use_hmac=Ge.Zj)(e,t),s._vscf_pkcs8_serializer_setup_defaults=e=>(s._vscf_pkcs8_serializer_setup_defaults=Ge._j)(e),s._vscf_pkcs8_serializer_serialize_public_key_inplace=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_public_key_inplace=Ge.$j)(e,t,_),s._vscf_pkcs8_serializer_serialized_public_key_len=(e,t)=>(s._vscf_pkcs8_serializer_serialized_public_key_len=Ge.ak)(e,t),s._vscf_pkcs8_serializer_serialize_private_key_inplace=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_private_key_inplace=Ge.bk)(e,t,_),s._vscf_pkcs8_serializer_serialized_private_key_len=(e,t)=>(s._vscf_pkcs8_serializer_serialized_private_key_len=Ge.ck)(e,t),s._vscf_pkcs8_serializer_serialize_public_key=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_public_key=Ge.dk)(e,t,_),s._vscf_pkcs8_serializer_serialize_private_key=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_private_key=Ge.ek)(e,t,_),s._vscf_pkcs8_serializer_release_asn1_writer=e=>(s._vscf_pkcs8_serializer_release_asn1_writer=Ge.fk)(e),s._vscf_pkcs8_serializer_new=()=>(s._vscf_pkcs8_serializer_new=Ge.gk)(),s._vscf_pkcs8_serializer_delete=e=>(s._vscf_pkcs8_serializer_delete=Ge.hk)(e),s._vscf_pkcs8_serializer_shallow_copy=e=>(s._vscf_pkcs8_serializer_shallow_copy=Ge.ik)(e),s._vscf_pkcs8_serializer_use_asn1_writer=(e,t)=>(s._vscf_pkcs8_serializer_use_asn1_writer=Ge.jk)(e,t),s._vscf_random_padding_alg_id=e=>(s._vscf_random_padding_alg_id=Ge.kk)(e),s._vscf_random_padding_produce_alg_info=e=>(s._vscf_random_padding_produce_alg_info=Ge.lk)(e),s._vscf_random_padding_restore_alg_info=(e,t)=>(s._vscf_random_padding_restore_alg_info=Ge.mk)(e,t),s._vscf_random_padding_configure=(e,t)=>(s._vscf_random_padding_configure=Ge.nk)(e,t),s._vscf_random_padding_padded_data_len=(e,t)=>(s._vscf_random_padding_padded_data_len=Ge.ok)(e,t),s._vscf_random_padding_len=e=>(s._vscf_random_padding_len=Ge.pk)(e),s._vscf_random_padding_len_max=e=>(s._vscf_random_padding_len_max=Ge.qk)(e),s._vscf_random_padding_start_data_processing=e=>(s._vscf_random_padding_start_data_processing=Ge.rk)(e),s._vscf_random_padding_process_data=(e,t,_)=>(s._vscf_random_padding_process_data=Ge.sk)(e,t,_),s._vscf_random_padding_finish_data_processing=(e,t)=>(s._vscf_random_padding_finish_data_processing=Ge.tk)(e,t),s._vscf_random_padding_start_padded_data_processing=e=>(s._vscf_random_padding_start_padded_data_processing=Ge.uk)(e),s._vscf_random_padding_process_padded_data=(e,t,_)=>(s._vscf_random_padding_process_padded_data=Ge.vk)(e,t,_),s._vscf_random_padding_finish_padded_data_processing_out_len=e=>(s._vscf_random_padding_finish_padded_data_processing_out_len=Ge.wk)(e),s._vscf_random_padding_finish_padded_data_processing=(e,t)=>(s._vscf_random_padding_finish_padded_data_processing=Ge.xk)(e,t),s._vscf_random_padding_release_random=e=>(s._vscf_random_padding_release_random=Ge.yk)(e),s._vscf_random_padding_new=()=>(s._vscf_random_padding_new=Ge.zk)(),s._vscf_random_padding_delete=e=>(s._vscf_random_padding_delete=Ge.Ak)(e),s._vscf_random_padding_shallow_copy=e=>(s._vscf_random_padding_shallow_copy=Ge.Bk)(e),s._vscf_random_padding_use_random=(e,t)=>(s._vscf_random_padding_use_random=Ge.Ck)(e,t),s._vscf_raw_private_key_data=(e,t)=>(s._vscf_raw_private_key_data=Ge.Dk)(e,t),s._vscf_raw_private_key_has_public_key=e=>(s._vscf_raw_private_key_has_public_key=Ge.Ek)(e),s._vscf_raw_private_key_set_public_key=(e,t)=>(s._vscf_raw_private_key_set_public_key=Ge.Fk)(e,t),s._vscf_raw_private_key_get_public_key=e=>(s._vscf_raw_private_key_get_public_key=Ge.Gk)(e),s._vscf_raw_private_key_alg_id=e=>(s._vscf_raw_private_key_alg_id=Ge.Hk)(e),s._vscf_raw_private_key_alg_info=e=>(s._vscf_raw_private_key_alg_info=Ge.Ik)(e),s._vscf_raw_private_key_len=e=>(s._vscf_raw_private_key_len=Ge.Jk)(e),s._vscf_raw_private_key_bitlen=e=>(s._vscf_raw_private_key_bitlen=Ge.Kk)(e),s._vscf_raw_private_key_impl_tag=e=>(s._vscf_raw_private_key_impl_tag=Ge.Lk)(e),s._vscf_raw_private_key_is_valid=e=>(s._vscf_raw_private_key_is_valid=Ge.Mk)(e),s._vscf_raw_private_key_extract_public_key=e=>(s._vscf_raw_private_key_extract_public_key=Ge.Nk)(e),s._vscf_raw_private_key_new=()=>(s._vscf_raw_private_key_new=Ge.Ok)(),s._vscf_raw_private_key_delete=e=>(s._vscf_raw_private_key_delete=Ge.Pk)(e),s._vscf_raw_private_key_shallow_copy=e=>(s._vscf_raw_private_key_shallow_copy=Ge.Qk)(e),s._vscf_raw_public_key_data=(e,t)=>(s._vscf_raw_public_key_data=Ge.Rk)(e,t),s._vscf_raw_public_key_alg_id=e=>(s._vscf_raw_public_key_alg_id=Ge.Sk)(e),s._vscf_raw_public_key_alg_info=e=>(s._vscf_raw_public_key_alg_info=Ge.Tk)(e),s._vscf_raw_public_key_len=e=>(s._vscf_raw_public_key_len=Ge.Uk)(e),s._vscf_raw_public_key_bitlen=e=>(s._vscf_raw_public_key_bitlen=Ge.Vk)(e),s._vscf_raw_public_key_impl_tag=e=>(s._vscf_raw_public_key_impl_tag=Ge.Wk)(e),s._vscf_raw_public_key_is_valid=e=>(s._vscf_raw_public_key_is_valid=Ge.Xk)(e),s._vscf_raw_public_key_new=()=>(s._vscf_raw_public_key_new=Ge.Yk)(),s._vscf_raw_public_key_delete=e=>(s._vscf_raw_public_key_delete=Ge.Zk)(e),s._vscf_raw_public_key_shallow_copy=e=>(s._vscf_raw_public_key_shallow_copy=Ge._k)(e),s._vscf_round5_setup_defaults=e=>(s._vscf_round5_setup_defaults=Ge.$k)(e),s._vscf_round5_generate_key=(e,t,_)=>(s._vscf_round5_generate_key=Ge.al)(e,t,_),s._vscf_round5_generate_ephemeral_key=(e,t,_)=>(s._vscf_round5_generate_ephemeral_key=Ge.bl)(e,t,_),s._vscf_round5_import_public_key=(e,t,_)=>(s._vscf_round5_import_public_key=Ge.cl)(e,t,_),s._vscf_round5_import_public_key_data=(e,t,_,r)=>(s._vscf_round5_import_public_key_data=Ge.dl)(e,t,_,r),s._vscf_round5_export_public_key=(e,t,_)=>(s._vscf_round5_export_public_key=Ge.el)(e,t,_),s._vscf_round5_exported_public_key_data_len=(e,t)=>(s._vscf_round5_exported_public_key_data_len=Ge.fl)(e,t),s._vscf_round5_export_public_key_data=(e,t,_)=>(s._vscf_round5_export_public_key_data=Ge.gl)(e,t,_),s._vscf_round5_import_private_key=(e,t,_)=>(s._vscf_round5_import_private_key=Ge.hl)(e,t,_),s._vscf_round5_import_private_key_data=(e,t,_,r)=>(s._vscf_round5_import_private_key_data=Ge.il)(e,t,_,r),s._vscf_round5_export_private_key=(e,t,_)=>(s._vscf_round5_export_private_key=Ge.jl)(e,t,_),s._vscf_round5_exported_private_key_data_len=(e,t)=>(s._vscf_round5_exported_private_key_data_len=Ge.kl)(e,t),s._vscf_round5_export_private_key_data=(e,t,_)=>(s._vscf_round5_export_private_key_data=Ge.ll)(e,t,_),s._vscf_round5_kem_shared_key_len=(e,t)=>(s._vscf_round5_kem_shared_key_len=Ge.ml)(e,t),s._vscf_round5_kem_encapsulated_key_len=(e,t)=>(s._vscf_round5_kem_encapsulated_key_len=Ge.nl)(e,t),s._vscf_round5_kem_encapsulate=(e,t,_,r)=>(s._vscf_round5_kem_encapsulate=Ge.ol)(e,t,_,r),s._vscf_round5_kem_decapsulate=(e,t,_,r)=>(s._vscf_round5_kem_decapsulate=Ge.pl)(e,t,_,r),s._vscf_round5_release_random=e=>(s._vscf_round5_release_random=Ge.ql)(e),s._vscf_round5_new=()=>(s._vscf_round5_new=Ge.rl)(),s._vscf_round5_delete=e=>(s._vscf_round5_delete=Ge.sl)(e),s._vscf_round5_shallow_copy=e=>(s._vscf_round5_shallow_copy=Ge.tl)(e),s._vscf_round5_use_random=(e,t)=>(s._vscf_round5_use_random=Ge.ul)(e,t),s._vscf_rsa_setup_defaults=e=>(s._vscf_rsa_setup_defaults=Ge.vl)(e),s._vscf_rsa_generate_key=(e,t,_)=>(s._vscf_rsa_generate_key=Ge.wl)(e,t,_),s._vscf_rsa_generate_ephemeral_key=(e,t,_)=>(s._vscf_rsa_generate_ephemeral_key=Ge.xl)(e,t,_),s._vscf_rsa_import_public_key=(e,t,_)=>(s._vscf_rsa_import_public_key=Ge.yl)(e,t,_),s._vscf_rsa_import_public_key_data=(e,t,_,r)=>(s._vscf_rsa_import_public_key_data=Ge.zl)(e,t,_,r),s._vscf_rsa_export_public_key=(e,t,_)=>(s._vscf_rsa_export_public_key=Ge.Al)(e,t,_),s._vscf_rsa_exported_public_key_data_len=(e,t)=>(s._vscf_rsa_exported_public_key_data_len=Ge.Bl)(e,t),s._vscf_rsa_export_public_key_data=(e,t,_)=>(s._vscf_rsa_export_public_key_data=Ge.Cl)(e,t,_),s._vscf_rsa_import_private_key=(e,t,_)=>(s._vscf_rsa_import_private_key=Ge.Dl)(e,t,_),s._vscf_rsa_import_private_key_data=(e,t,_,r)=>(s._vscf_rsa_import_private_key_data=Ge.El)(e,t,_,r),s._vscf_rsa_export_private_key=(e,t,_)=>(s._vscf_rsa_export_private_key=Ge.Fl)(e,t,_),s._vscf_rsa_exported_private_key_data_len=(e,t)=>(s._vscf_rsa_exported_private_key_data_len=Ge.Gl)(e,t),s._vscf_rsa_export_private_key_data=(e,t,_)=>(s._vscf_rsa_export_private_key_data=Ge.Hl)(e,t,_),s._vscf_rsa_can_encrypt=(e,t,_)=>(s._vscf_rsa_can_encrypt=Ge.Il)(e,t,_),s._vscf_rsa_encrypted_len=(e,t,_)=>(s._vscf_rsa_encrypted_len=Ge.Jl)(e,t,_),s._vscf_rsa_encrypt=(e,t,_,r)=>(s._vscf_rsa_encrypt=Ge.Kl)(e,t,_,r),s._vscf_rsa_can_decrypt=(e,t,_)=>(s._vscf_rsa_can_decrypt=Ge.Ll)(e,t,_),s._vscf_rsa_decrypted_len=(e,t,_)=>(s._vscf_rsa_decrypted_len=Ge.Ml)(e,t,_),s._vscf_rsa_decrypt=(e,t,_,r)=>(s._vscf_rsa_decrypt=Ge.Nl)(e,t,_,r),s._vscf_rsa_can_sign=(e,t)=>(s._vscf_rsa_can_sign=Ge.Ol)(e,t),s._vscf_rsa_signature_len=(e,t)=>(s._vscf_rsa_signature_len=Ge.Pl)(e,t),s._vscf_rsa_sign_hash=(e,t,_,r,n)=>(s._vscf_rsa_sign_hash=Ge.Ql)(e,t,_,r,n),s._vscf_rsa_can_verify=(e,t)=>(s._vscf_rsa_can_verify=Ge.Rl)(e,t),s._vscf_rsa_verify_hash=(e,t,_,r,n)=>(s._vscf_rsa_verify_hash=Ge.Sl)(e,t,_,r,n),s._vscf_rsa_release_random=e=>(s._vscf_rsa_release_random=Ge.Tl)(e),s._vscf_rsa_new=()=>(s._vscf_rsa_new=Ge.Ul)(),s._vscf_rsa_delete=e=>(s._vscf_rsa_delete=Ge.Vl)(e),s._vscf_rsa_shallow_copy=e=>(s._vscf_rsa_shallow_copy=Ge.Wl)(e),s._vscf_rsa_use_random=(e,t)=>(s._vscf_rsa_use_random=Ge.Xl)(e,t),s._vscf_rsa_private_key_is_valid=e=>(s._vscf_rsa_private_key_is_valid=Ge.Yl)(e),s._vscf_rsa_private_key_len=e=>(s._vscf_rsa_private_key_len=Ge.Zl)(e),s._vscf_rsa_private_key_alg_id=e=>(s._vscf_rsa_private_key_alg_id=Ge._l)(e),s._vscf_rsa_private_key_alg_info=e=>(s._vscf_rsa_private_key_alg_info=Ge.$l)(e),s._vscf_rsa_private_key_bitlen=e=>(s._vscf_rsa_private_key_bitlen=Ge.am)(e),s._vscf_rsa_private_key_impl_tag=e=>(s._vscf_rsa_private_key_impl_tag=Ge.bm)(e),s._vscf_rsa_private_key_extract_public_key=e=>(s._vscf_rsa_private_key_extract_public_key=Ge.cm)(e),s._vscf_rsa_private_key_new=()=>(s._vscf_rsa_private_key_new=Ge.dm)(),s._vscf_rsa_private_key_delete=e=>(s._vscf_rsa_private_key_delete=Ge.em)(e),s._vscf_rsa_private_key_shallow_copy=e=>(s._vscf_rsa_private_key_shallow_copy=Ge.fm)(e),s._vscf_rsa_public_key_key_exponent=e=>(s._vscf_rsa_public_key_key_exponent=Ge.gm)(e),s._vscf_rsa_public_key_is_valid=e=>(s._vscf_rsa_public_key_is_valid=Ge.hm)(e),s._vscf_rsa_public_key_len=e=>(s._vscf_rsa_public_key_len=Ge.im)(e),s._vscf_rsa_public_key_alg_id=e=>(s._vscf_rsa_public_key_alg_id=Ge.jm)(e),s._vscf_rsa_public_key_alg_info=e=>(s._vscf_rsa_public_key_alg_info=Ge.km)(e),s._vscf_rsa_public_key_bitlen=e=>(s._vscf_rsa_public_key_bitlen=Ge.lm)(e),s._vscf_rsa_public_key_impl_tag=e=>(s._vscf_rsa_public_key_impl_tag=Ge.mm)(e),s._vscf_rsa_public_key_new=()=>(s._vscf_rsa_public_key_new=Ge.nm)(),s._vscf_rsa_public_key_delete=e=>(s._vscf_rsa_public_key_delete=Ge.om)(e),s._vscf_rsa_public_key_shallow_copy=e=>(s._vscf_rsa_public_key_shallow_copy=Ge.pm)(e),s._vscf_salted_kdf_alg_info_hash_alg_info=e=>(s._vscf_salted_kdf_alg_info_hash_alg_info=Ge.qm)(e),s._vscf_salted_kdf_alg_info_salt=(e,t)=>(s._vscf_salted_kdf_alg_info_salt=Ge.rm)(e,t),s._vscf_salted_kdf_alg_info_iteration_count=e=>(s._vscf_salted_kdf_alg_info_iteration_count=Ge.sm)(e),s._vscf_salted_kdf_alg_info_alg_id=e=>(s._vscf_salted_kdf_alg_info_alg_id=Ge.tm)(e),s._vscf_salted_kdf_alg_info_new=()=>(s._vscf_salted_kdf_alg_info_new=Ge.um)(),s._vscf_salted_kdf_alg_info_delete=e=>(s._vscf_salted_kdf_alg_info_delete=Ge.vm)(e),s._vscf_salted_kdf_alg_info_shallow_copy=e=>(s._vscf_salted_kdf_alg_info_shallow_copy=Ge.wm)(e),s._vscf_sec1_serializer_setup_defaults=e=>(s._vscf_sec1_serializer_setup_defaults=Ge.xm)(e),s._vscf_sec1_serializer_serialize_public_key_inplace=(e,t,_)=>(s._vscf_sec1_serializer_serialize_public_key_inplace=Ge.ym)(e,t,_),s._vscf_sec1_serializer_serialized_public_key_len=(e,t)=>(s._vscf_sec1_serializer_serialized_public_key_len=Ge.zm)(e,t),s._vscf_sec1_serializer_serialize_private_key_inplace=(e,t,_)=>(s._vscf_sec1_serializer_serialize_private_key_inplace=Ge.Am)(e,t,_),s._vscf_sec1_serializer_serialized_private_key_len=(e,t)=>(s._vscf_sec1_serializer_serialized_private_key_len=Ge.Bm)(e,t),s._vscf_sec1_serializer_serialize_public_key=(e,t,_)=>(s._vscf_sec1_serializer_serialize_public_key=Ge.Cm)(e,t,_),s._vscf_sec1_serializer_serialize_private_key=(e,t,_)=>(s._vscf_sec1_serializer_serialize_private_key=Ge.Dm)(e,t,_),s._vscf_sec1_serializer_release_asn1_writer=e=>(s._vscf_sec1_serializer_release_asn1_writer=Ge.Em)(e),s._vscf_sec1_serializer_new=()=>(s._vscf_sec1_serializer_new=Ge.Fm)(),s._vscf_sec1_serializer_delete=e=>(s._vscf_sec1_serializer_delete=Ge.Gm)(e),s._vscf_sec1_serializer_shallow_copy=e=>(s._vscf_sec1_serializer_shallow_copy=Ge.Hm)(e),s._vscf_sec1_serializer_use_asn1_writer=(e,t)=>(s._vscf_sec1_serializer_use_asn1_writer=Ge.Im)(e,t),s._vscf_seed_entropy_source_reset_seed=(e,t)=>(s._vscf_seed_entropy_source_reset_seed=Ge.Jm)(e,t),s._vscf_seed_entropy_source_is_strong=e=>(s._vscf_seed_entropy_source_is_strong=Ge.Km)(e),s._vscf_seed_entropy_source_gather=(e,t,_)=>(s._vscf_seed_entropy_source_gather=Ge.Lm)(e,t,_),s._vscf_seed_entropy_source_new=()=>(s._vscf_seed_entropy_source_new=Ge.Mm)(),s._vscf_seed_entropy_source_delete=e=>(s._vscf_seed_entropy_source_delete=Ge.Nm)(e),s._vscf_seed_entropy_source_shallow_copy=e=>(s._vscf_seed_entropy_source_shallow_copy=Ge.Om)(e),s._vscf_sha224_alg_id=e=>(s._vscf_sha224_alg_id=Ge.Pm)(e),s._vscf_sha224_produce_alg_info=e=>(s._vscf_sha224_produce_alg_info=Ge.Qm)(e),s._vscf_sha224_restore_alg_info=(e,t)=>(s._vscf_sha224_restore_alg_info=Ge.Rm)(e,t),s._vscf_sha224_hash=(e,t)=>(s._vscf_sha224_hash=Ge.Sm)(e,t),s._vscf_sha224_finish=(e,t)=>(s._vscf_sha224_finish=Ge.Tm)(e,t),s._vscf_sha224_start=e=>(s._vscf_sha224_start=Ge.Um)(e),s._vscf_sha224_update=(e,t)=>(s._vscf_sha224_update=Ge.Vm)(e,t),s._vscf_sha224_new=()=>(s._vscf_sha224_new=Ge.Wm)(),s._vscf_sha224_delete=e=>(s._vscf_sha224_delete=Ge.Xm)(e),s._vscf_sha224_shallow_copy=e=>(s._vscf_sha224_shallow_copy=Ge.Ym)(e),s._vscf_sha256_alg_id=e=>(s._vscf_sha256_alg_id=Ge.Zm)(e),s._vscf_sha256_produce_alg_info=e=>(s._vscf_sha256_produce_alg_info=Ge._m)(e),s._vscf_sha256_restore_alg_info=(e,t)=>(s._vscf_sha256_restore_alg_info=Ge.$m)(e,t),s._vscf_sha256_hash=(e,t)=>(s._vscf_sha256_hash=Ge.an)(e,t),s._vscf_sha256_finish=(e,t)=>(s._vscf_sha256_finish=Ge.bn)(e,t),s._vscf_sha256_start=e=>(s._vscf_sha256_start=Ge.cn)(e),s._vscf_sha256_update=(e,t)=>(s._vscf_sha256_update=Ge.dn)(e,t),s._vscf_sha256_new=()=>(s._vscf_sha256_new=Ge.en)(),s._vscf_sha256_delete=e=>(s._vscf_sha256_delete=Ge.fn)(e),s._vscf_sha256_shallow_copy=e=>(s._vscf_sha256_shallow_copy=Ge.gn)(e),s._vscf_sha384_alg_id=e=>(s._vscf_sha384_alg_id=Ge.hn)(e),s._vscf_sha384_produce_alg_info=e=>(s._vscf_sha384_produce_alg_info=Ge.jn)(e),s._vscf_sha384_restore_alg_info=(e,t)=>(s._vscf_sha384_restore_alg_info=Ge.kn)(e,t),s._vscf_sha384_hash=(e,t)=>(s._vscf_sha384_hash=Ge.ln)(e,t),s._vscf_sha384_finish=(e,t)=>(s._vscf_sha384_finish=Ge.mn)(e,t),s._vscf_sha384_start=e=>(s._vscf_sha384_start=Ge.nn)(e),s._vscf_sha384_update=(e,t)=>(s._vscf_sha384_update=Ge.on)(e,t),s._vscf_sha384_new=()=>(s._vscf_sha384_new=Ge.pn)(),s._vscf_sha384_delete=e=>(s._vscf_sha384_delete=Ge.qn)(e),s._vscf_sha384_shallow_copy=e=>(s._vscf_sha384_shallow_copy=Ge.rn)(e),s._vscf_sha512_alg_id=e=>(s._vscf_sha512_alg_id=Ge.sn)(e),s._vscf_sha512_produce_alg_info=e=>(s._vscf_sha512_produce_alg_info=Ge.tn)(e),s._vscf_sha512_restore_alg_info=(e,t)=>(s._vscf_sha512_restore_alg_info=Ge.un)(e,t),s._vscf_sha512_hash=(e,t)=>(s._vscf_sha512_hash=Ge.vn)(e,t),s._vscf_sha512_finish=(e,t)=>(s._vscf_sha512_finish=Ge.wn)(e,t),s._vscf_sha512_start=e=>(s._vscf_sha512_start=Ge.xn)(e),s._vscf_sha512_update=(e,t)=>(s._vscf_sha512_update=Ge.yn)(e,t),s._vscf_sha512_new=()=>(s._vscf_sha512_new=Ge.zn)(),s._vscf_sha512_delete=e=>(s._vscf_sha512_delete=Ge.An)(e),s._vscf_sha512_shallow_copy=e=>(s._vscf_sha512_shallow_copy=Ge.Bn)(e),s._vscf_simple_alg_info_alg_id=e=>(s._vscf_simple_alg_info_alg_id=Ge.Cn)(e),s._vscf_simple_alg_info_new=()=>(s._vscf_simple_alg_info_new=Ge.Dn)(),s._vscf_simple_alg_info_delete=e=>(s._vscf_simple_alg_info_delete=Ge.En)(e),s._vscf_simple_alg_info_shallow_copy=e=>(s._vscf_simple_alg_info_shallow_copy=Ge.Fn)(e),s._vscf_simple_alg_info_new_with_alg_id=e=>(s._vscf_simple_alg_info_new_with_alg_id=Ge.Gn)(e),s._vscf_alg_factory_create_hash_from_info=e=>(s._vscf_alg_factory_create_hash_from_info=Ge.Hn)(e),s._vscf_alg_factory_create_mac_from_info=e=>(s._vscf_alg_factory_create_mac_from_info=Ge.In)(e),s._vscf_alg_factory_create_kdf_from_info=e=>(s._vscf_alg_factory_create_kdf_from_info=Ge.Jn)(e),s._vscf_alg_factory_create_salted_kdf_from_info=e=>(s._vscf_alg_factory_create_salted_kdf_from_info=Ge.Kn)(e),s._vscf_alg_factory_create_cipher_from_info=e=>(s._vscf_alg_factory_create_cipher_from_info=Ge.Ln)(e),s._vscf_alg_factory_create_padding_from_info=(e,t)=>(s._vscf_alg_factory_create_padding_from_info=Ge.Mn)(e,t),s._vscf_base64_encoded_len=e=>(s._vscf_base64_encoded_len=Ge.Nn)(e),s._vscf_base64_encode=(e,t)=>(s._vscf_base64_encode=Ge.On)(e,t),s._vscf_base64_decoded_len=e=>(s._vscf_base64_decoded_len=Ge.Pn)(e),s._vscf_base64_decode=(e,t)=>(s._vscf_base64_decode=Ge.Qn)(e,t),s._vscf_brainkey_client_release_random=e=>(s._vscf_brainkey_client_release_random=Ge.Rn)(e),s._vscf_brainkey_client_release_operation_random=e=>(s._vscf_brainkey_client_release_operation_random=Ge.Sn)(e),s._vscf_brainkey_client_new=()=>(s._vscf_brainkey_client_new=Ge.Tn)(),s._vscf_brainkey_client_delete=e=>(s._vscf_brainkey_client_delete=Ge.Un)(e),s._vscf_brainkey_client_shallow_copy=e=>(s._vscf_brainkey_client_shallow_copy=Ge.Vn)(e),s._vscf_brainkey_client_use_random=(e,t)=>(s._vscf_brainkey_client_use_random=Ge.Wn)(e,t),s._vscf_brainkey_client_use_operation_random=(e,t)=>(s._vscf_brainkey_client_use_operation_random=Ge.Xn)(e,t),s._vscf_brainkey_client_setup_defaults=e=>(s._vscf_brainkey_client_setup_defaults=Ge.Yn)(e),s._vscf_brainkey_client_blind=(e,t,_,r)=>(s._vscf_brainkey_client_blind=Ge.Zn)(e,t,_,r),s._vscf_brainkey_client_deblind=(e,t,_,r,n,c)=>(s._vscf_brainkey_client_deblind=Ge._n)(e,t,_,r,n,c),s._vscf_brainkey_server_release_random=e=>(s._vscf_brainkey_server_release_random=Ge.$n)(e),s._vscf_brainkey_server_release_operation_random=e=>(s._vscf_brainkey_server_release_operation_random=Ge.ao)(e),s._vscf_brainkey_server_new=()=>(s._vscf_brainkey_server_new=Ge.bo)(),s._vscf_brainkey_server_delete=e=>(s._vscf_brainkey_server_delete=Ge.co)(e),s._vscf_brainkey_server_shallow_copy=e=>(s._vscf_brainkey_server_shallow_copy=Ge.eo)(e),s._vscf_brainkey_server_use_random=(e,t)=>(s._vscf_brainkey_server_use_random=Ge.fo)(e,t),s._vscf_brainkey_server_use_operation_random=(e,t)=>(s._vscf_brainkey_server_use_operation_random=Ge.go)(e,t),s._vscf_brainkey_server_setup_defaults=e=>(s._vscf_brainkey_server_setup_defaults=Ge.ho)(e),s._vscf_brainkey_server_generate_identity_secret=(e,t)=>(s._vscf_brainkey_server_generate_identity_secret=Ge.io)(e,t),s._vscf_brainkey_server_harden=(e,t,_,r)=>(s._vscf_brainkey_server_harden=Ge.jo)(e,t,_,r);s._vscf_ecies_release_random=e=>(s._vscf_ecies_release_random=Ge.ko)(e),s._vscf_ecies_release_cipher=e=>(s._vscf_ecies_release_cipher=Ge.lo)(e),s._vscf_ecies_release_mac=e=>(s._vscf_ecies_release_mac=Ge.mo)(e),s._vscf_ecies_release_kdf=e=>(s._vscf_ecies_release_kdf=Ge.no)(e),s._vscf_ecies_release_ephemeral_key=e=>(s._vscf_ecies_release_ephemeral_key=Ge.oo)(e),s._vscf_ecies_new=()=>(s._vscf_ecies_new=Ge.po)(),s._vscf_ecies_delete=e=>(s._vscf_ecies_delete=Ge.qo)(e),s._vscf_ecies_shallow_copy=e=>(s._vscf_ecies_shallow_copy=Ge.ro)(e),s._vscf_ecies_use_random=(e,t)=>(s._vscf_ecies_use_random=Ge.so)(e,t),s._vscf_ecies_use_cipher=(e,t)=>(s._vscf_ecies_use_cipher=Ge.to)(e,t),s._vscf_ecies_use_mac=(e,t)=>(s._vscf_ecies_use_mac=Ge.uo)(e,t),s._vscf_ecies_use_kdf=(e,t)=>(s._vscf_ecies_use_kdf=Ge.vo)(e,t),s._vscf_ecies_use_ephemeral_key=(e,t)=>(s._vscf_ecies_use_ephemeral_key=Ge.wo)(e,t),s._vscf_ecies_set_key_alg=(e,t)=>(s._vscf_ecies_set_key_alg=Ge.xo)(e,t),s._vscf_ecies_release_key_alg=e=>(s._vscf_ecies_release_key_alg=Ge.yo)(e),s._vscf_ecies_setup_defaults=e=>(s._vscf_ecies_setup_defaults=Ge.zo)(e),s._vscf_ecies_setup_defaults_no_random=e=>(s._vscf_ecies_setup_defaults_no_random=Ge.Ao)(e),s._vscf_ecies_encrypted_len=(e,t,_)=>(s._vscf_ecies_encrypted_len=Ge.Bo)(e,t,_),s._vscf_ecies_encrypt=(e,t,_,r)=>(s._vscf_ecies_encrypt=Ge.Co)(e,t,_,r),s._vscf_ecies_decrypted_len=(e,t,_)=>(s._vscf_ecies_decrypted_len=Ge.Do)(e,t,_),s._vscf_ecies_decrypt=(e,t,_,r)=>(s._vscf_ecies_decrypt=Ge.Eo)(e,t,_,r),s._vscf_error_ctx_size=()=>(s._vscf_error_ctx_size=Ge.Fo)(),s._vscf_error_reset=e=>(s._vscf_error_reset=Ge.Go)(e),s._vscf_error_status=e=>(s._vscf_error_status=Ge.Ho)(e),s._vscf_footer_info_new=()=>(s._vscf_footer_info_new=Ge.Io)(),s._vscf_footer_info_delete=e=>(s._vscf_footer_info_delete=Ge.Jo)(e),s._vscf_footer_info_shallow_copy=e=>(s._vscf_footer_info_shallow_copy=Ge.Ko)(e),s._vscf_footer_info_has_signed_data_info=e=>(s._vscf_footer_info_has_signed_data_info=Ge.Lo)(e),s._vscf_footer_info_signed_data_info=e=>(s._vscf_footer_info_signed_data_info=Ge.Mo)(e),s._vscf_footer_info_set_data_size=(e,t)=>(s._vscf_footer_info_set_data_size=Ge.No)(e,t),s._vscf_footer_info_data_size=e=>(s._vscf_footer_info_data_size=Ge.Oo)(e),s._vscf_group_session_release_rng=e=>(s._vscf_group_session_release_rng=Ge.Po)(e),s._vscf_group_session_new=()=>(s._vscf_group_session_new=Ge.Qo)(),s._vscf_group_session_delete=e=>(s._vscf_group_session_delete=Ge.Ro)(e),s._vscf_group_session_shallow_copy=e=>(s._vscf_group_session_shallow_copy=Ge.So)(e),s._vscf_group_session_use_rng=(e,t)=>(s._vscf_group_session_use_rng=Ge.To)(e,t),s._vscf_group_session_get_current_epoch=e=>(s._vscf_group_session_get_current_epoch=Ge.Uo)(e),s._vscf_group_session_setup_defaults=e=>(s._vscf_group_session_setup_defaults=Ge.Vo)(e),s._vscf_group_session_get_session_id=(e,t)=>(s._vscf_group_session_get_session_id=Ge.Wo)(e,t),s._vscf_group_session_add_epoch=(e,t)=>(s._vscf_group_session_add_epoch=Ge.Xo)(e,t),s._vscf_group_session_encrypt=(e,t,_,r)=>(s._vscf_group_session_encrypt=Ge.Yo)(e,t,_,r),s._vscf_group_session_decrypt_len=(e,t)=>(s._vscf_group_session_decrypt_len=Ge.Zo)(e,t),s._vscf_group_session_decrypt=(e,t,_,r)=>(s._vscf_group_session_decrypt=Ge._o)(e,t,_,r),s._vscf_group_session_create_group_ticket=(e,t)=>(s._vscf_group_session_create_group_ticket=Ge.$o)(e,t),s._vscf_group_session_message_new=()=>(s._vscf_group_session_message_new=Ge.ap)(),s._vscf_group_session_message_delete=e=>(s._vscf_group_session_message_delete=Ge.bp)(e),s._vscf_group_session_message_shallow_copy=e=>(s._vscf_group_session_message_shallow_copy=Ge.cp)(e),s._vscf_group_session_message_get_type=e=>(s._vscf_group_session_message_get_type=Ge.dp)(e),s._vscf_group_session_message_get_session_id=(e,t)=>(s._vscf_group_session_message_get_session_id=Ge.ep)(e,t),s._vscf_group_session_message_get_epoch=e=>(s._vscf_group_session_message_get_epoch=Ge.fp)(e),s._vscf_group_session_message_serialize_len=e=>(s._vscf_group_session_message_serialize_len=Ge.gp)(e),s._vscf_group_session_message_serialize=(e,t)=>(s._vscf_group_session_message_serialize=Ge.hp)(e,t),s._vscf_group_session_message_deserialize=(e,t)=>(s._vscf_group_session_message_deserialize=Ge.ip)(e,t),s._vscf_group_session_ticket_release_rng=e=>(s._vscf_group_session_ticket_release_rng=Ge.jp)(e),s._vscf_group_session_ticket_new=()=>(s._vscf_group_session_ticket_new=Ge.kp)(),s._vscf_group_session_ticket_delete=e=>(s._vscf_group_session_ticket_delete=Ge.lp)(e),s._vscf_group_session_ticket_shallow_copy=e=>(s._vscf_group_session_ticket_shallow_copy=Ge.mp)(e),s._vscf_group_session_ticket_use_rng=(e,t)=>(s._vscf_group_session_ticket_use_rng=Ge.np)(e,t),s._vscf_group_session_ticket_setup_defaults=e=>(s._vscf_group_session_ticket_setup_defaults=Ge.op)(e),s._vscf_group_session_ticket_setup_ticket_as_new=(e,t)=>(s._vscf_group_session_ticket_setup_ticket_as_new=Ge.pp)(e,t),s._vscf_group_session_ticket_get_ticket_message=e=>(s._vscf_group_session_ticket_get_ticket_message=Ge.qp)(e),s._vscf_key_alg_factory_create_from_alg_id=(e,t,_)=>(s._vscf_key_alg_factory_create_from_alg_id=Ge.rp)(e,t,_),s._vscf_key_alg_factory_create_from_key=(e,t,_)=>(s._vscf_key_alg_factory_create_from_key=Ge.sp)(e,t,_),s._vscf_key_alg_factory_create_from_raw_public_key=(e,t,_)=>(s._vscf_key_alg_factory_create_from_raw_public_key=Ge.tp)(e,t,_),s._vscf_key_alg_factory_create_from_raw_private_key=(e,t,_)=>(s._vscf_key_alg_factory_create_from_raw_private_key=Ge.up)(e,t,_),s._vscf_key_info_new=()=>(s._vscf_key_info_new=Ge.vp)(),s._vscf_key_info_new_with_alg_info=e=>(s._vscf_key_info_new_with_alg_info=Ge.wp)(e),s._vscf_key_info_delete=e=>(s._vscf_key_info_delete=Ge.xp)(e),s._vscf_key_info_shallow_copy=e=>(s._vscf_key_info_shallow_copy=Ge.yp)(e),s._vscf_key_info_is_compound=e=>(s._vscf_key_info_is_compound=Ge.zp)(e),s._vscf_key_info_is_hybrid=e=>(s._vscf_key_info_is_hybrid=Ge.Ap)(e),s._vscf_key_info_is_compound_hybrid=e=>(s._vscf_key_info_is_compound_hybrid=Ge.Bp)(e),s._vscf_key_info_is_compound_hybrid_cipher=e=>(s._vscf_key_info_is_compound_hybrid_cipher=Ge.Cp)(e),s._vscf_key_info_is_compound_hybrid_signer=e=>(s._vscf_key_info_is_compound_hybrid_signer=Ge.Dp)(e),s._vscf_key_info_is_hybrid_post_quantum=e=>(s._vscf_key_info_is_hybrid_post_quantum=Ge.Ep)(e),s._vscf_key_info_is_hybrid_post_quantum_cipher=e=>(s._vscf_key_info_is_hybrid_post_quantum_cipher=Ge.Fp)(e),s._vscf_key_info_is_hybrid_post_quantum_signer=e=>(s._vscf_key_info_is_hybrid_post_quantum_signer=Ge.Gp)(e),s._vscf_key_info_alg_id=e=>(s._vscf_key_info_alg_id=Ge.Hp)(e),s._vscf_key_info_compound_cipher_alg_id=e=>(s._vscf_key_info_compound_cipher_alg_id=Ge.Ip)(e),s._vscf_key_info_compound_signer_alg_id=e=>(s._vscf_key_info_compound_signer_alg_id=Ge.Jp)(e),s._vscf_key_info_hybrid_first_key_alg_id=e=>(s._vscf_key_info_hybrid_first_key_alg_id=Ge.Kp)(e),s._vscf_key_info_hybrid_second_key_alg_id=e=>(s._vscf_key_info_hybrid_second_key_alg_id=Ge.Lp)(e),s._vscf_key_info_compound_hybrid_cipher_first_key_alg_id=e=>(s._vscf_key_info_compound_hybrid_cipher_first_key_alg_id=Ge.Mp)(e),s._vscf_key_info_compound_hybrid_cipher_second_key_alg_id=e=>(s._vscf_key_info_compound_hybrid_cipher_second_key_alg_id=Ge.Np)(e),s._vscf_key_info_compound_hybrid_signer_first_key_alg_id=e=>(s._vscf_key_info_compound_hybrid_signer_first_key_alg_id=Ge.Op)(e),s._vscf_key_info_compound_hybrid_signer_second_key_alg_id=e=>(s._vscf_key_info_compound_hybrid_signer_second_key_alg_id=Ge.Pp)(e),s._vscf_key_provider_release_random=e=>(s._vscf_key_provider_release_random=Ge.Qp)(e),s._vscf_key_provider_new=()=>(s._vscf_key_provider_new=Ge.Rp)(),s._vscf_key_provider_delete=e=>(s._vscf_key_provider_delete=Ge.Sp)(e),s._vscf_key_provider_shallow_copy=e=>(s._vscf_key_provider_shallow_copy=Ge.Tp)(e),s._vscf_key_provider_use_random=(e,t)=>(s._vscf_key_provider_use_random=Ge.Up)(e,t),s._vscf_key_provider_setup_defaults=e=>(s._vscf_key_provider_setup_defaults=Ge.Vp)(e),s._vscf_key_provider_set_rsa_params=(e,t)=>(s._vscf_key_provider_set_rsa_params=Ge.Wp)(e,t),s._vscf_key_provider_generate_private_key=(e,t,_)=>(s._vscf_key_provider_generate_private_key=Ge.Xp)(e,t,_),s._vscf_key_provider_generate_post_quantum_private_key=(e,t)=>(s._vscf_key_provider_generate_post_quantum_private_key=Ge.Yp)(e,t),s._vscf_key_provider_generate_compound_hybrid_private_key=(e,t,_,r,n,c)=>(s._vscf_key_provider_generate_compound_hybrid_private_key=Ge.Zp)(e,t,_,r,n,c),s._vscf_key_provider_generate_hybrid_private_key=(e,t,_,r)=>(s._vscf_key_provider_generate_hybrid_private_key=Ge._p)(e,t,_,r),s._vscf_key_provider_generate_compound_private_key=(e,t,_,r)=>(s._vscf_key_provider_generate_compound_private_key=Ge.$p)(e,t,_,r),s._vscf_key_provider_import_private_key=(e,t,_)=>(s._vscf_key_provider_import_private_key=Ge.aq)(e,t,_),s._vscf_key_provider_import_public_key=(e,t,_)=>(s._vscf_key_provider_import_public_key=Ge.bq)(e,t,_),s._vscf_key_provider_exported_public_key_len=(e,t)=>(s._vscf_key_provider_exported_public_key_len=Ge.cq)(e,t),s._vscf_key_provider_export_public_key=(e,t,_)=>(s._vscf_key_provider_export_public_key=Ge.dq)(e,t,_),s._vscf_key_provider_exported_private_key_len=(e,t)=>(s._vscf_key_provider_exported_private_key_len=Ge.eq)(e,t),s._vscf_key_provider_export_private_key=(e,t,_)=>(s._vscf_key_provider_export_private_key=Ge.fq)(e,t,_),s._vscf_key_recipient_info_new=()=>(s._vscf_key_recipient_info_new=Ge.gq)(),s._vscf_key_recipient_info_new_with_data=(e,t,_)=>(s._vscf_key_recipient_info_new_with_data=Ge.hq)(e,t,_),s._vscf_key_recipient_info_delete=e=>(s._vscf_key_recipient_info_delete=Ge.iq)(e),s._vscf_key_recipient_info_shallow_copy=e=>(s._vscf_key_recipient_info_shallow_copy=Ge.jq)(e),s._vscf_key_recipient_info_recipient_id=(e,t)=>(s._vscf_key_recipient_info_recipient_id=Ge.kq)(e,t),s._vscf_key_recipient_info_key_encryption_algorithm=e=>(s._vscf_key_recipient_info_key_encryption_algorithm=Ge.lq)(e),s._vscf_key_recipient_info_encrypted_key=(e,t)=>(s._vscf_key_recipient_info_encrypted_key=Ge.mq)(e,t),s._vscf_key_recipient_info_list_new=()=>(s._vscf_key_recipient_info_list_new=Ge.nq)(),s._vscf_key_recipient_info_list_delete=e=>(s._vscf_key_recipient_info_list_delete=Ge.oq)(e),s._vscf_key_recipient_info_list_shallow_copy=e=>(s._vscf_key_recipient_info_list_shallow_copy=Ge.pq)(e),s._vscf_key_recipient_info_list_has_item=e=>(s._vscf_key_recipient_info_list_has_item=Ge.qq)(e),s._vscf_key_recipient_info_list_item=e=>(s._vscf_key_recipient_info_list_item=Ge.rq)(e),s._vscf_key_recipient_info_list_has_next=e=>(s._vscf_key_recipient_info_list_has_next=Ge.sq)(e),s._vscf_key_recipient_info_list_next=e=>(s._vscf_key_recipient_info_list_next=Ge.tq)(e),s._vscf_key_recipient_info_list_has_prev=e=>(s._vscf_key_recipient_info_list_has_prev=Ge.uq)(e),s._vscf_key_recipient_info_list_prev=e=>(s._vscf_key_recipient_info_list_prev=Ge.vq)(e),s._vscf_key_recipient_info_list_clear=e=>(s._vscf_key_recipient_info_list_clear=Ge.wq)(e),s._vscf_message_info_new=()=>(s._vscf_message_info_new=Ge.xq)(),s._vscf_message_info_delete=e=>(s._vscf_message_info_delete=Ge.yq)(e),s._vscf_message_info_shallow_copy=e=>(s._vscf_message_info_shallow_copy=Ge.zq)(e),s._vscf_message_info_data_encryption_alg_info=e=>(s._vscf_message_info_data_encryption_alg_info=Ge.Aq)(e),s._vscf_message_info_key_recipient_info_list=e=>(s._vscf_message_info_key_recipient_info_list=Ge.Bq)(e),s._vscf_message_info_password_recipient_info_list=e=>(s._vscf_message_info_password_recipient_info_list=Ge.Cq)(e),s._vscf_message_info_has_custom_params=e=>(s._vscf_message_info_has_custom_params=Ge.Dq)(e),s._vscf_message_info_custom_params=e=>(s._vscf_message_info_custom_params=Ge.Eq)(e),s._vscf_message_info_has_cipher_kdf_alg_info=e=>(s._vscf_message_info_has_cipher_kdf_alg_info=Ge.Fq)(e),s._vscf_message_info_cipher_kdf_alg_info=e=>(s._vscf_message_info_cipher_kdf_alg_info=Ge.Gq)(e),s._vscf_message_info_has_cipher_padding_alg_info=e=>(s._vscf_message_info_has_cipher_padding_alg_info=Ge.Hq)(e),s._vscf_message_info_cipher_padding_alg_info=e=>(s._vscf_message_info_cipher_padding_alg_info=Ge.Iq)(e),s._vscf_message_info_has_footer_info=e=>(s._vscf_message_info_has_footer_info=Ge.Jq)(e),s._vscf_message_info_footer_info=e=>(s._vscf_message_info_footer_info=Ge.Kq)(e),s._vscf_message_info_clear=e=>(s._vscf_message_info_clear=Ge.Lq)(e),s._vscf_message_info_custom_params_new=()=>(s._vscf_message_info_custom_params_new=Ge.Mq)(),s._vscf_message_info_custom_params_delete=e=>(s._vscf_message_info_custom_params_delete=Ge.Nq)(e),s._vscf_message_info_custom_params_shallow_copy=e=>(s._vscf_message_info_custom_params_shallow_copy=Ge.Oq)(e),s._vscf_message_info_custom_params_add_int=(e,t,_)=>(s._vscf_message_info_custom_params_add_int=Ge.Pq)(e,t,_),s._vscf_message_info_custom_params_add_string=(e,t,_)=>(s._vscf_message_info_custom_params_add_string=Ge.Qq)(e,t,_),s._vscf_message_info_custom_params_add_data=(e,t,_)=>(s._vscf_message_info_custom_params_add_data=Ge.Rq)(e,t,_),s._vscf_message_info_custom_params_clear=e=>(s._vscf_message_info_custom_params_clear=Ge.Sq)(e),s._vscf_message_info_custom_params_find_int=(e,t,_)=>(s._vscf_message_info_custom_params_find_int=Ge.Tq)(e,t,_),s._vscf_message_info_custom_params_find_string=(e,t,_,r)=>(s._vscf_message_info_custom_params_find_string=Ge.Uq)(e,t,_,r),s._vscf_message_info_custom_params_find_data=(e,t,_,r)=>(s._vscf_message_info_custom_params_find_data=Ge.Vq)(e,t,_,r),s._vscf_message_info_custom_params_has_params=e=>(s._vscf_message_info_custom_params_has_params=Ge.Wq)(e),s._vscf_message_info_editor_release_random=e=>(s._vscf_message_info_editor_release_random=Ge.Xq)(e),s._vscf_message_info_editor_new=()=>(s._vscf_message_info_editor_new=Ge.Yq)(),s._vscf_message_info_editor_delete=e=>(s._vscf_message_info_editor_delete=Ge.Zq)(e),s._vscf_message_info_editor_shallow_copy=e=>(s._vscf_message_info_editor_shallow_copy=Ge._q)(e),s._vscf_message_info_editor_use_random=(e,t)=>(s._vscf_message_info_editor_use_random=Ge.$q)(e,t),s._vscf_message_info_editor_setup_defaults=e=>(s._vscf_message_info_editor_setup_defaults=Ge.ar)(e),s._vscf_message_info_editor_unpack=(e,t)=>(s._vscf_message_info_editor_unpack=Ge.br)(e,t),s._vscf_message_info_editor_unlock=(e,t,_)=>(s._vscf_message_info_editor_unlock=Ge.cr)(e,t,_),s._vscf_message_info_editor_add_key_recipient=(e,t,_)=>(s._vscf_message_info_editor_add_key_recipient=Ge.dr)(e,t,_),s._vscf_message_info_editor_remove_key_recipient=(e,t)=>(s._vscf_message_info_editor_remove_key_recipient=Ge.er)(e,t),s._vscf_message_info_editor_remove_all=e=>(s._vscf_message_info_editor_remove_all=Ge.fr)(e),s._vscf_message_info_editor_packed_len=e=>(s._vscf_message_info_editor_packed_len=Ge.gr)(e),s._vscf_message_info_editor_pack=(e,t)=>(s._vscf_message_info_editor_pack=Ge.hr)(e,t),s._vscf_message_info_footer_new=()=>(s._vscf_message_info_footer_new=Ge.ir)(),s._vscf_message_info_footer_delete=e=>(s._vscf_message_info_footer_delete=Ge.jr)(e),s._vscf_message_info_footer_shallow_copy=e=>(s._vscf_message_info_footer_shallow_copy=Ge.kr)(e),s._vscf_message_info_footer_has_signer_infos=e=>(s._vscf_message_info_footer_has_signer_infos=Ge.lr)(e),s._vscf_message_info_footer_signer_infos=e=>(s._vscf_message_info_footer_signer_infos=Ge.mr)(e),s._vscf_message_info_footer_signer_hash_alg_info=e=>(s._vscf_message_info_footer_signer_hash_alg_info=Ge.nr)(e),s._vscf_message_info_footer_signer_digest=(e,t)=>(s._vscf_message_info_footer_signer_digest=Ge.or)(e,t),s._vscf_oid_from_alg_id=(e,t)=>(s._vscf_oid_from_alg_id=Ge.pr)(e,t),s._vscf_oid_to_alg_id=e=>(s._vscf_oid_to_alg_id=Ge.qr)(e),s._vscf_oid_equal=(e,t)=>(s._vscf_oid_equal=Ge.rr)(e,t),s._vscf_oid_from_id=(e,t)=>(s._vscf_oid_from_id=Ge.sr)(e,t),s._vscf_oid_to_id=e=>(s._vscf_oid_to_id=Ge.tr)(e),s._vscf_oid_id_to_alg_id=e=>(s._vscf_oid_id_to_alg_id=Ge.ur)(e),s._vscf_padding_params_new=()=>(s._vscf_padding_params_new=Ge.vr)(),s._vscf_padding_params_new_with_constraints=(e,t)=>(s._vscf_padding_params_new_with_constraints=Ge.wr)(e,t),s._vscf_padding_params_delete=e=>(s._vscf_padding_params_delete=Ge.xr)(e),s._vscf_padding_params_shallow_copy=e=>(s._vscf_padding_params_shallow_copy=Ge.yr)(e),s._vscf_padding_params_frame=e=>(s._vscf_padding_params_frame=Ge.zr)(e),s._vscf_padding_params_frame_max=e=>(s._vscf_padding_params_frame_max=Ge.Ar)(e),s._vscf_password_recipient_info_new=()=>(s._vscf_password_recipient_info_new=Ge.Br)(),s._vscf_password_recipient_info_new_with_members=(e,t)=>(s._vscf_password_recipient_info_new_with_members=Ge.Cr)(e,t),s._vscf_password_recipient_info_delete=e=>(s._vscf_password_recipient_info_delete=Ge.Dr)(e),s._vscf_password_recipient_info_shallow_copy=e=>(s._vscf_password_recipient_info_shallow_copy=Ge.Er)(e),s._vscf_password_recipient_info_key_encryption_algorithm=e=>(s._vscf_password_recipient_info_key_encryption_algorithm=Ge.Fr)(e),s._vscf_password_recipient_info_encrypted_key=(e,t)=>(s._vscf_password_recipient_info_encrypted_key=Ge.Gr)(e,t),s._vscf_password_recipient_info_list_new=()=>(s._vscf_password_recipient_info_list_new=Ge.Hr)(),s._vscf_password_recipient_info_list_delete=e=>(s._vscf_password_recipient_info_list_delete=Ge.Ir)(e),s._vscf_password_recipient_info_list_shallow_copy=e=>(s._vscf_password_recipient_info_list_shallow_copy=Ge.Jr)(e),s._vscf_password_recipient_info_list_has_item=e=>(s._vscf_password_recipient_info_list_has_item=Ge.Kr)(e),s._vscf_password_recipient_info_list_item=e=>(s._vscf_password_recipient_info_list_item=Ge.Lr)(e),s._vscf_password_recipient_info_list_has_next=e=>(s._vscf_password_recipient_info_list_has_next=Ge.Mr)(e),s._vscf_password_recipient_info_list_next=e=>(s._vscf_password_recipient_info_list_next=Ge.Nr)(e),s._vscf_password_recipient_info_list_has_prev=e=>(s._vscf_password_recipient_info_list_has_prev=Ge.Or)(e),s._vscf_password_recipient_info_list_prev=e=>(s._vscf_password_recipient_info_list_prev=Ge.Pr)(e),s._vscf_password_recipient_info_list_clear=e=>(s._vscf_password_recipient_info_list_clear=Ge.Qr)(e),s._vscf_pem_wrapped_len=(e,t)=>(s._vscf_pem_wrapped_len=Ge.Rr)(e,t),s._vscf_pem_wrap=(e,t,_)=>(s._vscf_pem_wrap=Ge.Sr)(e,t,_),s._vscf_pem_unwrapped_len=e=>(s._vscf_pem_unwrapped_len=Ge.Tr)(e),s._vscf_pem_unwrap=(e,t)=>(s._vscf_pem_unwrap=Ge.Ur)(e,t),s._vscf_pem_title=(e,t)=>(s._vscf_pem_title=Ge.Vr)(e,t),s._vscf_recipient_cipher_release_random=e=>(s._vscf_recipient_cipher_release_random=Ge.Wr)(e),s._vscf_recipient_cipher_release_encryption_cipher=e=>(s._vscf_recipient_cipher_release_encryption_cipher=Ge.Xr)(e),s._vscf_recipient_cipher_release_encryption_padding=e=>(s._vscf_recipient_cipher_release_encryption_padding=Ge.Yr)(e),s._vscf_recipient_cipher_release_padding_params=e=>(s._vscf_recipient_cipher_release_padding_params=Ge.Zr)(e),s._vscf_recipient_cipher_release_signer_hash=e=>(s._vscf_recipient_cipher_release_signer_hash=Ge._r)(e),s._vscf_recipient_cipher_new=()=>(s._vscf_recipient_cipher_new=Ge.$r)(),s._vscf_recipient_cipher_delete=e=>(s._vscf_recipient_cipher_delete=Ge.as)(e),s._vscf_recipient_cipher_shallow_copy=e=>(s._vscf_recipient_cipher_shallow_copy=Ge.bs)(e),s._vscf_recipient_cipher_use_random=(e,t)=>(s._vscf_recipient_cipher_use_random=Ge.cs)(e,t),s._vscf_recipient_cipher_use_encryption_cipher=(e,t)=>(s._vscf_recipient_cipher_use_encryption_cipher=Ge.ds)(e,t),s._vscf_recipient_cipher_use_encryption_padding=(e,t)=>(s._vscf_recipient_cipher_use_encryption_padding=Ge.es)(e,t),s._vscf_recipient_cipher_use_padding_params=(e,t)=>(s._vscf_recipient_cipher_use_padding_params=Ge.fs)(e,t),s._vscf_recipient_cipher_use_signer_hash=(e,t)=>(s._vscf_recipient_cipher_use_signer_hash=Ge.gs)(e,t),s._vscf_recipient_cipher_has_key_recipient=(e,t)=>(s._vscf_recipient_cipher_has_key_recipient=Ge.hs)(e,t),s._vscf_recipient_cipher_add_key_recipient=(e,t,_)=>(s._vscf_recipient_cipher_add_key_recipient=Ge.is)(e,t,_),s._vscf_recipient_cipher_clear_recipients=e=>(s._vscf_recipient_cipher_clear_recipients=Ge.js)(e),s._vscf_recipient_cipher_add_signer=(e,t,_)=>(s._vscf_recipient_cipher_add_signer=Ge.ks)(e,t,_),s._vscf_recipient_cipher_clear_signers=e=>(s._vscf_recipient_cipher_clear_signers=Ge.ls)(e),s._vscf_recipient_cipher_custom_params=e=>(s._vscf_recipient_cipher_custom_params=Ge.ms)(e),s._vscf_recipient_cipher_start_encryption=e=>(s._vscf_recipient_cipher_start_encryption=Ge.ns)(e),s._vscf_recipient_cipher_start_signed_encryption=(e,t)=>(s._vscf_recipient_cipher_start_signed_encryption=Ge.os)(e,t),s._vscf_recipient_cipher_message_info_len=e=>(s._vscf_recipient_cipher_message_info_len=Ge.ps)(e),s._vscf_recipient_cipher_pack_message_info=(e,t)=>(s._vscf_recipient_cipher_pack_message_info=Ge.qs)(e,t),s._vscf_recipient_cipher_encryption_out_len=(e,t)=>(s._vscf_recipient_cipher_encryption_out_len=Ge.rs)(e,t),s._vscf_recipient_cipher_message_info_footer_len=e=>(s._vscf_recipient_cipher_message_info_footer_len=Ge.ss)(e),s._vscf_recipient_cipher_process_encryption=(e,t,_)=>(s._vscf_recipient_cipher_process_encryption=Ge.ts)(e,t,_),s._vscf_recipient_cipher_finish_encryption=(e,t)=>(s._vscf_recipient_cipher_finish_encryption=Ge.us)(e,t),s._vscf_recipient_cipher_start_decryption_with_key=(e,t,_,r)=>(s._vscf_recipient_cipher_start_decryption_with_key=Ge.vs)(e,t,_,r),s._vscf_recipient_cipher_start_verified_decryption_with_key=(e,t,_,r,n)=>(s._vscf_recipient_cipher_start_verified_decryption_with_key=Ge.ws)(e,t,_,r,n),s._vscf_recipient_cipher_decryption_out_len=(e,t)=>(s._vscf_recipient_cipher_decryption_out_len=Ge.xs)(e,t),s._vscf_recipient_cipher_process_decryption=(e,t,_)=>(s._vscf_recipient_cipher_process_decryption=Ge.ys)(e,t,_),s._vscf_recipient_cipher_finish_decryption=(e,t)=>(s._vscf_recipient_cipher_finish_decryption=Ge.zs)(e,t),s._vscf_recipient_cipher_is_data_signed=e=>(s._vscf_recipient_cipher_is_data_signed=Ge.As)(e),s._vscf_recipient_cipher_signer_infos=e=>(s._vscf_recipient_cipher_signer_infos=Ge.Bs)(e),s._vscf_recipient_cipher_verify_signer_info=(e,t,_)=>(s._vscf_recipient_cipher_verify_signer_info=Ge.Cs)(e,t,_),s._vscf_recipient_cipher_pack_message_info_footer=(e,t)=>(s._vscf_recipient_cipher_pack_message_info_footer=Ge.Ds)(e,t),s._vscf_signed_data_info_new=()=>(s._vscf_signed_data_info_new=Ge.Es)(),s._vscf_signed_data_info_delete=e=>(s._vscf_signed_data_info_delete=Ge.Fs)(e),s._vscf_signed_data_info_shallow_copy=e=>(s._vscf_signed_data_info_shallow_copy=Ge.Gs)(e),s._vscf_signed_data_info_hash_alg_info=e=>(s._vscf_signed_data_info_hash_alg_info=Ge.Hs)(e),s._vscf_signer_release_hash=e=>(s._vscf_signer_release_hash=Ge.Is)(e),s._vscf_signer_release_random=e=>(s._vscf_signer_release_random=Ge.Js)(e),s._vscf_signer_new=()=>(s._vscf_signer_new=Ge.Ks)(),s._vscf_signer_delete=e=>(s._vscf_signer_delete=Ge.Ls)(e),s._vscf_signer_shallow_copy=e=>(s._vscf_signer_shallow_copy=Ge.Ms)(e),s._vscf_signer_use_hash=(e,t)=>(s._vscf_signer_use_hash=Ge.Ns)(e,t),s._vscf_signer_use_random=(e,t)=>(s._vscf_signer_use_random=Ge.Os)(e,t),s._vscf_signer_reset=e=>(s._vscf_signer_reset=Ge.Ps)(e),s._vscf_signer_append_data=(e,t)=>(s._vscf_signer_append_data=Ge.Qs)(e,t),s._vscf_signer_signature_len=(e,t)=>(s._vscf_signer_signature_len=Ge.Rs)(e,t),s._vscf_signer_sign=(e,t,_)=>(s._vscf_signer_sign=Ge.Ss)(e,t,_),s._vscf_signer_info_new=()=>(s._vscf_signer_info_new=Ge.Ts)(),s._vscf_signer_info_delete=e=>(s._vscf_signer_info_delete=Ge.Us)(e),s._vscf_signer_info_shallow_copy=e=>(s._vscf_signer_info_shallow_copy=Ge.Vs)(e),s._vscf_signer_info_signer_id=(e,t)=>(s._vscf_signer_info_signer_id=Ge.Ws)(e,t),s._vscf_signer_info_signer_alg_info=e=>(s._vscf_signer_info_signer_alg_info=Ge.Xs)(e),s._vscf_signer_info_signature=(e,t)=>(s._vscf_signer_info_signature=Ge.Ys)(e,t),s._vscf_signer_info_list_new=()=>(s._vscf_signer_info_list_new=Ge.Zs)(),s._vscf_signer_info_list_delete=e=>(s._vscf_signer_info_list_delete=Ge._s)(e),s._vscf_signer_info_list_shallow_copy=e=>(s._vscf_signer_info_list_shallow_copy=Ge.$s)(e),s._vscf_signer_info_list_has_item=e=>(s._vscf_signer_info_list_has_item=Ge.at)(e),s._vscf_signer_info_list_item=e=>(s._vscf_signer_info_list_item=Ge.bt)(e),s._vscf_signer_info_list_has_next=e=>(s._vscf_signer_info_list_has_next=Ge.ct)(e),s._vscf_signer_info_list_next=e=>(s._vscf_signer_info_list_next=Ge.dt)(e),s._vscf_signer_info_list_has_prev=e=>(s._vscf_signer_info_list_has_prev=Ge.et)(e),s._vscf_signer_info_list_prev=e=>(s._vscf_signer_info_list_prev=Ge.ft)(e),s._vscf_signer_info_list_clear=e=>(s._vscf_signer_info_list_clear=Ge.gt)(e),s._vscf_verifier_new=()=>(s._vscf_verifier_new=Ge.ht)(),s._vscf_verifier_delete=e=>(s._vscf_verifier_delete=Ge.it)(e),s._vscf_verifier_shallow_copy=e=>(s._vscf_verifier_shallow_copy=Ge.jt)(e),s._vscf_verifier_reset=(e,t)=>(s._vscf_verifier_reset=Ge.kt)(e,t),s._vscf_verifier_append_data=(e,t)=>(s._vscf_verifier_append_data=Ge.lt)(e,t),s._vscf_verifier_verify=(e,t)=>(s._vscf_verifier_verify=Ge.mt)(e,t),s._vsc_buffer_new=()=>(s._vsc_buffer_new=Ge.nt)(),s._vsc_buffer_new_with_capacity=e=>(s._vsc_buffer_new_with_capacity=Ge.ot)(e),s._vsc_buffer_delete=e=>(s._vsc_buffer_delete=Ge.pt)(e),s._vsc_buffer_data=(e,t)=>(s._vsc_buffer_data=Ge.qt)(e,t),s._vsc_buffer_make_secure=e=>(s._vsc_buffer_make_secure=Ge.rt)(e),s._vsc_buffer_bytes=e=>(s._vsc_buffer_bytes=Ge.st)(e),s._vsc_buffer_len=e=>(s._vsc_buffer_len=Ge.tt)(e),s._vsc_data_ctx_size=()=>(s._vsc_data_ctx_size=Ge.ut)(),s._vsc_data=(e,t,_)=>(s._vsc_data=Ge.vt)(e,t,_),s._vsc_data_len=e=>(s._vsc_data_len=Ge.wt)(e),s._vsc_data_bytes=e=>(s._vsc_data_bytes=Ge.xt)(e);var Ve,je=()=>(je=Ge.yt)(),qe=(e,t)=>(qe=Ge.zt)(e,t);function Xe(){function e(){if(!Ve&&(Ve=!0,s.calledRun=!0,!P)){if(s.noFSInit||xe||(xe=!0,Te(),s.stdin=s.stdin,s.stdout=s.stdout,s.stderr=s.stderr,s.stdin?Fe("stdin",s.stdin):Ie("/dev/tty","/dev/stdin"),s.stdout?Fe("stdout",null,s.stdout):Ie("/dev/tty","/dev/stdout"),s.stderr?Fe("stderr",null,s.stderr):Ie("/dev/tty1","/dev/stderr"),Ae("/dev/stdin",0),Ae("/dev/stdout",1),Ae("/dev/stderr",1)),ce=!1,z(m),t(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;){var e=s.postRun.shift();E.unshift(e)}z(E)}}if(!(0<b)){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)w();z(g),0<b||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),e()}),1)):e())}}if(s._malloc=e=>(s._malloc=Ge.At)(e),s._free=e=>(s._free=Ge.Bt)(e),k=function e(){Ve||Xe(),Ve||(k=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.pop()();return Xe(),e.ready});e.exports=r}(r);var s=r.exports,n={};function c(e,t){if(!("number"==typeof t||t instanceof Number))throw new TypeError(`'${e}' is not a number`);if(Number.isNaN(t))throw new TypeError(`'${e}' is NaN`);if(t===1/0)throw new TypeError(`'${e}' is Infinity`);if(t===-1/0)throw new TypeError(`'${e}' is -Infinity`)}function i(e,t){if(c(e,t),0==t)throw new TypeError(`'${e}' is NULL`)}n.ensureNumber=c,n.ensureString=function(e,t){if(!("string"==typeof t||t instanceof String))throw new TypeError(`'${e}' is not a string`)},n.ensureBoolean=function(e,t){if("boolean"!=typeof t)throw new TypeError(`'${e}' is not a boolean`)},n.ensureByteArray=function(e,t){if(!(t instanceof Uint8Array))throw new TypeError(`'${e}' is not an Uint8Array`)},n.ensureClass=function(e,t,_){if(!(t instanceof _))throw new TypeError(`'${e}' is not an instance of the class ${_.name}`);i(e,t.ctxPtr)},n.ensureNotNull=i,n.ensureImplementInterface=function(e,t,_,r,s){if(i(e,t.ctxPtr),!s.isImplemented(t.ctxPtr,r))throw new TypeError(`'${e}' does not implement interface '${_}'`)};const a=n,o=n,l=n,f=n,u=n,d=n,h=n,v=n,p=n,y=n,P=n,x=n,g=n,m=n,E=n,w=n,b=n,k=n,I=n,N=n,A=n,C=n,T=n,F=n,K=n,S=n,L=n,R=n,z=n,B=n,U=n,D=n,Y=n,M=n,H=n,O=n,G=n,V=n,j=n,q=n,X=n,W=n,Z=n,$=n,J=n,Q=n,ee=n,te=n,_e=n,re=n,se=n,ne=n,ce=n,ie=n,ae=n,oe=n,le=n,fe=n,ue=n,de=n,he=n,ve=n,pe=n,ye=n,Pe=n,xe=n,ge=n,me=n,Ee=n,we=n,be=n,ke=n,Ie=n,Ne=n,Ae=n,Ce=n,Te=n,Fe=n,Ke=n,Se=n,Le=n,Re=n,ze=s,Be=(e,t)=>Object.freeze({ALG:1,ALG_INFO:2,ALG_INFO_DESERIALIZER:3,ALG_INFO_SERIALIZER:4,ASN1_READER:5,ASN1_WRITER:6,AUTH_DECRYPT:7,AUTH_ENCRYPT:8,CIPHER:9,CIPHER_AUTH:10,CIPHER_AUTH_INFO:11,CIPHER_INFO:12,COMPUTE_SHARED_KEY:13,DECRYPT:14,ENCRYPT:15,ENTROPY_SOURCE:16,HASH:17,KDF:18,KEM:19,KEY:20,KEY_ALG:21,KEY_CIPHER:22,KEY_DESERIALIZER:23,KEY_SERIALIZER:24,KEY_SIGNER:25,MAC:26,MESSAGE_INFO_FOOTER_SERIALIZER:27,MESSAGE_INFO_SERIALIZER:28,PADDING:29,PRIVATE_KEY:30,PUBLIC_KEY:31,RANDOM:32,SALTED_KDF:33}),Ue=(e,t)=>class{static newAndTakeCContext(_){const r=e._vscf_impl_tag(_);switch(r){case t.FoundationImplTag.SHA224:return t.Sha224.newAndTakeCContext(_);case t.FoundationImplTag.SHA256:return t.Sha256.newAndTakeCContext(_);case t.FoundationImplTag.SHA384:return t.Sha384.newAndTakeCContext(_);case t.FoundationImplTag.SHA512:return t.Sha512.newAndTakeCContext(_);case t.FoundationImplTag.AES256_GCM:return t.Aes256Gcm.newAndTakeCContext(_);case t.FoundationImplTag.AES256_CBC:return t.Aes256Cbc.newAndTakeCContext(_);case t.FoundationImplTag.ASN1RD:return t.Asn1rd.newAndTakeCContext(_);case t.FoundationImplTag.ASN1WR:return t.Asn1wr.newAndTakeCContext(_);case t.FoundationImplTag.RSA_PUBLIC_KEY:return t.RsaPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.RSA_PRIVATE_KEY:return t.RsaPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.RSA:return t.Rsa.newAndTakeCContext(_);case t.FoundationImplTag.ECC_PUBLIC_KEY:return t.EccPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.ECC_PRIVATE_KEY:return t.EccPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.ECC:return t.Ecc.newAndTakeCContext(_);case t.FoundationImplTag.ENTROPY_ACCUMULATOR:return t.EntropyAccumulator.newAndTakeCContext(_);case t.FoundationImplTag.CTR_DRBG:return t.CtrDrbg.newAndTakeCContext(_);case t.FoundationImplTag.HMAC:return t.Hmac.newAndTakeCContext(_);case t.FoundationImplTag.HKDF:return t.Hkdf.newAndTakeCContext(_);case t.FoundationImplTag.KDF1:return t.Kdf1.newAndTakeCContext(_);case t.FoundationImplTag.KDF2:return t.Kdf2.newAndTakeCContext(_);case t.FoundationImplTag.FAKE_RANDOM:return t.FakeRandom.newAndTakeCContext(_);case t.FoundationImplTag.PKCS5_PBKDF2:return t.Pkcs5Pbkdf2.newAndTakeCContext(_);case t.FoundationImplTag.PKCS5_PBES2:return t.Pkcs5Pbes2.newAndTakeCContext(_);case t.FoundationImplTag.SEED_ENTROPY_SOURCE:return t.SeedEntropySource.newAndTakeCContext(_);case t.FoundationImplTag.KEY_MATERIAL_RNG:return t.KeyMaterialRng.newAndTakeCContext(_);case t.FoundationImplTag.RAW_PUBLIC_KEY:return t.RawPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.RAW_PRIVATE_KEY:return t.RawPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.PKCS8_SERIALIZER:return t.Pkcs8Serializer.newAndTakeCContext(_);case t.FoundationImplTag.SEC1_SERIALIZER:return t.Sec1Serializer.newAndTakeCContext(_);case t.FoundationImplTag.KEY_ASN1_SERIALIZER:return t.KeyAsn1Serializer.newAndTakeCContext(_);case t.FoundationImplTag.KEY_ASN1_DESERIALIZER:return t.KeyAsn1Deserializer.newAndTakeCContext(_);case t.FoundationImplTag.ED25519:return t.Ed25519.newAndTakeCContext(_);case t.FoundationImplTag.CURVE25519:return t.Curve25519.newAndTakeCContext(_);case t.FoundationImplTag.FALCON:return t.Falcon.newAndTakeCContext(_);case t.FoundationImplTag.ROUND5:return t.Round5.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_KEY_ALG_INFO:return t.CompoundKeyAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_PUBLIC_KEY:return t.CompoundPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_PRIVATE_KEY:return t.CompoundPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_KEY_ALG:return t.CompoundKeyAlg.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_KEY_ALG_INFO:return t.HybridKeyAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_PUBLIC_KEY:return t.HybridPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_PRIVATE_KEY:return t.HybridPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_KEY_ALG:return t.HybridKeyAlg.newAndTakeCContext(_);case t.FoundationImplTag.SIMPLE_ALG_INFO:return t.SimpleAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.HASH_BASED_ALG_INFO:return t.HashBasedAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.CIPHER_ALG_INFO:return t.CipherAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.SALTED_KDF_ALG_INFO:return t.SaltedKdfAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.PBE_ALG_INFO:return t.PbeAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.ECC_ALG_INFO:return t.EccAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.ALG_INFO_DER_SERIALIZER:return t.AlgInfoDerSerializer.newAndTakeCContext(_);case t.FoundationImplTag.ALG_INFO_DER_DESERIALIZER:return t.AlgInfoDerDeserializer.newAndTakeCContext(_);case t.FoundationImplTag.MESSAGE_INFO_DER_SERIALIZER:return t.MessageInfoDerSerializer.newAndTakeCContext(_);case t.FoundationImplTag.RANDOM_PADDING:return t.RandomPadding.newAndTakeCContext(_);default:throw new Error("Unexpected implementation tag found: "+r)}}static newAndUseCContext(_){return new t.FoundationInterface.newAndTakeCContext(e._vscf_impl_shallow_copy(_))}static isImplemented(t,_){return 0!=e._vscf_impl_api(t,_)}},De=(e,t)=>Object.freeze({AES256_CBC:1,AES256_GCM:2,ALG_INFO_DER_DESERIALIZER:3,ALG_INFO_DER_SERIALIZER:4,ASN1RD:5,ASN1WR:6,CIPHER_ALG_INFO:7,COMPOUND_KEY_ALG:8,COMPOUND_KEY_ALG_INFO:9,COMPOUND_PRIVATE_KEY:10,COMPOUND_PUBLIC_KEY:11,CTR_DRBG:12,CURVE25519:13,ECC:14,ECC_ALG_INFO:15,ECC_PRIVATE_KEY:16,ECC_PUBLIC_KEY:17,ED25519:18,ENTROPY_ACCUMULATOR:19,FAKE_RANDOM:20,FALCON:21,HASH_BASED_ALG_INFO:22,HKDF:23,HMAC:24,HYBRID_KEY_ALG:25,HYBRID_KEY_ALG_INFO:26,HYBRID_PRIVATE_KEY:27,HYBRID_PUBLIC_KEY:28,KDF1:29,KDF2:30,KEY_ASN1_DESERIALIZER:31,KEY_ASN1_SERIALIZER:32,KEY_MATERIAL_RNG:33,MESSAGE_INFO_DER_SERIALIZER:34,PBE_ALG_INFO:35,PKCS5_PBES2:36,PKCS5_PBKDF2:37,PKCS8_SERIALIZER:38,RANDOM_PADDING:39,RAW_PRIVATE_KEY:40,RAW_PUBLIC_KEY:41,ROUND5:42,RSA:43,RSA_PRIVATE_KEY:44,RSA_PUBLIC_KEY:45,SALTED_KDF_ALG_INFO:46,SEC1_SERIALIZER:47,SEED_ENTROPY_SOURCE:48,SHA224:49,SHA256:50,SHA384:51,SHA512:52,SIMPLE_ALG_INFO:53}),Ye=(e,t)=>{class _ extends Error{constructor(e){super(e),this.name="FoundationError",this.message=e}static handleStatusCode(e){if(0!=e){if(-1==e)throw new _("This error should not be returned if assertions is enabled.");if(-2==e)throw new _("Can be used to define that not all context prerequisites are satisfied. Note, this error should not be returned if assertions is enabled.");if(-3==e)throw new _("Define that error code from one of third-party module was not handled. Note, this error should not be returned if assertions is enabled.");if(-101==e)throw new _("Buffer capacity is not enough to hold result.");if(-200==e)throw new _("Unsupported algorithm.");if(-201==e)throw new _("Authentication failed during decryption.");if(-202==e)throw new _("Attempt to read data out of buffer bounds.");if(-203==e)throw new _("ASN.1 encoded data is corrupted.");if(-204==e)throw new _("Attempt to read ASN.1 type that is bigger then requested C type.");if(-205==e)throw new _("ASN.1 representation of PKCS#1 public key is corrupted.");if(-206==e)throw new _("ASN.1 representation of PKCS#1 private key is corrupted.");if(-207==e)throw new _("ASN.1 representation of PKCS#8 public key is corrupted.");if(-208==e)throw new _("ASN.1 representation of PKCS#8 private key is corrupted.");if(-209==e)throw new _("Encrypted data is corrupted.");if(-210==e)throw new _("Underlying random operation returns error.");if(-211==e)throw new _("Generation of the private or secret key failed.");if(-212==e)throw new _("One of the entropy sources failed.");if(-213==e)throw new _("Requested data to be generated is too big.");if(-214==e)throw new _("Base64 encoded string contains invalid characters.");if(-215==e)throw new _("PEM data is corrupted.");if(-216==e)throw new _("Exchange key return zero.");if(-217==e)throw new _("Ed25519 public key is corrupted.");if(-218==e)throw new _("Ed25519 private key is corrupted.");if(-219==e)throw new _("CURVE25519 public key is corrupted.");if(-220==e)throw new _("CURVE25519 private key is corrupted.");if(-221==e)throw new _("Elliptic curve public key format is corrupted see RFC 5480.");if(-222==e)throw new _("Elliptic curve public key format is corrupted see RFC 5915.");if(-223==e)throw new _("ASN.1 representation of a public key is corrupted.");if(-224==e)throw new _("ASN.1 representation of a private key is corrupted.");if(-225==e)throw new _("Key algorithm does not accept given type of public key.");if(-226==e)throw new _("Key algorithm does not accept given type of private key.");if(-227==e)throw new _("Post-quantum Falcon-Sign public key is corrupted.");if(-228==e)throw new _("Post-quantum Falcon-Sign private key is corrupted.");if(-229==e)throw new _("Generic Round5 library error.");if(-230==e)throw new _("Post-quantum NIST Round5 public key is corrupted.");if(-231==e)throw new _("Post-quantum NIST Round5 private key is corrupted.");if(-232==e)throw new _("Compound public key is corrupted.");if(-233==e)throw new _("Compound private key is corrupted.");if(-234==e)throw new _("Compound public hybrid key is corrupted.");if(-235==e)throw new _("Compound private hybrid key is corrupted.");if(-236==e)throw new _("ASN.1 AlgorithmIdentifer is corrupted.");if(-237==e)throw new _("ASN.1 AlgorithmIdentifer with ECParameters is corrupted.");if(-238==e)throw new _("ASN.1 AlgorithmIdentifer with CompoundKeyParams is corrupted.");if(-239==e)throw new _("ASN.1 AlgorithmIdentifer with HybridKeyParams is corrupted.");if(-301==e)throw new _("Decryption failed, because message info was not given explicitly, and was not part of an encrypted message.");if(-302==e)throw new _("Message Info is corrupted.");if(-303==e)throw new _("Recipient defined with id is not found within message info during data decryption.");if(-304==e)throw new _("Content encryption key can not be decrypted with a given private key.");if(-305==e)throw new _("Content encryption key can not be decrypted with a given password.");if(-306==e)throw new _("Custom parameter with a given key is not found within message info.");if(-307==e)throw new _("A custom parameter with a given key is found, but the requested value type does not correspond to the actual type.");if(-308==e)throw new _("Signature format is corrupted.");if(-309==e)throw new _("Message Info footer is corrupted.");if(-401==e)throw new _("Brainkey password length is out of range.");if(-402==e)throw new _("Brainkey number length should be 32 byte.");if(-403==e)throw new _("Brainkey point length should be 65 bytes.");if(-404==e)throw new _("Brainkey name is out of range.");if(-405==e)throw new _("Brainkey internal error.");if(-406==e)throw new _("Brainkey point is invalid.");if(-407==e)throw new _("Brainkey number buffer length capacity should be >= 32 byte.");if(-408==e)throw new _("Brainkey point buffer length capacity should be >= 32 byte.");if(-409==e)throw new _("Brainkey seed buffer length capacity should be >= 32 byte.");if(-410==e)throw new _("Brainkey identity secret is invalid.");if(-411==e)throw new _("KEM encapsulated key is invalid or does not correspond to the private key.");if(-501==e)throw new _("Invalid padding.");if(-601==e)throw new _("Protobuf error.");if(-701==e)throw new _("Session id doesnt match.");if(-702==e)throw new _("Epoch not found.");if(-703==e)throw new _("Wrong key type.");if(-704==e)throw new _("Invalid signature.");if(-705==e)throw new _("Ed25519 error.");if(-706==e)throw new _("Duplicate epoch.");if(-707==e)throw new _("Plain text too long.");throw new _("Unexpected status code:"+e)}}}return _},Me=(e,t)=>Object.freeze({BOOLEAN:0,INTEGER:1,BIT_STRING:2,OCTET_STRING:3,NULL:4,OID:5,UTF8_STRING:6,SEQUENCE:7,SET:8,PRINTABLE_STRING:9,T61_STRING:10,IA5_STRING:11,UTC_TIME:12,GENERALIZED_TIME:13,UNIVERSAL_STRING:14,BMP_STRING:15,PRIMITIVE:16,CONSTRUCTED:17,CONTEXT_SPECIFIC:18}),He=(e,t)=>Object.freeze({NONE:0,SHA224:1,SHA256:2,SHA384:3,SHA512:4,KDF1:5,KDF2:6,RSA:7,ED25519:8,CURVE25519:9,SECP256R1:10,AES256_GCM:11,AES256_CBC:12,HMAC:13,HKDF:14,PKCS5_PBKDF2:15,PKCS5_PBES2:16,COMPOUND_KEY:17,HYBRID_KEY:18,FALCON:19,ROUND5_ND_1CCA_5D:20,RANDOM_PADDING:21}),Oe=(e,t)=>Object.freeze({NONE:0,RSA:1,ED25519:2,CURVE25519:3,SHA224:4,SHA256:5,SHA384:6,SHA512:7,KDF1:8,KDF2:9,AES256_GCM:10,AES256_CBC:11,PKCS5_PBKDF2:12,PKCS5_PBES2:13,CMS_DATA:14,CMS_ENVELOPED_DATA:15,HKDF_WITH_SHA256:16,HKDF_WITH_SHA384:17,HKDF_WITH_SHA512:18,HMAC_WITH_SHA224:19,HMAC_WITH_SHA256:20,HMAC_WITH_SHA384:21,HMAC_WITH_SHA512:22,EC_GENERIC_KEY:23,EC_DOMAIN_SECP256R1:24,COMPOUND_KEY:25,HYBRID_KEY:26,FALCON:27,ROUND5_ND_1CCA_5D:28,RANDOM_PADDING:29}),Ge=(e,t)=>Object.freeze({GROUP_INFO:0,REGULAR:1}),Ve=(e,t)=>Object.freeze({INITIAL:0,ENCRYPTION:1,DECRYPTION:2}),je=(e,t)=>{class _{constructor(t){this.name="MessageInfo",this.ctxPtr=void 0===t?e._vscf_message_info_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_delete(this.ctxPtr),this.ctxPtr=null)}dataEncryptionAlgInfo(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_data_encryption_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}keyRecipientInfoList(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_key_recipient_info_list(this.ctxPtr),t.KeyRecipientInfoList.newAndUseCContext(_)}passwordRecipientInfoList(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_password_recipient_info_list(this.ctxPtr),t.PasswordRecipientInfoList.newAndUseCContext(_)}hasCustomParams(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_custom_params(this.ctxPtr),!!t}customParams(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_custom_params(this.ctxPtr),t.MessageInfoCustomParams.newAndUseCContext(_)}hasCipherKdfAlgInfo(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_cipher_kdf_alg_info(this.ctxPtr),!!t}cipherKdfAlgInfo(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_kdf_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}hasCipherPaddingAlgInfo(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_cipher_padding_alg_info(this.ctxPtr),!!t}cipherPaddingAlgInfo(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_padding_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}hasFooterInfo(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_footer_info(this.ctxPtr),!!t}footerInfo(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_info(this.ctxPtr),t.FooterInfo.newAndUseCContext(_)}clear(){f.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_clear(this.ctxPtr)}}return _},qe=(e,t)=>{class _{constructor(t){this.name="KeyRecipientInfo",this.ctxPtr=void 0===t?e._vscf_key_recipient_info_new():t}static newAndUseCContext(t){return new _(e._vscf_key_recipient_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithData(r,s,n){u.ensureByteArray("recipientId",r),u.ensureImplementInterface("keyEncryptionAlgorithm",s,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),u.ensureByteArray("encryptedKey",n);const c=r.length*r.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(r,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);let v;e._vsc_data(h,f,l);try{return v=e._vscf_key_recipient_info_new_with_data(o,s.ctxPtr,h),_.newAndTakeCContext(v)}finally{e._free(i),e._free(o),e._free(f),e._free(h)}}recipientId(){u.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_key_recipient_info_recipient_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}keyEncryptionAlgorithm(){let _;return u.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_key_encryption_algorithm(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}encryptedKey(){u.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_key_recipient_info_encrypted_key(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},Xe=(e,t)=>{class _{constructor(t){this.name="KeyRecipientInfoList",this.ctxPtr=void 0===t?e._vscf_key_recipient_info_list_new():t}static newAndUseCContext(t){return new _(e._vscf_key_recipient_info_list_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_item(this.ctxPtr),!!t}item(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_list_item(this.ctxPtr),t.KeyRecipientInfo.newAndUseCContext(_)}hasNext(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_next(this.ctxPtr),!!t}next(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_next(this.ctxPtr),_.newAndUseCContext(t)}hasPrev(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_prev(this.ctxPtr),_.newAndUseCContext(t)}clear(){d.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_recipient_info_list_clear(this.ctxPtr)}}return _},We=(e,t)=>{class _{constructor(t){this.name="PasswordRecipientInfo",this.ctxPtr=void 0===t?e._vscf_password_recipient_info_new():t}static newAndUseCContext(t){return new _(e._vscf_password_recipient_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_password_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithMembers(r,s){h.ensureImplementInterface("keyEncryptionAlgorithm",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),h.ensureByteArray("encryptedKey",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);let o;e._vsc_data(a,c,n);try{return o=e._vscf_password_recipient_info_new_with_members(r.ctxPtr,a),_.newAndTakeCContext(o)}finally{e._free(c),e._free(a)}}keyEncryptionAlgorithm(){let _;return h.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_key_encryption_algorithm(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}encryptedKey(){h.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_password_recipient_info_encrypted_key(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},Ze=(e,t)=>{class _{constructor(t){this.name="PasswordRecipientInfoList",this.ctxPtr=void 0===t?e._vscf_password_recipient_info_list_new():t}static newAndUseCContext(t){return new _(e._vscf_password_recipient_info_list_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_password_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_item(this.ctxPtr),!!t}item(){let _;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_list_item(this.ctxPtr),t.PasswordRecipientInfo.newAndUseCContext(_)}hasNext(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_next(this.ctxPtr),!!t}next(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_next(this.ctxPtr),_.newAndUseCContext(t)}hasPrev(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_prev(this.ctxPtr),_.newAndUseCContext(t)}clear(){v.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_password_recipient_info_list_clear(this.ctxPtr)}}return _},$e=(e,t)=>{class _{constructor(t){this.name="Ecies",this.ctxPtr=void 0===t?e._vscf_ecies_new():t}static newAndUseCContext(t){return new _(e._vscf_ecies_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecies_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_ecies_release_random(this.ctxPtr),e._vscf_ecies_use_random(this.ctxPtr,_.ctxPtr)}set cipher(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("cipher",_,"Foundation.Cipher",t.FoundationInterfaceTag.CIPHER,t.FoundationInterface),e._vscf_ecies_release_cipher(this.ctxPtr),e._vscf_ecies_use_cipher(this.ctxPtr,_.ctxPtr)}set mac(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("mac",_,"Foundation.Mac",t.FoundationInterfaceTag.MAC,t.FoundationInterface),e._vscf_ecies_release_mac(this.ctxPtr),e._vscf_ecies_use_mac(this.ctxPtr,_.ctxPtr)}set kdf(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("kdf",_,"Foundation.Kdf",t.FoundationInterfaceTag.KDF,t.FoundationInterface),e._vscf_ecies_release_kdf(this.ctxPtr),e._vscf_ecies_use_kdf(this.ctxPtr,_.ctxPtr)}set ephemeralKey(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("ephemeralKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),e._vscf_ecies_release_ephemeral_key(this.ctxPtr),e._vscf_ecies_use_ephemeral_key(this.ctxPtr,_.ctxPtr)}setKeyAlg(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("keyAlg",_,"Foundation.KeyAlg",t.FoundationInterfaceTag.KEY_ALG,t.FoundationInterface),e._vscf_ecies_set_key_alg(this.ctxPtr,_.ctxPtr)}releaseKeyAlg(){P.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ecies_release_key_alg(this.ctxPtr)}setupDefaults(){P.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ecies_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupDefaultsNoRandom(){P.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ecies_setup_defaults_no_random(this.ctxPtr)}encryptedLen(_,r){let s;return P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),P.ensureNumber("dataLen",r),s=e._vscf_ecies_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),P.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_ecies_encrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}decryptedLen(_,r){let s;return P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),P.ensureNumber("dataLen",r),s=e._vscf_ecies_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),P.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_ecies_decrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}}return _},Je=(e,t)=>{class _{constructor(t){this.name="RecipientCipher",this.ctxPtr=void 0===t?e._vscf_recipient_cipher_new():t}static newAndUseCContext(t){return new _(e._vscf_recipient_cipher_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_recipient_cipher_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_recipient_cipher_release_random(this.ctxPtr),e._vscf_recipient_cipher_use_random(this.ctxPtr,_.ctxPtr)}set encryptionCipher(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureImplementInterface("encryptionCipher",_,"Foundation.Cipher",t.FoundationInterfaceTag.CIPHER,t.FoundationInterface),e._vscf_recipient_cipher_release_encryption_cipher(this.ctxPtr),e._vscf_recipient_cipher_use_encryption_cipher(this.ctxPtr,_.ctxPtr)}set encryptionPadding(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureImplementInterface("encryptionPadding",_,"Foundation.Padding",t.FoundationInterfaceTag.PADDING,t.FoundationInterface),e._vscf_recipient_cipher_release_encryption_padding(this.ctxPtr),e._vscf_recipient_cipher_use_encryption_padding(this.ctxPtr,_.ctxPtr)}set paddingParams(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureClass("paddingParams",_,t.PaddingParams),e._vscf_recipient_cipher_release_padding_params(this.ctxPtr),e._vscf_recipient_cipher_use_padding_params(this.ctxPtr,_.ctxPtr)}set signerHash(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureImplementInterface("signerHash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_recipient_cipher_release_signer_hash(this.ctxPtr),e._vscf_recipient_cipher_use_signer_hash(this.ctxPtr,_.ctxPtr)}hasKeyRecipient(t){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("recipientId",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_recipient_cipher_has_key_recipient(this.ctxPtr,n),!!c}finally{e._free(r),e._free(n)}}addKeyRecipient(_,r){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("recipientId",_),x.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);try{e._vscf_recipient_cipher_add_key_recipient(this.ctxPtr,i,r.ctxPtr)}finally{e._free(n),e._free(i)}}clearRecipients(){x.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_recipients(this.ctxPtr)}addSigner(_,r){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("signerId",_),x.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);try{const _=e._vscf_recipient_cipher_add_signer(this.ctxPtr,i,r.ctxPtr);t.FoundationError.handleStatusCode(_)}finally{e._free(n),e._free(i)}}clearSigners(){x.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_signers(this.ctxPtr)}customParams(){let _;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_custom_params(this.ctxPtr),t.MessageInfoCustomParams.newAndUseCContext(_)}startEncryption(){x.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_recipient_cipher_start_encryption(this.ctxPtr);t.FoundationError.handleStatusCode(_)}startSignedEncryption(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureNumber("dataSize",_);const r=e._vscf_recipient_cipher_start_signed_encryption(this.ctxPtr,_);t.FoundationError.handleStatusCode(r)}messageInfoLen(){let t;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_message_info_len(this.ctxPtr),t}packMessageInfo(){x.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.messageInfoLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_recipient_cipher_pack_message_info(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}encryptionOutLen(t){let _;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureNumber("dataLen",t),_=e._vscf_recipient_cipher_encryption_out_len(this.ctxPtr,t),_}processEncryption(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.encryptionOutLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_recipient_cipher_process_encryption(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}finishEncryption(){x.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.encryptionOutLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_recipient_cipher_finish_encryption(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}startDecryptionWithKey(_,r,s){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("recipientId",_),x.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),x.ensureByteArray("messageInfo",s);const n=_.length*_.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(_,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=s.length*s.BYTES_PER_ELEMENT,l=e._malloc(o);e.HEAP8.set(s,l);const f=e._vsc_data_ctx_size(),u=e._malloc(f);e._vsc_data(u,l,o);try{const _=e._vscf_recipient_cipher_start_decryption_with_key(this.ctxPtr,a,r.ctxPtr,u);t.FoundationError.handleStatusCode(_)}finally{e._free(c),e._free(a),e._free(l),e._free(u)}}startVerifiedDecryptionWithKey(_,r,s,n){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("recipientId",_),x.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),x.ensureByteArray("messageInfo",s),x.ensureByteArray("messageInfoFooter",n);const c=_.length*_.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(_,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=s.length*s.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(s,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);e._vsc_data(d,f,l);const h=n.length*n.BYTES_PER_ELEMENT,v=e._malloc(h);e.HEAP8.set(n,v);const p=e._vsc_data_ctx_size(),y=e._malloc(p);e._vsc_data(y,v,h);try{const _=e._vscf_recipient_cipher_start_verified_decryption_with_key(this.ctxPtr,o,r.ctxPtr,d,y);t.FoundationError.handleStatusCode(_)}finally{e._free(i),e._free(o),e._free(f),e._free(d),e._free(v),e._free(y)}}decryptionOutLen(t){let _;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureNumber("dataLen",t),_=e._vscf_recipient_cipher_decryption_out_len(this.ctxPtr,t),_}processDecryption(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.decryptionOutLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_recipient_cipher_process_decryption(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}finishDecryption(){x.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.decryptionOutLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_recipient_cipher_finish_decryption(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}isDataSigned(){let t;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_is_data_signed(this.ctxPtr),!!t}signerInfos(){let _;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_signer_infos(this.ctxPtr),t.SignerInfoList.newAndUseCContext(_)}verifySignerInfo(_,r){let s;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureClass("signerInfo",_,t.SignerInfo),x.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),s=e._vscf_recipient_cipher_verify_signer_info(this.ctxPtr,_.ctxPtr,r.ctxPtr),!!s}messageInfoFooterLen(){let t;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_message_info_footer_len(this.ctxPtr),t}packMessageInfoFooter(){x.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.messageInfoFooterLen(),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_recipient_cipher_pack_message_info_footer(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}}return _},Qe=(e,t)=>{class _{constructor(t){this.name="MessageInfoCustomParams",this.ctxPtr=void 0===t?e._vscf_message_info_custom_params_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_custom_params_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_custom_params_delete(this.ctxPtr),this.ctxPtr=null)}addInt(t,_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("key",t),g.ensureNumber("value",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{e._vscf_message_info_custom_params_add_int(this.ctxPtr,c,_)}finally{e._free(s),e._free(c)}}addString(t,_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("key",t),g.ensureByteArray("value",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_.length*_.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(_,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);try{e._vscf_message_info_custom_params_add_string(this.ctxPtr,c,l)}finally{e._free(s),e._free(c),e._free(a),e._free(l)}}addData(t,_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("key",t),g.ensureByteArray("value",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_.length*_.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(_,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);try{e._vscf_message_info_custom_params_add_data(this.ctxPtr,c,l)}finally{e._free(s),e._free(c),e._free(a),e._free(l)}}clear(){g.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_custom_params_clear(this.ctxPtr)}findInt(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_message_info_custom_params_find_int(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),o}finally{e._free(s),e._free(c),e._free(a)}}findString(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);e._vscf_error_reset(a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);try{e._vscf_message_info_custom_params_find_string(l,this.ctxPtr,c,a);const _=e._vscf_error_status(a);t.FoundationError.handleStatusCode(_);const r=e._vsc_data_len(l),s=e._vsc_data_bytes(l);return e.HEAPU8.slice(s,s+r)}finally{e._free(s),e._free(c),e._free(a),e._free(l)}}findData(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);e._vscf_error_reset(a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);try{e._vscf_message_info_custom_params_find_data(l,this.ctxPtr,c,a);const _=e._vscf_error_status(a);t.FoundationError.handleStatusCode(_);const r=e._vsc_data_len(l),s=e._vsc_data_bytes(l);return e.HEAPU8.slice(s,s+r)}finally{e._free(s),e._free(c),e._free(a),e._free(l)}}hasParams(){let t;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_custom_params_has_params(this.ctxPtr),!!t}}return _},et=(e,t)=>{class _{constructor(t){this.name="KeyProvider",this.ctxPtr=void 0===t?e._vscf_key_provider_new():t}static newAndUseCContext(t){return new _(e._vscf_key_provider_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_provider_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_key_provider_release_random(this.ctxPtr),e._vscf_key_provider_use_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){m.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_provider_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setRsaParams(t){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureNumber("bitlen",t),e._vscf_key_provider_set_rsa_params(this.ctxPtr,t)}generatePrivateKey(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureNumber("algId",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_key_provider_generate_private_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}generatePostQuantumPrivateKey(){m.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_key_provider_generate_post_quantum_private_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}generateCompoundPrivateKey(_,r){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureNumber("cipherAlgId",_),m.ensureNumber("signerAlgId",r);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_provider_generate_compound_private_key(this.ctxPtr,_,r,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}generateHybridPrivateKey(_,r){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureNumber("firstKeyAlgId",_),m.ensureNumber("secondKeyAlgId",r);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_provider_generate_hybrid_private_key(this.ctxPtr,_,r,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}generateCompoundHybridPrivateKey(_,r,s,n){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureNumber("cipherFirstKeyAlgId",_),m.ensureNumber("cipherSecondKeyAlgId",r),m.ensureNumber("signerFirstKeyAlgId",s),m.ensureNumber("signerSecondKeyAlgId",n);const c=e._vscf_error_ctx_size(),i=e._malloc(c);let a;e._vscf_error_reset(i);try{a=e._vscf_key_provider_generate_compound_hybrid_private_key(this.ctxPtr,_,r,s,n,i);const c=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(c),t.FoundationInterface.newAndTakeCContext(a)}finally{e._free(i)}}importPrivateKey(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureByteArray("keyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_key_provider_import_private_key(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(a)}}importPublicKey(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureByteArray("keyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_key_provider_import_public_key(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(a)}}exportedPublicKeyLen(_){let r;return m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_key_provider_exported_public_key_len(this.ctxPtr,_.ctxPtr),r}exportPublicKey(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_provider_export_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}exportedPrivateKeyLen(_){let r;return m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_key_provider_exported_private_key_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKey(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_provider_export_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}}return _},tt=(e,t)=>{class _{constructor(t){this.name="Signer",this.ctxPtr=void 0===t?e._vscf_signer_new():t}static newAndUseCContext(t){return new _(e._vscf_signer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_signer_release_hash(this.ctxPtr),e._vscf_signer_use_hash(this.ctxPtr,_.ctxPtr)}set random(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_signer_release_random(this.ctxPtr),e._vscf_signer_use_random(this.ctxPtr,_.ctxPtr)}reset(){E.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_reset(this.ctxPtr)}appendData(t){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_signer_append_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}signatureLen(_){let r;return E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_signer_signature_len(this.ctxPtr,_.ctxPtr),r}sign(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.signatureLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_signer_sign(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}}return _},_t=(e,t)=>{class _{constructor(t){this.name="Verifier",this.ctxPtr=void 0===t?e._vscf_verifier_new():t}static newAndUseCContext(t){return new _(e._vscf_verifier_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_verifier_delete(this.ctxPtr),this.ctxPtr=null)}reset(_){w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.ensureByteArray("signature",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{const _=e._vscf_verifier_reset(this.ctxPtr,c);t.FoundationError.handleStatusCode(_)}finally{e._free(s),e._free(c)}}appendData(t){w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_verifier_append_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}verify(_){let r;return w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_verifier_verify(this.ctxPtr,_.ctxPtr),!!r}}return _},rt=(e,t)=>{class _{static get POINT_LEN(){return 65}get POINT_LEN(){return _.POINT_LEN}static get MPI_LEN(){return 32}get MPI_LEN(){return _.MPI_LEN}static get SEED_LEN(){return 32}get SEED_LEN(){return _.SEED_LEN}static get MAX_PASSWORD_LEN(){return 128}get MAX_PASSWORD_LEN(){return _.MAX_PASSWORD_LEN}static get MAX_KEY_NAME_LEN(){return 128}get MAX_KEY_NAME_LEN(){return _.MAX_KEY_NAME_LEN}constructor(t){this.name="BrainkeyClient",this.ctxPtr=void 0===t?e._vscf_brainkey_client_new():t}static newAndUseCContext(t){return new _(e._vscf_brainkey_client_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_brainkey_client_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_client_release_random(this.ctxPtr),e._vscf_brainkey_client_use_random(this.ctxPtr,_.ctxPtr)}set operationRandom(_){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureImplementInterface("operationRandom",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_client_release_operation_random(this.ctxPtr),e._vscf_brainkey_client_use_operation_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){b.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_client_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}blind(_){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureByteArray("password",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=t.BrainkeyClient.MPI_LEN,a=e._vsc_buffer_new_with_capacity(i),o=t.BrainkeyClient.POINT_LEN,l=e._vsc_buffer_new_with_capacity(o);try{const _=e._vscf_brainkey_client_blind(this.ctxPtr,c,a,l);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a),n=e.HEAPU8.slice(r,r+s),i=e._vsc_buffer_bytes(l),o=e._vsc_buffer_len(l);return{deblindFactor:n,blindedPoint:e.HEAPU8.slice(i,i+o)}}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a),e._vsc_buffer_delete(l)}}deblind(_,r,s,n){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureByteArray("password",_),b.ensureByteArray("hardenedPoint",r),b.ensureByteArray("deblindFactor",s),b.ensureByteArray("keyName",n);const c=_.length*_.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(_,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=r.length*r.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(r,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);e._vsc_data(d,f,l);const h=s.length*s.BYTES_PER_ELEMENT,v=e._malloc(h);e.HEAP8.set(s,v);const p=e._vsc_data_ctx_size(),y=e._malloc(p);e._vsc_data(y,v,h);const P=n.length*n.BYTES_PER_ELEMENT,x=e._malloc(P);e.HEAP8.set(n,x);const g=e._vsc_data_ctx_size(),m=e._malloc(g);e._vsc_data(m,x,P);const E=t.BrainkeyClient.POINT_LEN,w=e._vsc_buffer_new_with_capacity(E);try{const _=e._vscf_brainkey_client_deblind(this.ctxPtr,o,d,y,m,w);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(w),s=e._vsc_buffer_len(w);return e.HEAPU8.slice(r,r+s)}finally{e._free(i),e._free(o),e._free(f),e._free(d),e._free(v),e._free(y),e._free(x),e._free(m),e._vsc_buffer_delete(w)}}}return _},st=(e,t)=>{class _{static get POINT_LEN(){return 65}get POINT_LEN(){return _.POINT_LEN}static get MPI_LEN(){return 32}get MPI_LEN(){return _.MPI_LEN}constructor(t){this.name="BrainkeyServer",this.ctxPtr=void 0===t?e._vscf_brainkey_server_new():t}static newAndUseCContext(t){return new _(e._vscf_brainkey_server_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_brainkey_server_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_server_release_random(this.ctxPtr),e._vscf_brainkey_server_use_random(this.ctxPtr,_.ctxPtr)}set operationRandom(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureImplementInterface("operationRandom",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_server_release_operation_random(this.ctxPtr),e._vscf_brainkey_server_use_operation_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){k.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_server_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateIdentitySecret(){k.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=t.BrainkeyServer.MPI_LEN,r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_brainkey_server_generate_identity_secret(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}harden(_,r){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureByteArray("identitySecret",_),k.ensureByteArray("blindedPoint",r);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=r.length*r.BYTES_PER_ELEMENT,o=e._malloc(a);e.HEAP8.set(r,o);const l=e._vsc_data_ctx_size(),f=e._malloc(l);e._vsc_data(f,o,a);const u=t.BrainkeyServer.POINT_LEN,d=e._vsc_buffer_new_with_capacity(u);try{const _=e._vscf_brainkey_server_harden(this.ctxPtr,i,f,d);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(d),s=e._vsc_buffer_len(d);return e.HEAPU8.slice(r,r+s)}finally{e._free(n),e._free(i),e._free(o),e._free(f),e._vsc_buffer_delete(d)}}}return _},nt=(e,t)=>{class _{static get MAX_MESSAGE_LEN(){return 30188}get MAX_MESSAGE_LEN(){return _.MAX_MESSAGE_LEN}static get MESSAGE_VERSION(){return 1}get MESSAGE_VERSION(){return _.MESSAGE_VERSION}constructor(t){this.name="GroupSessionMessage",this.ctxPtr=void 0===t?e._vscf_group_session_message_new():t}static newAndUseCContext(t){return new _(e._vscf_group_session_message_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_message_delete(this.ctxPtr),this.ctxPtr=null)}getType(){let t;return I.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_get_type(this.ctxPtr),t}getSessionId(){I.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_group_session_message_get_session_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}getEpoch(){let t;return I.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_get_epoch(this.ctxPtr),t}serializeLen(){let t;return I.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_serialize_len(this.ctxPtr),t}serialize(){I.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.serializeLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_group_session_message_serialize(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}static deserialize(r){I.ensureByteArray("input",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_group_session_message_deserialize(i,o);const r=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(r),_.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}}return _},ct=(e,t)=>{class _{constructor(t){this.name="GroupSessionTicket",this.ctxPtr=void 0===t?e._vscf_group_session_ticket_new():t}static newAndUseCContext(t){return new _(e._vscf_group_session_ticket_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_ticket_delete(this.ctxPtr),this.ctxPtr=null)}set rng(_){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.ensureImplementInterface("rng",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_group_session_ticket_release_rng(this.ctxPtr),e._vscf_group_session_ticket_use_rng(this.ctxPtr,_.ctxPtr)}setupDefaults(){N.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_ticket_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupTicketAsNew(_){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.ensureByteArray("sessionId",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{const _=e._vscf_group_session_ticket_setup_ticket_as_new(this.ctxPtr,c);t.FoundationError.handleStatusCode(_)}finally{e._free(s),e._free(c)}}getTicketMessage(){let _;return N.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_group_session_ticket_get_ticket_message(this.ctxPtr),t.GroupSessionMessage.newAndUseCContext(_)}}return _},it=(e,t)=>{class _{static get SENDER_ID_LEN(){return 32}get SENDER_ID_LEN(){return _.SENDER_ID_LEN}static get MAX_PLAIN_TEXT_LEN(){return 3e4}get MAX_PLAIN_TEXT_LEN(){return _.MAX_PLAIN_TEXT_LEN}static get MAX_EPOCHS_COUNT(){return 50}get MAX_EPOCHS_COUNT(){return _.MAX_EPOCHS_COUNT}static get SALT_SIZE(){return 32}get SALT_SIZE(){return _.SALT_SIZE}constructor(t){this.name="GroupSession",this.ctxPtr=void 0===t?e._vscf_group_session_new():t}static newAndUseCContext(t){return new _(e._vscf_group_session_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_delete(this.ctxPtr),this.ctxPtr=null)}set rng(_){A.ensureNotNull("this.ctxPtr",this.ctxPtr),A.ensureImplementInterface("rng",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_group_session_release_rng(this.ctxPtr),e._vscf_group_session_use_rng(this.ctxPtr,_.ctxPtr)}getCurrentEpoch(){let t;return A.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_get_current_epoch(this.ctxPtr),t}setupDefaults(){A.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}getSessionId(){A.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_group_session_get_session_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}addEpoch(_){A.ensureNotNull("this.ctxPtr",this.ctxPtr),A.ensureClass("message",_,t.GroupSessionMessage);const r=e._vscf_group_session_add_epoch(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_,r){A.ensureNotNull("this.ctxPtr",this.ctxPtr),A.ensureByteArray("plainText",_),A.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_group_session_encrypt(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.GroupSessionMessage.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}decryptLen(_){let r;return A.ensureNotNull("this.ctxPtr",this.ctxPtr),A.ensureClass("message",_,t.GroupSessionMessage),r=e._vscf_group_session_decrypt_len(this.ctxPtr,_.ctxPtr),r}decrypt(_,r){A.ensureNotNull("this.ctxPtr",this.ctxPtr),A.ensureClass("message",_,t.GroupSessionMessage),A.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const s=this.decryptLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_group_session_decrypt(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),i=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+i)}finally{e._vsc_buffer_delete(n)}}createGroupTicket(){A.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_group_session_create_group_ticket(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.GroupSessionTicket.newAndTakeCContext(s)}finally{e._free(r)}}}return _},at=(e,t)=>{class _{constructor(t){this.name="MessageInfoEditor",this.ctxPtr=void 0===t?e._vscf_message_info_editor_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_editor_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_editor_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_message_info_editor_release_random(this.ctxPtr),e._vscf_message_info_editor_use_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){C.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_message_info_editor_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}unpack(_){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureByteArray("messageInfoData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{const _=e._vscf_message_info_editor_unpack(this.ctxPtr,c);t.FoundationError.handleStatusCode(_)}finally{e._free(s),e._free(c)}}unlock(_,r){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureByteArray("ownerRecipientId",_),C.ensureImplementInterface("ownerPrivateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);try{const _=e._vscf_message_info_editor_unlock(this.ctxPtr,i,r.ctxPtr);t.FoundationError.handleStatusCode(_)}finally{e._free(n),e._free(i)}}addKeyRecipient(_,r){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureByteArray("recipientId",_),C.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);try{const _=e._vscf_message_info_editor_add_key_recipient(this.ctxPtr,i,r.ctxPtr);t.FoundationError.handleStatusCode(_)}finally{e._free(n),e._free(i)}}removeKeyRecipient(t){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureByteArray("recipientId",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_message_info_editor_remove_key_recipient(this.ctxPtr,n),!!c}finally{e._free(r),e._free(n)}}removeAll(){C.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_editor_remove_all(this.ctxPtr)}packedLen(){let t;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_editor_packed_len(this.ctxPtr),t}pack(){C.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.packedLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_message_info_editor_pack(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},ot=(e,t)=>{class _{constructor(t){this.name="SignerInfo",this.ctxPtr=void 0===t?e._vscf_signer_info_new():t}static newAndUseCContext(t){return new _(e._vscf_signer_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_info_delete(this.ctxPtr),this.ctxPtr=null)}signerId(){T.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_signer_info_signer_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}signerAlgInfo(){let _;return T.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_signer_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signature(){T.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_signer_info_signature(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},lt=(e,t)=>{class _{constructor(t){this.name="SignerInfoList",this.ctxPtr=void 0===t?e._vscf_signer_info_list_new():t}static newAndUseCContext(t){return new _(e._vscf_signer_info_list_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let t;return F.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_item(this.ctxPtr),!!t}item(){let _;return F.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_list_item(this.ctxPtr),t.SignerInfo.newAndUseCContext(_)}hasNext(){let t;return F.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_next(this.ctxPtr),!!t}next(){let t;return F.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_next(this.ctxPtr),_.newAndTakeCContext(t)}hasPrev(){let t;return F.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return F.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_prev(this.ctxPtr),_.newAndTakeCContext(t)}clear(){F.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_info_list_clear(this.ctxPtr)}}return _},ft=(e,t)=>{class _{constructor(t){this.name="MessageInfoFooter",this.ctxPtr=void 0===t?e._vscf_message_info_footer_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_footer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_footer_delete(this.ctxPtr),this.ctxPtr=null)}hasSignerInfos(){let t;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_footer_has_signer_infos(this.ctxPtr),!!t}signerInfos(){let _;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_infos(this.ctxPtr),t.SignerInfoList.newAndUseCContext(_)}signerHashAlgInfo(){let _;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerDigest(){K.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_message_info_footer_signer_digest(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},ut=(e,t)=>{class _{constructor(t){this.name="SignedDataInfo",this.ctxPtr=void 0===t?e._vscf_signed_data_info_new():t}static newAndUseCContext(t){return new _(e._vscf_signed_data_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signed_data_info_delete(this.ctxPtr),this.ctxPtr=null)}hashAlgInfo(){let _;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signed_data_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},dt=(e,t)=>{class _{constructor(t){this.name="FooterInfo",this.ctxPtr=void 0===t?e._vscf_footer_info_new():t}static newAndUseCContext(t){return new _(e._vscf_footer_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_footer_info_delete(this.ctxPtr),this.ctxPtr=null)}hasSignedDataInfo(){let t;return L.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_footer_info_has_signed_data_info(this.ctxPtr),!!t}signedDataInfo(){let _;return L.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_footer_info_signed_data_info(this.ctxPtr),t.SignedDataInfo.newAndUseCContext(_)}setDataSize(t){L.ensureNotNull("this.ctxPtr",this.ctxPtr),L.ensureNumber("dataSize",t),e._vscf_footer_info_set_data_size(this.ctxPtr,t)}dataSize(){let t;return L.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_footer_info_data_size(this.ctxPtr),t}}return _},ht=(e,t)=>{class _{constructor(t){this.name="KeyInfo",this.ctxPtr=void 0===t?e._vscf_key_info_new():t}static newAndUseCContext(t){return new _(e._vscf_key_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithAlgInfo(r){let s;return R.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),s=e._vscf_key_info_new_with_alg_info(r.ctxPtr),_.newAndTakeCContext(s)}isCompound(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound(this.ctxPtr),!!t}isHybrid(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid(this.ctxPtr),!!t}isCompoundHybrid(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid(this.ctxPtr),!!t}isCompoundHybridCipher(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid_cipher(this.ctxPtr),!!t}isCompoundHybridSigner(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid_signer(this.ctxPtr),!!t}isHybridPostQuantum(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum(this.ctxPtr),!!t}isHybridPostQuantumCipher(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum_cipher(this.ctxPtr),!!t}isHybridPostQuantumSigner(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum_signer(this.ctxPtr),!!t}algId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_alg_id(this.ctxPtr),t}compoundCipherAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_cipher_alg_id(this.ctxPtr),t}compoundSignerAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_signer_alg_id(this.ctxPtr),t}hybridFirstKeyAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_hybrid_first_key_alg_id(this.ctxPtr),t}hybridSecondKeyAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_hybrid_second_key_alg_id(this.ctxPtr),t}compoundHybridCipherFirstKeyAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_cipher_first_key_alg_id(this.ctxPtr),t}compoundHybridCipherSecondKeyAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_cipher_second_key_alg_id(this.ctxPtr),t}compoundHybridSignerFirstKeyAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_signer_first_key_alg_id(this.ctxPtr),t}compoundHybridSignerSecondKeyAlgId(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_signer_second_key_alg_id(this.ctxPtr),t}}return _},vt=(e,t)=>{class _{static get DEFAULT_FRAME_MIN(){return 32}get DEFAULT_FRAME_MIN(){return _.DEFAULT_FRAME_MIN}static get DEFAULT_FRAME(){return 160}get DEFAULT_FRAME(){return _.DEFAULT_FRAME}static get DEFAULT_FRAME_MAX(){return 256}get DEFAULT_FRAME_MAX(){return _.DEFAULT_FRAME_MAX}constructor(t){this.name="PaddingParams",this.ctxPtr=void 0===t?e._vscf_padding_params_new():t}static newAndUseCContext(t){return new _(e._vscf_padding_params_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_padding_params_delete(this.ctxPtr),this.ctxPtr=null)}static newWithConstraints(t,r){let s;return z.ensureNumber("frame",t),z.ensureNumber("frameMax",r),s=e._vscf_padding_params_new_with_constraints(t,r),_.newAndTakeCContext(s)}frame(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_padding_params_frame(this.ctxPtr),t}frameMax(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_padding_params_frame_max(this.ctxPtr),t}}return _},pt=(e,t)=>{class _{static get DIGEST_LEN(){return 28}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha224",this.ctxPtr=void 0===t?e._vscf_sha224_new():t}static newAndUseCContext(t){return new _(e._vscf_sha224_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha224_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return B.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha224_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return B.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha224_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){B.ensureNotNull("this.ctxPtr",this.ctxPtr),B.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha224_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){B.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,i=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha224_hash(n,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(i)}}start(){B.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha224_start(this.ctxPtr)}update(t){B.ensureNotNull("this.ctxPtr",this.ctxPtr),B.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha224_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){B.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha224_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},yt=(e,t)=>{class _{static get DIGEST_LEN(){return 32}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha256",this.ctxPtr=void 0===t?e._vscf_sha256_new():t}static newAndUseCContext(t){return new _(e._vscf_sha256_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha256_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return U.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha256_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return U.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha256_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){U.ensureNotNull("this.ctxPtr",this.ctxPtr),U.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha256_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){U.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,i=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha256_hash(n,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(i)}}start(){U.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha256_start(this.ctxPtr)}update(t){U.ensureNotNull("this.ctxPtr",this.ctxPtr),U.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha256_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){U.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha256_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},Pt=(e,t)=>{class _{static get DIGEST_LEN(){return 48}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha384",this.ctxPtr=void 0===t?e._vscf_sha384_new():t}static newAndUseCContext(t){return new _(e._vscf_sha384_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha384_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha384_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha384_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha384_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){D.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,i=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha384_hash(n,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(i)}}start(){D.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha384_start(this.ctxPtr)}update(t){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha384_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){D.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha384_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},xt=(e,t)=>{class _{static get DIGEST_LEN(){return 64}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha512",this.ctxPtr=void 0===t?e._vscf_sha512_new():t}static newAndUseCContext(t){return new _(e._vscf_sha512_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha512_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha512_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha512_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha512_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){Y.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,i=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha512_hash(n,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(i)}}start(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha512_start(this.ctxPtr)}update(t){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha512_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha512_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},gt=(e,t)=>{class _{static get NONCE_LEN(){return 12}get NONCE_LEN(){return _.NONCE_LEN}static get KEY_LEN(){return 32}get KEY_LEN(){return _.KEY_LEN}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return _.KEY_BITLEN}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return _.BLOCK_LEN}static get AUTH_TAG_LEN(){return 16}get AUTH_TAG_LEN(){return _.AUTH_TAG_LEN}constructor(t){this.name="Aes256Gcm",this.ctxPtr=void 0===t?e._vscf_aes256_gcm_new():t}static newAndUseCContext(t){return new _(e._vscf_aes256_gcm_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_aes256_gcm_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_gcm_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_gcm_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_aes256_gcm_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.encryptedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_aes256_gcm_encrypt(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}encryptedLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.decryptedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_aes256_gcm_decrypt(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}decryptedLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_decrypted_len(this.ctxPtr,t),_}setNonce(t){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("nonce",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_gcm_set_nonce(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}setKey(t){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("key",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_gcm_set_key(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}state(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_gcm_state(this.ctxPtr),t}startEncryption(){M.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_encryption(this.ctxPtr)}startDecryption(){M.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_decryption(this.ctxPtr)}update(t){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.outLen(t.length),i=e._vsc_buffer_new_with_capacity(c);try{e._vscf_aes256_gcm_update(this.ctxPtr,n,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(i)}}outLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_out_len(this.ctxPtr,t),_}encryptedOutLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_encrypted_out_len(this.ctxPtr,t),_}decryptedOutLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_decrypted_out_len(this.ctxPtr,t),_}finish(){M.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_aes256_gcm_finish(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}authEncrypt(_,r){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("data",_),M.ensureByteArray("authData",r);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=r.length*r.BYTES_PER_ELEMENT,o=e._malloc(a);e.HEAP8.set(r,o);const l=e._vsc_data_ctx_size(),f=e._malloc(l);e._vsc_data(f,o,a);const u=this.authEncryptedLen(_.length),d=e._vsc_buffer_new_with_capacity(u),h=this.AUTH_TAG_LEN,v=e._vsc_buffer_new_with_capacity(h);try{const _=e._vscf_aes256_gcm_auth_encrypt(this.ctxPtr,i,f,d,v);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(d),s=e._vsc_buffer_len(d),n=e.HEAPU8.slice(r,r+s),c=e._vsc_buffer_bytes(v),a=e._vsc_buffer_len(v);return{out:n,tag:e.HEAPU8.slice(c,c+a)}}finally{e._free(n),e._free(i),e._free(o),e._free(f),e._vsc_buffer_delete(d),e._vsc_buffer_delete(v)}}authEncryptedLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_auth_encrypted_len(this.ctxPtr,t),_}authDecrypt(_,r,s){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("data",_),M.ensureByteArray("authData",r),M.ensureByteArray("tag",s);const n=_.length*_.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(_,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=r.length*r.BYTES_PER_ELEMENT,l=e._malloc(o);e.HEAP8.set(r,l);const f=e._vsc_data_ctx_size(),u=e._malloc(f);e._vsc_data(u,l,o);const d=s.length*s.BYTES_PER_ELEMENT,h=e._malloc(d);e.HEAP8.set(s,h);const v=e._vsc_data_ctx_size(),p=e._malloc(v);e._vsc_data(p,h,d);const y=this.authDecryptedLen(_.length),P=e._vsc_buffer_new_with_capacity(y);try{const _=e._vscf_aes256_gcm_auth_decrypt(this.ctxPtr,a,u,p,P);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(P),s=e._vsc_buffer_len(P);return e.HEAPU8.slice(r,r+s)}finally{e._free(c),e._free(a),e._free(l),e._free(u),e._free(h),e._free(p),e._vsc_buffer_delete(P)}}authDecryptedLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_auth_decrypted_len(this.ctxPtr,t),_}setAuthData(t){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("authData",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_gcm_set_auth_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finishAuthEncryption(){M.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),r=e._vsc_buffer_new_with_capacity(_),s=this.AUTH_TAG_LEN,n=e._vsc_buffer_new_with_capacity(s);try{const _=e._vscf_aes256_gcm_finish_auth_encryption(this.ctxPtr,r,n);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),c=e._vsc_buffer_len(r),i=e.HEAPU8.slice(s,s+c),a=e._vsc_buffer_bytes(n),o=e._vsc_buffer_len(n);return{out:i,tag:e.HEAPU8.slice(a,a+o)}}finally{e._vsc_buffer_delete(r),e._vsc_buffer_delete(n)}}finishAuthDecryption(_){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("tag",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.outLen(0),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_aes256_gcm_finish_auth_decryption(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}}return _},mt=(e,t)=>{class _{static get NONCE_LEN(){return 16}get NONCE_LEN(){return _.NONCE_LEN}static get KEY_LEN(){return 32}get KEY_LEN(){return _.KEY_LEN}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return _.KEY_BITLEN}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Aes256Cbc",this.ctxPtr=void 0===t?e._vscf_aes256_cbc_new():t}static newAndUseCContext(t){return new _(e._vscf_aes256_cbc_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_aes256_cbc_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_cbc_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_cbc_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_aes256_cbc_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.encryptedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_aes256_cbc_encrypt(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}encryptedLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.decryptedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_aes256_cbc_decrypt(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}decryptedLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_decrypted_len(this.ctxPtr,t),_}setNonce(t){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("nonce",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_cbc_set_nonce(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}setKey(t){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("key",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_cbc_set_key(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}state(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_cbc_state(this.ctxPtr),t}startEncryption(){H.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_encryption(this.ctxPtr)}startDecryption(){H.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_decryption(this.ctxPtr)}update(t){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.outLen(t.length),i=e._vsc_buffer_new_with_capacity(c);try{e._vscf_aes256_cbc_update(this.ctxPtr,n,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(i)}}outLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_out_len(this.ctxPtr,t),_}encryptedOutLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_encrypted_out_len(this.ctxPtr,t),_}decryptedOutLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_decrypted_out_len(this.ctxPtr,t),_}finish(){H.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_aes256_cbc_finish(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}}return _},Et=(e,t)=>{class _{constructor(t){this.name="Asn1rd",this.ctxPtr=void 0===t?e._vscf_asn1rd_new():t}static newAndUseCContext(t){return new _(e._vscf_asn1rd_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_asn1rd_delete(this.ctxPtr),this.ctxPtr=null)}reset(t){O.ensureNotNull("this.ctxPtr",this.ctxPtr),O.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_asn1rd_reset(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}leftLen(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_left_len(this.ctxPtr),t}hasError(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_has_error(this.ctxPtr),!!t}status(){O.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1rd_status(this.ctxPtr);t.FoundationError.handleStatusCode(_)}getTag(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_tag(this.ctxPtr),t}getLen(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_len(this.ctxPtr),t}getDataLen(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_data_len(this.ctxPtr),t}readTag(t){let _;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),O.ensureNumber("tag",t),_=e._vscf_asn1rd_read_tag(this.ctxPtr,t),_}readContextTag(t){let _;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),O.ensureNumber("tag",t),_=e._vscf_asn1rd_read_context_tag(this.ctxPtr,t),_}readInt(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int(this.ctxPtr),t}readInt8(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int8(this.ctxPtr),t}readInt16(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int16(this.ctxPtr),t}readInt32(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int32(this.ctxPtr),t}readInt64(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int64(this.ctxPtr),t}readUint(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint(this.ctxPtr),t}readUint8(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint8(this.ctxPtr),t}readUint16(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint16(this.ctxPtr),t}readUint32(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint32(this.ctxPtr),t}readUint64(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint64(this.ctxPtr),t}readBool(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_bool(this.ctxPtr),!!t}readNull(){O.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null(this.ctxPtr)}readNullOptional(){O.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null_optional(this.ctxPtr)}readOctetStr(){O.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_octet_str(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readBitstringAsOctetStr(){O.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_bitstring_as_octet_str(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readUtf8Str(){O.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_utf8_str(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readOid(){O.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_oid(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readData(t){O.ensureNotNull("this.ctxPtr",this.ctxPtr),O.ensureNumber("len",t);const _=e._vsc_data_ctx_size(),r=e._malloc(_);try{e._vscf_asn1rd_read_data(r,this.ctxPtr,t);const _=e._vsc_data_len(r),s=e._vsc_data_bytes(r);return e.HEAPU8.slice(s,s+_)}finally{e._free(r)}}readSequence(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_sequence(this.ctxPtr),t}readSet(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_set(this.ctxPtr),t}}return _},wt=(e,t)=>{class _{constructor(t){this.name="Asn1wr",this.ctxPtr=void 0===t?e._vscf_asn1wr_new():t}static newAndUseCContext(t){return new _(e._vscf_asn1wr_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_asn1wr_delete(this.ctxPtr),this.ctxPtr=null)}reset(t,_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("out",t),G.ensureNumber("outLen",_),e._vscf_asn1wr_reset(this.ctxPtr,t,_)}finish(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureBoolean("doNotAdjust",t),_=e._vscf_asn1wr_finish(this.ctxPtr,t),_}bytes(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_bytes(this.ctxPtr),t}len(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_len(this.ctxPtr),t}writtenLen(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_written_len(this.ctxPtr),t}unwrittenLen(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_unwritten_len(this.ctxPtr),t}hasError(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_has_error(this.ctxPtr),!!t}status(){G.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1wr_status(this.ctxPtr);t.FoundationError.handleStatusCode(_)}reserve(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("len",t),_=e._vscf_asn1wr_reserve(this.ctxPtr,t),_}writeTag(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("tag",t),_=e._vscf_asn1wr_write_tag(this.ctxPtr,t),_}writeContextTag(t,_){let r;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("tag",t),G.ensureNumber("len",_),r=e._vscf_asn1wr_write_context_tag(this.ctxPtr,t,_),r}writeLen(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("len",t),_=e._vscf_asn1wr_write_len(this.ctxPtr,t),_}writeInt(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_int(this.ctxPtr,t),_}writeInt8(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_int8(this.ctxPtr,t),_}writeInt16(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_int16(this.ctxPtr,t),_}writeInt32(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_int32(this.ctxPtr,t),_}writeInt64(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_int64(this.ctxPtr,t),_}writeUint(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint(this.ctxPtr,t),_}writeUint8(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint8(this.ctxPtr,t),_}writeUint16(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint16(this.ctxPtr,t),_}writeUint32(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint32(this.ctxPtr,t),_}writeUint64(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint64(this.ctxPtr,t),_}writeBool(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureBoolean("value",t),_=e._vscf_asn1wr_write_bool(this.ctxPtr,t),_}writeNull(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_write_null(this.ctxPtr),t}writeOctetStr(t){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_octet_str(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeOctetStrAsBitstring(t){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_octet_str_as_bitstring(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeData(t){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_data(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeUtf8Str(t){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_utf8_str(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeOid(t){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_oid(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeSequence(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("len",t),_=e._vscf_asn1wr_write_sequence(this.ctxPtr,t),_}writeSet(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("len",t),_=e._vscf_asn1wr_write_set(this.ctxPtr,t),_}}return _},bt=(e,t)=>{class _{constructor(t){this.name="RsaPublicKey",this.ctxPtr=void 0===t?e._vscf_rsa_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_rsa_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_len(this.ctxPtr),t}bitlen(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_is_valid(this.ctxPtr),!!t}keyExponent(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_key_exponent(this.ctxPtr),t}}return _},kt=(e,t)=>{class _{constructor(t){this.name="RsaPrivateKey",this.ctxPtr=void 0===t?e._vscf_rsa_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_rsa_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_len(this.ctxPtr),t}bitlen(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}}return _},It=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Rsa",this.ctxPtr=void 0===t?e._vscf_rsa_new():t}static newAndUseCContext(t){return new _(e._vscf_rsa_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_rsa_release_random(this.ctxPtr),e._vscf_rsa_use_random(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureByteArray("keyData",_),q.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_rsa_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_rsa_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_rsa_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureByteArray("keyData",_),q.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_rsa_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_rsa_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),q.ensureNumber("dataLen",r),s=e._vscf_rsa_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),q.ensureNumber("dataLen",r),s=e._vscf_rsa_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),q.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_rsa_encrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),q.ensureNumber("dataLen",r),s=e._vscf_rsa_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),q.ensureNumber("dataLen",r),s=e._vscf_rsa_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),q.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_rsa_decrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canSign(_){let r;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),q.ensureNumber("hashId",r),q.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_rsa_sign_hash(this.ctxPtr,_.ctxPtr,r,a,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canVerify(_){let r;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_rsa_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),q.ensureNumber("hashId",r),q.ensureByteArray("digest",s),q.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(s,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);let h;e._vsc_data(d,f,l);try{return h=e._vscf_rsa_verify_hash(this.ctxPtr,_.ctxPtr,r,o,d),!!h}finally{e._free(i),e._free(o),e._free(f),e._free(d)}}setupDefaults(){q.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_rsa_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){q.ensureNotNull("this.ctxPtr",this.ctxPtr),q.ensureNumber("bitlen",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_generate_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _},Nt=(e,t)=>{class _{constructor(t){this.name="EccPublicKey",this.ctxPtr=void 0===t?e._vscf_ecc_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_len(this.ctxPtr),t}bitlen(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_is_valid(this.ctxPtr),!!t}}return _},At=(e,t)=>{class _{constructor(t){this.name="EccPrivateKey",this.ctxPtr=void 0===t?e._vscf_ecc_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_len(this.ctxPtr),t}bitlen(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}}return _},Ct=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Ecc",this.ctxPtr=void 0===t?e._vscf_ecc_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_ecc_release_random(this.ctxPtr),e._vscf_ecc_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureClass("ecies",_,t.Ecies),e._vscf_ecc_release_ecies(this.ctxPtr),e._vscf_ecc_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureByteArray("keyData",_),Z.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_ecc_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ecc_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureByteArray("keyData",_),Z.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_ecc_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ecc_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Z.ensureNumber("dataLen",r),s=e._vscf_ecc_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Z.ensureNumber("dataLen",r),s=e._vscf_ecc_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Z.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_ecc_encrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Z.ensureNumber("dataLen",r),s=e._vscf_ecc_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Z.ensureNumber("dataLen",r),s=e._vscf_ecc_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Z.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_ecc_decrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canSign(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Z.ensureNumber("hashId",r),Z.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_ecc_sign_hash(this.ctxPtr,_.ctxPtr,r,a,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canVerify(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Z.ensureNumber("hashId",r),Z.ensureByteArray("digest",s),Z.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(s,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);let h;e._vsc_data(d,f,l);try{return h=e._vscf_ecc_verify_hash(this.ctxPtr,_.ctxPtr,r,o,d),!!h}finally{e._free(i),e._free(o),e._free(f),e._free(d)}}computeSharedKey(_,r){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Z.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=this.sharedKeyLen(r),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_ecc_compute_shared_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),i=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+i)}finally{e._vsc_buffer_delete(n)}}sharedKeyLen(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ecc_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ecc_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_ecc_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),i=e._vsc_buffer_len(s),a=e.HEAPU8.slice(n,n+i),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureByteArray("encapsulatedKey",_),Z.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_ecc_kem_decapsulate(this.ctxPtr,i,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}setupDefaults(){Z.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ecc_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureNumber("algId",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_generate_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _},Tt=(e,t)=>{class _{static get SOURCES_MAX(){return 15}get SOURCES_MAX(){return _.SOURCES_MAX}constructor(t){this.name="EntropyAccumulator",this.ctxPtr=void 0===t?e._vscf_entropy_accumulator_new():t}static newAndUseCContext(t){return new _(e._vscf_entropy_accumulator_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_entropy_accumulator_delete(this.ctxPtr),this.ctxPtr=null)}isStrong(){let t;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_entropy_accumulator_is_strong(this.ctxPtr),!!t}gather(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureNumber("len",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_entropy_accumulator_gather(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){$.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_entropy_accumulator_setup_defaults(this.ctxPtr)}addSource(_,r){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("source",_,"Foundation.EntropySource",t.FoundationInterfaceTag.ENTROPY_SOURCE,t.FoundationInterface),$.ensureNumber("threshold",r),e._vscf_entropy_accumulator_add_source(this.ctxPtr,_.ctxPtr,r)}}return _},Ft=(e,t)=>{class _{static get RESEED_INTERVAL(){return 1e4}get RESEED_INTERVAL(){return _.RESEED_INTERVAL}static get ENTROPY_LEN(){return 48}get ENTROPY_LEN(){return _.ENTROPY_LEN}constructor(t){this.name="CtrDrbg",this.ctxPtr=void 0===t?e._vscf_ctr_drbg_new():t}static newAndUseCContext(t){return new _(e._vscf_ctr_drbg_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ctr_drbg_delete(this.ctxPtr),this.ctxPtr=null)}set entropySource(_){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureImplementInterface("entropySource",_,"Foundation.EntropySource",t.FoundationInterfaceTag.ENTROPY_SOURCE,t.FoundationInterface),e._vscf_ctr_drbg_release_entropy_source(this.ctxPtr);const r=e._vscf_ctr_drbg_use_entropy_source(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}random(_){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureNumber("dataLen",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ctr_drbg_random(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}reseed(){J.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupDefaults(){J.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}enablePredictionResistance(){J.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ctr_drbg_enable_prediction_resistance(this.ctxPtr)}setReseedInterval(t){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureNumber("interval",t),e._vscf_ctr_drbg_set_reseed_interval(this.ctxPtr,t)}setEntropyLen(t){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureNumber("len",t),e._vscf_ctr_drbg_set_entropy_len(this.ctxPtr,t)}}return _},Kt=(e,t)=>{class _{constructor(t){this.name="Hmac",this.ctxPtr=void 0===t?e._vscf_hmac_new():t}static newAndUseCContext(t){return new _(e._vscf_hmac_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hmac_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_hmac_release_hash(this.ctxPtr),e._vscf_hmac_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return Q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hmac_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return Q.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hmac_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_hmac_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}digestLen(){let t;return Q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hmac_digest_len(this.ctxPtr),t}mac(t,_){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureByteArray("key",t),Q.ensureByteArray("data",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_.length*_.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(_,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);const f=this.digestLen(),u=e._vsc_buffer_new_with_capacity(f);try{e._vscf_hmac_mac(this.ctxPtr,c,l,u);const t=e._vsc_buffer_bytes(u),_=e._vsc_buffer_len(u);return e.HEAPU8.slice(t,t+_)}finally{e._free(s),e._free(c),e._free(a),e._free(l),e._vsc_buffer_delete(u)}}start(t){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureByteArray("key",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_hmac_start(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}update(t){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_hmac_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){Q.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.digestLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_hmac_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}reset(){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_hmac_reset(this.ctxPtr)}}return _},St=(e,t)=>{class _{constructor(t){this.name="Hkdf",this.ctxPtr=void 0===t?e._vscf_hkdf_new():t}static newAndUseCContext(t){return new _(e._vscf_hkdf_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hkdf_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_hkdf_release_hash(this.ctxPtr),e._vscf_hkdf_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hkdf_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hkdf_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_hkdf_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureByteArray("data",t),ee.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_hkdf_derive(this.ctxPtr,c,_,a);const t=e._vsc_buffer_bytes(a),r=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}reset(t,_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureByteArray("salt",t),ee.ensureNumber("iterationCount",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{e._vscf_hkdf_reset(this.ctxPtr,c,_)}finally{e._free(s),e._free(c)}}setInfo(t){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureByteArray("info",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_hkdf_set_info(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Lt=(e,t)=>{class _{constructor(t){this.name="Kdf1",this.ctxPtr=void 0===t?e._vscf_kdf1_new():t}static newAndUseCContext(t){return new _(e._vscf_kdf1_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_kdf1_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_kdf1_release_hash(this.ctxPtr),e._vscf_kdf1_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return te.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_kdf1_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return te.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf1_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_kdf1_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureByteArray("data",t),te.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_kdf1_derive(this.ctxPtr,c,_,a);const t=e._vsc_buffer_bytes(a),r=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}}return _},Rt=(e,t)=>{class _{constructor(t){this.name="Kdf2",this.ctxPtr=void 0===t?e._vscf_kdf2_new():t}static newAndUseCContext(t){return new _(e._vscf_kdf2_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_kdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_kdf2_release_hash(this.ctxPtr),e._vscf_kdf2_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return _e.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_kdf2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return _e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf2_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_kdf2_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.ensureByteArray("data",t),_e.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_kdf2_derive(this.ctxPtr,c,_,a);const t=e._vsc_buffer_bytes(a),r=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}}return _},zt=(e,t)=>{class _{constructor(t){this.name="FakeRandom",this.ctxPtr=void 0===t?e._vscf_fake_random_new():t}static newAndUseCContext(t){return new _(e._vscf_fake_random_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_fake_random_delete(this.ctxPtr),this.ctxPtr=null)}random(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureNumber("dataLen",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_fake_random_random(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}reseed(){re.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_fake_random_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}isStrong(){let t;return re.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_fake_random_is_strong(this.ctxPtr),!!t}gather(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureNumber("len",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_fake_random_gather(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupSourceByte(t){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureNumber("byteSource",t),e._vscf_fake_random_setup_source_byte(this.ctxPtr,t)}setupSourceData(t){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureByteArray("dataSource",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_fake_random_setup_source_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Bt=(e,t)=>{class _{constructor(t){this.name="Pkcs5Pbkdf2",this.ctxPtr=void 0===t?e._vscf_pkcs5_pbkdf2_new():t}static newAndUseCContext(t){return new _(e._vscf_pkcs5_pbkdf2_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs5_pbkdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hmac(_){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureImplementInterface("hmac",_,"Foundation.Mac",t.FoundationInterfaceTag.MAC,t.FoundationInterface),e._vscf_pkcs5_pbkdf2_release_hmac(this.ctxPtr),e._vscf_pkcs5_pbkdf2_use_hmac(this.ctxPtr,_.ctxPtr)}algId(){let t;return se.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pkcs5_pbkdf2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return se.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbkdf2_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_pkcs5_pbkdf2_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureByteArray("data",t),se.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_pkcs5_pbkdf2_derive(this.ctxPtr,c,_,a);const t=e._vsc_buffer_bytes(a),r=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}reset(t,_){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureByteArray("salt",t),se.ensureNumber("iterationCount",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{e._vscf_pkcs5_pbkdf2_reset(this.ctxPtr,c,_)}finally{e._free(s),e._free(c)}}setInfo(t){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureByteArray("info",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_pkcs5_pbkdf2_set_info(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}setupDefaults(){se.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs5_pbkdf2_setup_defaults(this.ctxPtr)}}return _},Ut=(e,t)=>{class _{constructor(t){this.name="Pkcs5Pbes2",this.ctxPtr=void 0===t?e._vscf_pkcs5_pbes2_new():t}static newAndUseCContext(t){return new _(e._vscf_pkcs5_pbes2_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs5_pbes2_delete(this.ctxPtr),this.ctxPtr=null)}set kdf(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureImplementInterface("kdf",_,"Foundation.SaltedKdf",t.FoundationInterfaceTag.SALTED_KDF,t.FoundationInterface),e._vscf_pkcs5_pbes2_release_kdf(this.ctxPtr),e._vscf_pkcs5_pbes2_use_kdf(this.ctxPtr,_.ctxPtr)}set cipher(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureImplementInterface("cipher",_,"Foundation.Cipher",t.FoundationInterfaceTag.CIPHER,t.FoundationInterface),e._vscf_pkcs5_pbes2_release_cipher(this.ctxPtr),e._vscf_pkcs5_pbes2_use_cipher(this.ctxPtr,_.ctxPtr)}algId(){let t;return ne.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pkcs5_pbes2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ne.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbes2_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_pkcs5_pbes2_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.encryptedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_pkcs5_pbes2_encrypt(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}encryptedLen(t){let _;return ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=this.decryptedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_pkcs5_pbes2_decrypt(this.ctxPtr,c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}decryptedLen(t){let _;return ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_decrypted_len(this.ctxPtr,t),_}reset(t){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureByteArray("pwd",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_pkcs5_pbes2_reset(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Dt=(e,t)=>{class _{constructor(t){this.name="SeedEntropySource",this.ctxPtr=void 0===t?e._vscf_seed_entropy_source_new():t}static newAndUseCContext(t){return new _(e._vscf_seed_entropy_source_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_seed_entropy_source_delete(this.ctxPtr),this.ctxPtr=null)}isStrong(){let t;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_seed_entropy_source_is_strong(this.ctxPtr),!!t}gather(_){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureNumber("len",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_seed_entropy_source_gather(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}resetSeed(t){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureByteArray("seed",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_seed_entropy_source_reset_seed(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Yt=(e,t)=>{class _{static get KEY_MATERIAL_LEN_MIN(){return 32}get KEY_MATERIAL_LEN_MIN(){return _.KEY_MATERIAL_LEN_MIN}static get KEY_MATERIAL_LEN_MAX(){return 512}get KEY_MATERIAL_LEN_MAX(){return _.KEY_MATERIAL_LEN_MAX}constructor(t){this.name="KeyMaterialRng",this.ctxPtr=void 0===t?e._vscf_key_material_rng_new():t}static newAndUseCContext(t){return new _(e._vscf_key_material_rng_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_material_rng_delete(this.ctxPtr),this.ctxPtr=null)}random(_){ie.ensureNotNull("this.ctxPtr",this.ctxPtr),ie.ensureNumber("dataLen",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_material_rng_random(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}reseed(){ie.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_material_rng_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}resetKeyMaterial(t){ie.ensureNotNull("this.ctxPtr",this.ctxPtr),ie.ensureByteArray("keyMaterial",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_key_material_rng_reset_key_material(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Mt=(e,t)=>{class _{constructor(t){this.name="RawPublicKey",this.ctxPtr=void 0===t?e._vscf_raw_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_raw_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_raw_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return ae.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_len(this.ctxPtr),t}bitlen(){let t;return ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_is_valid(this.ctxPtr),!!t}data(){ae.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_raw_public_key_data(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},Ht=(e,t)=>{class _{constructor(t){this.name="RawPrivateKey",this.ctxPtr=void 0===t?e._vscf_raw_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_raw_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_raw_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_len(this.ctxPtr),t}bitlen(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}data(){oe.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_raw_private_key_data(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}hasPublicKey(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_has_public_key(this.ctxPtr),!!t}setPublicKey(_){oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.ensureClass("rawPublicKey",_,t.RawPublicKey),e._vscf_raw_private_key_set_public_key(this.ctxPtr,_.ctxPtr)}getPublicKey(){let _;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_get_public_key(this.ctxPtr),t.RawPublicKey.newAndUseCContext(_)}}return _},Ot=(e,t)=>{class _{constructor(t){this.name="Pkcs8Serializer",this.ctxPtr=void 0===t?e._vscf_pkcs8_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_pkcs8_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs8_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_pkcs8_serializer_release_asn1_writer(this.ctxPtr),e._vscf_pkcs8_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let r;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_pkcs8_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("publicKey",_,t.RawPublicKey);const r=this.serializedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_pkcs8_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}serializedPrivateKeyLen(_){let r;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_pkcs8_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("privateKey",_,t.RawPrivateKey);const r=this.serializedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_pkcs8_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){le.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs8_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("publicKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_pkcs8_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}serializePrivateKeyInplace(_){le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("privateKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_pkcs8_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}}return _},Gt=(e,t)=>{class _{constructor(t){this.name="Sec1Serializer",this.ctxPtr=void 0===t?e._vscf_sec1_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_sec1_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sec1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_sec1_serializer_release_asn1_writer(this.ctxPtr),e._vscf_sec1_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let r;return fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_sec1_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("publicKey",_,t.RawPublicKey);const r=this.serializedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_sec1_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}serializedPrivateKeyLen(_){let r;return fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_sec1_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("privateKey",_,t.RawPrivateKey);const r=this.serializedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_sec1_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sec1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("publicKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_sec1_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}serializePrivateKeyInplace(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("privateKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_sec1_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}}return _},Vt=(e,t)=>{class _{constructor(t){this.name="KeyAsn1Serializer",this.ctxPtr=void 0===t?e._vscf_key_asn1_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_key_asn1_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_asn1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_key_asn1_serializer_release_asn1_writer(this.ctxPtr),e._vscf_key_asn1_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let r;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_key_asn1_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("publicKey",_,t.RawPublicKey);const r=this.serializedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_asn1_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}serializedPrivateKeyLen(_){let r;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_key_asn1_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("privateKey",_,t.RawPrivateKey);const r=this.serializedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_asn1_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("publicKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_key_asn1_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}serializePrivateKeyInplace(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("privateKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_key_asn1_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}}return _},jt=(e,t)=>{class _{constructor(t){this.name="KeyAsn1Deserializer",this.ctxPtr=void 0===t?e._vscf_key_asn1_deserializer_new():t}static newAndUseCContext(t){return new _(e._vscf_key_asn1_deserializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_asn1_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",t.FoundationInterfaceTag.ASN1_READER,t.FoundationInterface),e._vscf_key_asn1_deserializer_release_asn1_reader(this.ctxPtr),e._vscf_key_asn1_deserializer_use_asn1_reader(this.ctxPtr,_.ctxPtr)}deserializePublicKey(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureByteArray("publicKeyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_key_asn1_deserializer_deserialize_public_key(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),t.RawPublicKey.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(a)}}deserializePrivateKey(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureByteArray("privateKeyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_key_asn1_deserializer_deserialize_private_key(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),t.RawPrivateKey.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(a)}}setupDefaults(){de.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_deserializer_setup_defaults(this.ctxPtr)}deserializePublicKeyInplace(){de.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_key_asn1_deserializer_deserialize_public_key_inplace(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.RawPublicKey.newAndTakeCContext(s)}finally{e._free(r)}}deserializePrivateKeyInplace(){de.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_key_asn1_deserializer_deserialize_private_key_inplace(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.RawPrivateKey.newAndTakeCContext(s)}finally{e._free(r)}}}return _},qt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Ed25519",this.ctxPtr=void 0===t?e._vscf_ed25519_new():t}static newAndUseCContext(t){return new _(e._vscf_ed25519_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ed25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_ed25519_release_random(this.ctxPtr),e._vscf_ed25519_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureClass("ecies",_,t.Ecies),e._vscf_ed25519_release_ecies(this.ctxPtr),e._vscf_ed25519_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureByteArray("keyData",_),he.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_ed25519_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ed25519_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureByteArray("keyData",_),he.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_ed25519_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ed25519_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_ed25519_encrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_ed25519_decrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canSign(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureNumber("hashId",r),he.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_ed25519_sign_hash(this.ctxPtr,_.ctxPtr,r,a,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canVerify(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureNumber("hashId",r),he.ensureByteArray("digest",s),he.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(s,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);let h;e._vsc_data(d,f,l);try{return h=e._vscf_ed25519_verify_hash(this.ctxPtr,_.ctxPtr,r,o,d),!!h}finally{e._free(i),e._free(o),e._free(f),e._free(d)}}computeSharedKey(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=this.sharedKeyLen(r),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_ed25519_compute_shared_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),i=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+i)}finally{e._vsc_buffer_delete(n)}}sharedKeyLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ed25519_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ed25519_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_ed25519_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),i=e._vsc_buffer_len(s),a=e.HEAPU8.slice(n,n+i),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureByteArray("encapsulatedKey",_),he.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_ed25519_kem_decapsulate(this.ctxPtr,i,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}setupDefaults(){he.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ed25519_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){he.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_ed25519_generate_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},Xt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Curve25519",this.ctxPtr=void 0===t?e._vscf_curve25519_new():t}static newAndUseCContext(t){return new _(e._vscf_curve25519_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_curve25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_curve25519_release_random(this.ctxPtr),e._vscf_curve25519_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureClass("ecies",_,t.Ecies),e._vscf_curve25519_release_ecies(this.ctxPtr),e._vscf_curve25519_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureByteArray("keyData",_),ve.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_curve25519_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_curve25519_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_curve25519_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureByteArray("keyData",_),ve.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_curve25519_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_curve25519_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_curve25519_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ve.ensureNumber("dataLen",r),s=e._vscf_curve25519_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ve.ensureNumber("dataLen",r),s=e._vscf_curve25519_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ve.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_curve25519_encrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ve.ensureNumber("dataLen",r),s=e._vscf_curve25519_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ve.ensureNumber("dataLen",r),s=e._vscf_curve25519_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ve.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_curve25519_decrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}computeSharedKey(_,r){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ve.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=this.sharedKeyLen(r),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_curve25519_compute_shared_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),i=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+i)}finally{e._vsc_buffer_delete(n)}}sharedKeyLen(_){let r;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_curve25519_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_curve25519_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_curve25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_curve25519_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),i=e._vsc_buffer_len(s),a=e.HEAPU8.slice(n,n+i),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureByteArray("encapsulatedKey",_),ve.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_curve25519_kem_decapsulate(this.ctxPtr,i,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}setupDefaults(){ve.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_curve25519_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){ve.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_curve25519_generate_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},Wt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Falcon",this.ctxPtr=void 0===t?e._vscf_falcon_new():t}static newAndUseCContext(t){return new _(e._vscf_falcon_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_falcon_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_falcon_release_random(this.ctxPtr),e._vscf_falcon_use_random(this.ctxPtr,_.ctxPtr)}algId(){let t;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_falcon_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_falcon_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_falcon_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}generateEphemeralKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureByteArray("keyData",_),pe.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_falcon_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_falcon_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_falcon_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureByteArray("keyData",_),pe.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_falcon_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_falcon_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canSign(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),pe.ensureNumber("hashId",r),pe.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_falcon_sign_hash(this.ctxPtr,_.ctxPtr,r,a,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canVerify(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_falcon_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),pe.ensureNumber("hashId",r),pe.ensureByteArray("digest",s),pe.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(s,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);let h;e._vsc_data(d,f,l);try{return h=e._vscf_falcon_verify_hash(this.ctxPtr,_.ctxPtr,r,o,d),!!h}finally{e._free(i),e._free(o),e._free(f),e._free(d)}}setupDefaults(){pe.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_falcon_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){pe.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_falcon_generate_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},Zt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Round5",this.ctxPtr=void 0===t?e._vscf_round5_new():t}static newAndUseCContext(t){return new _(e._vscf_round5_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_round5_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_round5_release_random(this.ctxPtr),e._vscf_round5_use_random(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureByteArray("keyData",_),ye.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_round5_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_round5_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_round5_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureByteArray("keyData",_),ye.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_round5_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_round5_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_round5_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}kemSharedKeyLen(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_round5_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_round5_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_round5_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),i=e._vsc_buffer_len(s),a=e.HEAPU8.slice(n,n+i),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureByteArray("encapsulatedKey",_),ye.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_round5_kem_decapsulate(this.ctxPtr,i,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}setupDefaults(){ye.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_round5_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureNumber("algId",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_generate_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _},$t=(e,t)=>{class _{constructor(t){this.name="CompoundKeyAlgInfo",this.ctxPtr=void 0===t?e._vscf_compound_key_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_key_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_key_alg_info_alg_id(this.ctxPtr),t}cipherAlgInfo(){let _;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_info_cipher_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerAlgInfo(){let _;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_info_signer_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},Jt=(e,t)=>{class _{constructor(t){this.name="CompoundPublicKey",this.ctxPtr=void 0===t?e._vscf_compound_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_len(this.ctxPtr),t}bitlen(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_is_valid(this.ctxPtr),!!t}cipherKey(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_cipher_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_signer_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},Qt=(e,t)=>{class _{constructor(t){this.name="CompoundPrivateKey",this.ctxPtr=void 0===t?e._vscf_compound_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_len(this.ctxPtr),t}bitlen(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}cipherKey(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_cipher_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_signer_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},e_=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="CompoundKeyAlg",this.ctxPtr=void 0===t?e._vscf_compound_key_alg_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_key_alg_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_compound_key_alg_release_random(this.ctxPtr),e._vscf_compound_key_alg_use_random(this.ctxPtr,_.ctxPtr)}algId(){let t;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_key_alg_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_compound_key_alg_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}generateEphemeralKey(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureByteArray("keyData",_),me.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_compound_key_alg_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_compound_key_alg_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureByteArray("keyData",_),me.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_compound_key_alg_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_compound_key_alg_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),me.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),me.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),me.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_compound_key_alg_encrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),me.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),me.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),me.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_compound_key_alg_decrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canSign(_){let r;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),me.ensureNumber("hashId",r),me.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_compound_key_alg_sign_hash(this.ctxPtr,_.ctxPtr,r,a,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canVerify(_){let r;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),me.ensureNumber("hashId",r),me.ensureByteArray("digest",s),me.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(s,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);let h;e._vsc_data(d,f,l);try{return h=e._vscf_compound_key_alg_verify_hash(this.ctxPtr,_.ctxPtr,r,o,d),!!h}finally{e._free(i),e._free(o),e._free(f),e._free(d)}}setupDefaults(){me.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_compound_key_alg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}makeKey(_,r){me.ensureNotNull("this.ctxPtr",this.ctxPtr),me.ensureImplementInterface("cipherKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),me.ensureImplementInterface("signerKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_compound_key_alg_make_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}}return _},t_=(e,t)=>{class _{constructor(t){this.name="HybridKeyAlgInfo",this.ctxPtr=void 0===t?e._vscf_hybrid_key_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_key_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_key_alg_info_alg_id(this.ctxPtr),t}firstKeyAlgInfo(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_first_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKeyAlgInfo(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_second_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},__=(e,t)=>{class _{constructor(t){this.name="HybridPublicKey",this.ctxPtr=void 0===t?e._vscf_hybrid_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_len(this.ctxPtr),t}bitlen(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_is_valid(this.ctxPtr),!!t}firstKey(){let _;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_first_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_second_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},r_=(e,t)=>{class _{constructor(t){this.name="HybridPrivateKey",this.ctxPtr=void 0===t?e._vscf_hybrid_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_len(this.ctxPtr),t}bitlen(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}firstKey(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_first_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_second_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},s_=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="HybridKeyAlg",this.ctxPtr=void 0===t?e._vscf_hybrid_key_alg_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_key_alg_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_hybrid_key_alg_release_random(this.ctxPtr),e._vscf_hybrid_key_alg_use_random(this.ctxPtr,_.ctxPtr)}set cipher(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("cipher",_,"Foundation.CipherAuth",t.FoundationInterfaceTag.CIPHER_AUTH,t.FoundationInterface),e._vscf_hybrid_key_alg_release_cipher(this.ctxPtr),e._vscf_hybrid_key_alg_use_cipher(this.ctxPtr,_.ctxPtr)}set hash(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_hybrid_key_alg_release_hash(this.ctxPtr),e._vscf_hybrid_key_alg_use_hash(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureByteArray("keyData",_),ke.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_hybrid_key_alg_import_public_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPublicKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_hybrid_key_alg_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureByteArray("keyData",_),ke.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=e._vscf_error_ctx_size(),o=e._malloc(a);let l;e._vscf_error_reset(o);try{l=e._vscf_hybrid_key_alg_import_private_key_data(this.ctxPtr,i,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportPrivateKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_hybrid_key_alg_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_hybrid_key_alg_encrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{const r=e._vscf_hybrid_key_alg_decrypt(this.ctxPtr,_.ctxPtr,i,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}canSign(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureNumber("hashId",r),ke.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const i=e._vsc_data_ctx_size(),a=e._malloc(i);e._vsc_data(a,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_hybrid_key_alg_sign_hash(this.ctxPtr,_.ctxPtr,r,a,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canVerify(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureNumber("hashId",r),ke.ensureByteArray("digest",s),ke.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(s,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const u=e._vsc_data_ctx_size(),d=e._malloc(u);let h;e._vsc_data(d,f,l);try{return h=e._vscf_hybrid_key_alg_verify_hash(this.ctxPtr,_.ctxPtr,r,o,d),!!h}finally{e._free(i),e._free(o),e._free(f),e._free(d)}}setupDefaults(){ke.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_hybrid_key_alg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}makeKey(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("firstKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureImplementInterface("secondKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_hybrid_key_alg_make_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}}return _},n_=(e,t)=>{class _{constructor(t){this.name="SimpleAlgInfo",this.ctxPtr=void 0===t?e._vscf_simple_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_simple_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_simple_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithAlgId(t){let r;return Ie.ensureNumber("algId",t),r=e._vscf_simple_alg_info_new_with_alg_id(t),_.newAndTakeCContext(r)}algId(){let t;return Ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_simple_alg_info_alg_id(this.ctxPtr),t}}return _},c_=(e,t)=>{class _{constructor(t){this.name="HashBasedAlgInfo",this.ctxPtr=void 0===t?e._vscf_hash_based_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_hash_based_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hash_based_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hash_based_alg_info_alg_id(this.ctxPtr),t}hashAlgInfo(){let _;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hash_based_alg_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},i_=(e,t)=>{class _{constructor(t){this.name="CipherAlgInfo",this.ctxPtr=void 0===t?e._vscf_cipher_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_cipher_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_cipher_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithMembers(t,r){Ae.ensureNumber("algId",t),Ae.ensureByteArray("nonce",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);let a;e._vsc_data(i,n,s);try{return a=e._vscf_cipher_alg_info_new_with_members(t,i),_.newAndTakeCContext(a)}finally{e._free(n),e._free(i)}}algId(){let t;return Ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_cipher_alg_info_alg_id(this.ctxPtr),t}nonce(){Ae.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_cipher_alg_info_nonce(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},a_=(e,t)=>{class _{constructor(t){this.name="SaltedKdfAlgInfo",this.ctxPtr=void 0===t?e._vscf_salted_kdf_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_salted_kdf_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_salted_kdf_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_salted_kdf_alg_info_alg_id(this.ctxPtr),t}hashAlgInfo(){let _;return Ce.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_salted_kdf_alg_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}salt(){Ce.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_salted_kdf_alg_info_salt(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}iterationCount(){let t;return Ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_salted_kdf_alg_info_iteration_count(this.ctxPtr),t}}return _},o_=(e,t)=>{class _{constructor(t){this.name="PbeAlgInfo",this.ctxPtr=void 0===t?e._vscf_pbe_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_pbe_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pbe_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Te.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pbe_alg_info_alg_id(this.ctxPtr),t}kdfAlgInfo(){let _;return Te.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_kdf_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}cipherAlgInfo(){let _;return Te.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_cipher_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},l_=(e,t)=>{class _{constructor(t){this.name="EccAlgInfo",this.ctxPtr=void 0===t?e._vscf_ecc_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithMembers(t,r,s){let n;return Fe.ensureNumber("algId",t),Fe.ensureNumber("keyId",r),Fe.ensureNumber("domainId",s),n=e._vscf_ecc_alg_info_new_with_members(t,r,s),_.newAndTakeCContext(n)}algId(){let t;return Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_alg_id(this.ctxPtr),t}keyId(){let t;return Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_key_id(this.ctxPtr),t}domainId(){let t;return Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_domain_id(this.ctxPtr),t}}return _},f_=(e,t)=>{class _{constructor(t){this.name="AlgInfoDerSerializer",this.ctxPtr=void 0===t?e._vscf_alg_info_der_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_alg_info_der_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_alg_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_alg_info_der_serializer_release_asn1_writer(this.ctxPtr),e._vscf_alg_info_der_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedLen(_){let r;return Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),r}serialize(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=this.serializedLen(_),s=e._vsc_buffer_new_with_capacity(r);try{e._vscf_alg_info_der_serializer_serialize(this.ctxPtr,_.ctxPtr,s);const t=e._vsc_buffer_bytes(s),r=e._vsc_buffer_len(s);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_serializer_setup_defaults(this.ctxPtr)}serializeInplace(_){let r;return Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_info_der_serializer_serialize_inplace(this.ctxPtr,_.ctxPtr),r}}return _},u_=(e,t)=>{class _{constructor(t){this.name="AlgInfoDerDeserializer",this.ctxPtr=void 0===t?e._vscf_alg_info_der_deserializer_new():t}static newAndUseCContext(t){return new _(e._vscf_alg_info_der_deserializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_alg_info_der_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",t.FoundationInterfaceTag.ASN1_READER,t.FoundationInterface),e._vscf_alg_info_der_deserializer_release_asn1_reader(this.ctxPtr),e._vscf_alg_info_der_deserializer_use_asn1_reader(this.ctxPtr,_.ctxPtr)}deserialize(_){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_alg_info_der_deserializer_deserialize(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(a)}}setupDefaults(){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_deserializer_setup_defaults(this.ctxPtr)}deserializeInplace(){Se.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_alg_info_der_deserializer_deserialize_inplace(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},d_=(e,t)=>{class _{static get PREFIX_LEN(){return 32}get PREFIX_LEN(){return _.PREFIX_LEN}constructor(t){this.name="MessageInfoDerSerializer",this.ctxPtr=void 0===t?e._vscf_message_info_der_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_der_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",t.FoundationInterfaceTag.ASN1_READER,t.FoundationInterface),e._vscf_message_info_der_serializer_release_asn1_reader(this.ctxPtr),e._vscf_message_info_der_serializer_use_asn1_reader(this.ctxPtr,_.ctxPtr)}set asn1Writer(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_message_info_der_serializer_release_asn1_writer(this.ctxPtr),e._vscf_message_info_der_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedLen(_){let r;return Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureClass("messageInfo",_,t.MessageInfo),r=e._vscf_message_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),r}serialize(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureClass("messageInfo",_,t.MessageInfo);const r=this.serializedLen(_),s=e._vsc_buffer_new_with_capacity(r);try{e._vscf_message_info_der_serializer_serialize(this.ctxPtr,_.ctxPtr,s);const t=e._vsc_buffer_bytes(s),r=e._vsc_buffer_len(s);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(s)}}readPrefix(t){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_message_info_der_serializer_read_prefix(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}deserialize(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_message_info_der_serializer_deserialize(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),t.MessageInfo.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(a)}}serializedFooterLen(_){let r;return Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureClass("messageInfoFooter",_,t.MessageInfoFooter),r=e._vscf_message_info_der_serializer_serialized_footer_len(this.ctxPtr,_.ctxPtr),r}serializeFooter(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureClass("messageInfoFooter",_,t.MessageInfoFooter);const r=this.serializedFooterLen(_),s=e._vsc_buffer_new_with_capacity(r);try{e._vscf_message_info_der_serializer_serialize_footer(this.ctxPtr,_.ctxPtr,s);const t=e._vsc_buffer_bytes(s),r=e._vsc_buffer_len(s);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(s)}}deserializeFooter(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_message_info_der_serializer_deserialize_footer(this.ctxPtr,c,a);const _=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(_),t.MessageInfoFooter.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(a)}}setupDefaults(){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_der_serializer_setup_defaults(this.ctxPtr)}}return _},h_=(e,t)=>{class _{constructor(t){this.name="RandomPadding",this.ctxPtr=void 0===t?e._vscf_random_padding_new():t}static newAndUseCContext(t){return new _(e._vscf_random_padding_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_random_padding_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_random_padding_release_random(this.ctxPtr),e._vscf_random_padding_use_random(this.ctxPtr,_.ctxPtr)}algId(){let t;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_random_padding_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_random_padding_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}configure(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureClass("params",_,t.PaddingParams),e._vscf_random_padding_configure(this.ctxPtr,_.ctxPtr)}paddedDataLen(t){let _;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureNumber("dataLen",t),_=e._vscf_random_padding_padded_data_len(this.ctxPtr,t),_}len(){let t;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_len(this.ctxPtr),t}lenMax(){let t;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_len_max(this.ctxPtr),t}startDataProcessing(){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_data_processing(this.ctxPtr)}processData(t){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=e._vsc_data_ctx_size(),i=e._malloc(c);try{e._vscf_random_padding_process_data(i,this.ctxPtr,n);const t=e._vsc_data_len(i),_=e._vsc_data_bytes(i);return e.HEAPU8.slice(_,_+t)}finally{e._free(r),e._free(n),e._free(i)}}finishDataProcessing(){Re.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.len(),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_random_padding_finish_data_processing(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}startPaddedDataProcessing(){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_padded_data_processing(this.ctxPtr)}processPaddedData(t){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=_,i=e._vsc_buffer_new_with_capacity(c);try{e._vscf_random_padding_process_padded_data(this.ctxPtr,n,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(i)}}finishPaddedDataProcessingOutLen(){let t;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_finish_padded_data_processing_out_len(this.ctxPtr),t}finishPaddedDataProcessing(){Re.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.finishPaddedDataProcessingOutLen(),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_random_padding_finish_padded_data_processing(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}}return _};var v_=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((e=>new Promise(((t,_)=>{ze(e).then((e=>{const _={};_.FoundationInterfaceTag=Be(),_.FoundationInterface=Ue(e,_),_.FoundationImplTag=De(),_.FoundationError=Ye(),_.Asn1Tag=Me(),_.AlgId=He(),_.OidId=Oe(),_.GroupMsgType=Ge(),_.CipherState=Ve(),_.Oid=((e,t)=>class{static fromAlgId(t){a.ensureNumber("algId",t);const _=e._vsc_data_ctx_size(),r=e._malloc(_);try{e._vscf_oid_from_alg_id(r,t);const _=e._vsc_data_len(r),s=e._vsc_data_bytes(r);return e.HEAPU8.slice(s,s+_)}finally{e._free(r)}}static toAlgId(t){a.ensureByteArray("oid",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_oid_to_alg_id(n),c}finally{e._free(r),e._free(n)}}static fromId(t){a.ensureNumber("oidId",t);const _=e._vsc_data_ctx_size(),r=e._malloc(_);try{e._vscf_oid_from_id(r,t);const _=e._vsc_data_len(r),s=e._vsc_data_bytes(r);return e.HEAPU8.slice(s,s+_)}finally{e._free(r)}}static toId(t){a.ensureByteArray("oid",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_oid_to_id(n),c}finally{e._free(r),e._free(n)}}static idToAlgId(t){let _;return a.ensureNumber("oidId",t),_=e._vscf_oid_id_to_alg_id(t),_}static equal(t,_){a.ensureByteArray("lhs",t),a.ensureByteArray("rhs",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=_.length*_.BYTES_PER_ELEMENT,o=e._malloc(i);e.HEAP8.set(_,o);const l=e._vsc_data_ctx_size(),f=e._malloc(l);let u;e._vsc_data(f,o,i);try{return u=e._vscf_oid_equal(c,f),!!u}finally{e._free(s),e._free(c),e._free(o),e._free(f)}}})(e),_.Base64=((e,t)=>class{static encodedLen(t){let _;return o.ensureNumber("dataLen",t),_=e._vscf_base64_encoded_len(t),_}static encode(_){o.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=t.Base64.encodedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_base64_encode(c,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}static decodedLen(t){let _;return o.ensureNumber("strLen",t),_=e._vscf_base64_decoded_len(t),_}static decode(_){o.ensureByteArray("str",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=t.Base64.decodedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_base64_decode(c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}})(e,_),_.Pem=((e,t)=>class{static wrappedLen(t,_){let r;return l.ensureNumber("title",t),l.ensureNumber("dataLen",_),r=e._vscf_pem_wrapped_len(t,_),r}static wrap(_,r){l.ensureNumber("title",_),l.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),i=e._malloc(c);e._vsc_data(i,n,s);const a=t.Pem.wrappedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(a);try{e._vscf_pem_wrap(_,i,o);const t=e._vsc_buffer_bytes(o),r=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}static unwrappedLen(t){let _;return l.ensureNumber("pemLen",t),_=e._vscf_pem_unwrapped_len(t),_}static unwrap(_){l.ensureByteArray("pem",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const i=t.Pem.unwrappedLen(_.length),a=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_pem_unwrap(c,a);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(a),s=e._vsc_buffer_len(a);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(a)}}static title(t){l.ensureByteArray("pem",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=e._vsc_data_ctx_size(),i=e._malloc(c);try{e._vscf_pem_title(i,n);const t=e._vsc_data_len(i),_=e._vsc_data_bytes(i);return e.HEAPU8.slice(_,_+t)}finally{e._free(r),e._free(n),e._free(i)}}})(e,_),_.MessageInfo=je(e,_),_.KeyRecipientInfo=qe(e,_),_.KeyRecipientInfoList=Xe(e,_),_.PasswordRecipientInfo=We(e,_),_.PasswordRecipientInfoList=Ze(e,_),_.AlgFactory=((e,t)=>class{static createHashFromInfo(_){let r;return p.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_hash_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createMacFromInfo(_){let r;return p.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_mac_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createKdfFromInfo(_){let r;return p.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_kdf_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createSaltedKdfFromInfo(_){let r;return p.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_salted_kdf_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createCipherFromInfo(_){let r;return p.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_cipher_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createPaddingFromInfo(_,r){let s;return p.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),p.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),s=e._vscf_alg_factory_create_padding_from_info(_.ctxPtr,r.ctxPtr),t.FoundationInterface.newAndTakeCContext(s)}})(e,_),_.KeyAlgFactory=((e,t)=>class{static createFromAlgId(_,r){y.ensureNumber("algId",_),y.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_alg_id(_,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}static createFromKey(_,r){y.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),y.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_key(_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}static createFromRawPublicKey(_,r){y.ensureClass("publicKey",_,t.RawPublicKey),y.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_raw_public_key(_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}static createFromRawPrivateKey(_,r){y.ensureClass("privateKey",_,t.RawPrivateKey),y.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_raw_private_key(_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}})(e,_),_.Ecies=$e(e,_),_.RecipientCipher=Je(e,_),_.MessageInfoCustomParams=Qe(e,_),_.KeyProvider=et(e,_),_.Signer=tt(e,_),_.Verifier=_t(e,_),_.BrainkeyClient=rt(e,_),_.BrainkeyServer=st(e,_),_.GroupSessionMessage=nt(e,_),_.GroupSessionTicket=ct(e,_),_.GroupSession=it(e,_),_.MessageInfoEditor=at(e,_),_.SignerInfo=ot(e,_),_.SignerInfoList=lt(e,_),_.MessageInfoFooter=ft(e,_),_.SignedDataInfo=ut(e,_),_.FooterInfo=dt(e,_),_.KeyInfo=ht(e,_),_.PaddingParams=vt(e),_.Sha224=pt(e,_),_.Sha256=yt(e,_),_.Sha384=Pt(e,_),_.Sha512=xt(e,_),_.Aes256Gcm=gt(e,_),_.Aes256Cbc=mt(e,_),_.Asn1rd=Et(e,_),_.Asn1wr=wt(e,_),_.RsaPublicKey=bt(e,_),_.RsaPrivateKey=kt(e,_),_.Rsa=It(e,_),_.EccPublicKey=Nt(e,_),_.EccPrivateKey=At(e,_),_.Ecc=Ct(e,_),_.EntropyAccumulator=Tt(e,_),_.CtrDrbg=Ft(e,_),_.Hmac=Kt(e,_),_.Hkdf=St(e,_),_.Kdf1=Lt(e,_),_.Kdf2=Rt(e,_),_.FakeRandom=zt(e,_),_.Pkcs5Pbkdf2=Bt(e,_),_.Pkcs5Pbes2=Ut(e,_),_.SeedEntropySource=Dt(e,_),_.KeyMaterialRng=Yt(e,_),_.RawPublicKey=Mt(e,_),_.RawPrivateKey=Ht(e,_),_.Pkcs8Serializer=Ot(e,_),_.Sec1Serializer=Gt(e,_),_.KeyAsn1Serializer=Vt(e,_),_.KeyAsn1Deserializer=jt(e,_),_.Ed25519=qt(e,_),_.Curve25519=Xt(e,_),_.Falcon=Wt(e,_),_.Round5=Zt(e,_),_.CompoundKeyAlgInfo=$t(e,_),_.CompoundPublicKey=Jt(e,_),_.CompoundPrivateKey=Qt(e,_),_.CompoundKeyAlg=e_(e,_),_.HybridKeyAlgInfo=t_(e,_),_.HybridPublicKey=__(e,_),_.HybridPrivateKey=r_(e,_),_.HybridKeyAlg=s_(e,_),_.SimpleAlgInfo=n_(e),_.HashBasedAlgInfo=c_(e,_),_.CipherAlgInfo=i_(e),_.SaltedKdfAlgInfo=a_(e,_),_.PbeAlgInfo=o_(e,_),_.EccAlgInfo=l_(e),_.AlgInfoDerSerializer=f_(e,_),_.AlgInfoDerDeserializer=u_(e,_),_.MessageInfoDerSerializer=d_(e,_),_.RandomPadding=h_(e,_),t(_)})).catch((e=>{_(e)}))}))));function p_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y_={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,_="~";function r(){}function s(e,t,_){this.fn=e,this.context=t,this.once=_||!1}function n(e,t,r,n,c){if("function"!=typeof r)throw new TypeError("The listener must be a function");var i=new s(r,n||e,c),a=_?_+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],i]:e._events[a].push(i):(e._events[a]=i,e._eventsCount++),e}function c(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function i(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(_=!1)),i.prototype.eventNames=function(){var e,r,s=[];if(0===this._eventsCount)return s;for(r in e=this._events)t.call(e,r)&&s.push(_?r.slice(1):r);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(e)):s},i.prototype.listeners=function(e){var t=_?_+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var s=0,n=r.length,c=new Array(n);s<n;s++)c[s]=r[s].fn;return c},i.prototype.listenerCount=function(e){var t=_?_+e:e,r=this._events[t];return r?r.fn?1:r.length:0},i.prototype.emit=function(e,t,r,s,n,c){var i=_?_+e:e;if(!this._events[i])return!1;var a,o,l=this._events[i],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,s),!0;case 5:return l.fn.call(l.context,t,r,s,n),!0;case 6:return l.fn.call(l.context,t,r,s,n,c),!0}for(o=1,a=new Array(f-1);o<f;o++)a[o-1]=arguments[o];l.fn.apply(l.context,a)}else{var u,d=l.length;for(o=0;o<d;o++)switch(l[o].once&&this.removeListener(e,l[o].fn,void 0,!0),f){case 1:l[o].fn.call(l[o].context);break;case 2:l[o].fn.call(l[o].context,t);break;case 3:l[o].fn.call(l[o].context,t,r);break;case 4:l[o].fn.call(l[o].context,t,r,s);break;default:if(!a)for(u=1,a=new Array(f-1);u<f;u++)a[u-1]=arguments[u];l[o].fn.apply(l[o].context,a)}}return!0},i.prototype.on=function(e,t,_){return n(this,e,t,_,!1)},i.prototype.once=function(e,t,_){return n(this,e,t,_,!0)},i.prototype.removeListener=function(e,t,r,s){var n=_?_+e:e;if(!this._events[n])return this;if(!t)return c(this,n),this;var i=this._events[n];if(i.fn)i.fn!==t||s&&!i.once||r&&i.context!==r||c(this,n);else{for(var a=0,o=[],l=i.length;a<l;a++)(i[a].fn!==t||s&&!i[a].once||r&&i[a].context!==r)&&o.push(i[a]);o.length?this._events[n]=1===o.length?o[0]:o:c(this,n)}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=_?_+e:e,this._events[t]&&c(this,t)):(this._events=new r,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=_,i.EventEmitter=i,e.exports=i}(y_);var P_,x_=p_(y_.exports);class g_ extends Error{constructor(){super("Module already exists."),Object.setPrototypeOf(this,g_.prototype),this.name="ModuleAlreadyExistsError"}}class m_ extends Error{constructor(){super("Module not found."),Object.setPrototypeOf(this,m_.prototype),this.name="ModuleNotFoundError"}}!function(e){e.load="load",e.remove="remove",e.error="error"}(P_||(P_={}));let E_,w_;const b_=()=>{if(!E_||!w_)throw new Error("Cannot use global instances if the 'resetGlobalInstances' function has been called or 'createGlobalInstances' function has not been called yet.")},k_=()=>(b_(),E_),I_=()=>(b_(),w_),N_=()=>{(E_||w_)&&(b_(),E_.delete(),w_.delete(),E_=void 0,w_=void 0)},A_=new class extends x_{constructor(){super(...arguments),this.initFns=new Map,this.initPromises=new Map,this.modules=new Map,this.addModule=(e,t)=>{if(this.initFns.has(e)){const _=new g_;throw this.emit(P_.error,_,e,t),_}this.loadModulesPromise=void 0,this.initFns.set(e,t)},this.getModule=e=>{if(!this.modules.has(e)){const t=new m_;throw this.emit(P_.error,t,e),t}return this.modules.get(e)},this.hasModule=e=>this.modules.has(e),this.setModule=(e,t)=>{this.modules.set(e,t),this.emit(P_.load,e,t)},this.removeModule=e=>{if(this.initFns.delete(e),this.initPromises.delete(e),this.modules.has(e)){const t=this.modules.get(e);this.modules.delete(e),this.emit(P_.remove,e,t)}},this.loadModule=(e,...t)=>{if(!this.initFns.has(e)){const _=new m_;throw this.emit(P_.error,_,e,...t),_}if(this.initPromises.has(e))return this.initPromises.get(e);const _=this.initFns.get(e)(...t).then((_=>(this.modules.set(e,_),this.emit(P_.load,e,_,...t),Promise.resolve())));return this.initPromises.set(e,_),_},this.loadModules=e=>{if(this.loadModulesPromise)return this.loadModulesPromise;const t=e||{},_=Array.from(this.initFns.keys()).map((e=>t[e]?this.loadModule(e,...t[e]):this.loadModule(e)));return this.loadModulesPromise=Promise.all(_).then((()=>Promise.resolve())),this.loadModulesPromise}}},C_="foundation";A_.addModule(C_,v_),A_.on("load",((e,t)=>{e===C_&&(N_(),(e=>{E_=new e.CtrDrbg;try{E_.setupDefaults()}catch(e){throw E_.delete(),e}w_=new e.KeyProvider,w_.random=E_;try{w_.setupDefaults()}catch(e){throw E_.delete(),w_.delete(),e}})(t))})),A_.on("remove",(e=>{e===C_&&N_()}));const T_=()=>A_.hasModule(C_),F_=()=>A_.getModule(C_),K_=e=>{A_.setModule(C_,e)},S_=A_.loadModules;var L_,R_;!function(e){e.SHA224="SHA224",e.SHA256="SHA256",e.SHA384="SHA384",e.SHA512="SHA512"}(L_||(L_={})),function(e){e.DEFAULT="DEFAULT",e.ED25519="ED25519",e.CURVE25519="CURVE25519",e.SECP256R1="SECP256R1",e.RSA_2048="RSA_2048",e.RSA_3072="RSA_3072",e.RSA_4096="RSA_4096",e.RSA_8192="RSA_8192",e.CURVE25519_ROUND5_ED25519_FALCON="CURVE25519_ROUND5_ED25519_FALCON",e.CURVE25519_ED25519="CURVE25519_ED25519"}(R_||(R_={}));const z_=e=>{const{AlgId:t}=A_.getModule("foundation");switch(e){case R_.DEFAULT:return{type:R_.DEFAULT,algId:t.ED25519};case R_.ED25519:return{type:R_.ED25519,algId:t.ED25519};case R_.CURVE25519:return{type:R_.CURVE25519,algId:t.CURVE25519};case R_.SECP256R1:return{type:R_.SECP256R1,algId:t.SECP256R1};case R_.RSA_2048:return{type:R_.RSA_2048,algId:t.RSA,bitlen:2048};case R_.RSA_3072:return{type:R_.RSA_3072,algId:t.RSA,bitlen:3072};case R_.RSA_4096:return{type:R_.RSA_4096,algId:t.RSA,bitlen:4096};case R_.RSA_8192:return{type:R_.RSA_8192,algId:t.RSA,bitlen:8192};case R_.CURVE25519_ROUND5_ED25519_FALCON:return{type:R_.CURVE25519_ROUND5_ED25519_FALCON,cipherAlgIds:[t.CURVE25519,t.ROUND5_ND_1CCA_5D],signerAlgIds:[t.ED25519,t.FALCON]};case R_.CURVE25519_ED25519:return{type:R_.CURVE25519_ED25519,cipherAlgIds:[t.CURVE25519,t.NONE],signerAlgIds:[t.ED25519,t.NONE]};default:throw new TypeError(`Unknown key pair type '${e}'.`)}};for(var B_=function(e){var t=V_(e),_=t[0],r=t[1];return 3*(_+r)/4-r},U_=function(e){var t,_,r=V_(e),s=r[0],n=r[1],c=new H_(function(e,t,_){return 3*(t+_)/4-_}(0,s,n)),i=0,a=n>0?s-4:s;for(_=0;_<a;_+=4)t=M_[e.charCodeAt(_)]<<18|M_[e.charCodeAt(_+1)]<<12|M_[e.charCodeAt(_+2)]<<6|M_[e.charCodeAt(_+3)],c[i++]=t>>16&255,c[i++]=t>>8&255,c[i++]=255&t;2===n&&(t=M_[e.charCodeAt(_)]<<2|M_[e.charCodeAt(_+1)]>>4,c[i++]=255&t);1===n&&(t=M_[e.charCodeAt(_)]<<10|M_[e.charCodeAt(_+1)]<<4|M_[e.charCodeAt(_+2)]>>2,c[i++]=t>>8&255,c[i++]=255&t);return c},D_=function(e){for(var t,_=e.length,r=_%3,s=[],n=16383,c=0,i=_-r;c<i;c+=n)s.push(j_(e,c,c+n>i?i:c+n));1===r?(t=e[_-1],s.push(Y_[t>>2]+Y_[t<<4&63]+"==")):2===r&&(t=(e[_-2]<<8)+e[_-1],s.push(Y_[t>>10]+Y_[t>>4&63]+Y_[t<<2&63]+"="));return s.join("")},Y_=[],M_=[],H_="undefined"!=typeof Uint8Array?Uint8Array:Array,O_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",G_=0;G_<64;++G_)Y_[G_]=O_[G_],M_[O_.charCodeAt(G_)]=G_;function V_(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=e.indexOf("=");return-1===_&&(_=t),[_,_===t?0:4-_%4]}function j_(e,t,_){for(var r,s,n=[],c=t;c<_;c+=3)r=(e[c]<<16&16711680)+(e[c+1]<<8&65280)+(255&e[c+2]),n.push(Y_[(s=r)>>18&63]+Y_[s>>12&63]+Y_[s>>6&63]+Y_[63&s]);return n.join("")}M_["-".charCodeAt(0)]=62,M_["_".charCodeAt(0)]=63;var q_,X_,W_={byteLength:B_,toByteArray:U_,fromByteArray:D_},Z_=function(e,t,_,r,s){var n,c,i=8*s-r-1,a=(1<<i)-1,o=a>>1,l=-7,f=_?s-1:0,u=_?-1:1,d=e[t+f];for(f+=u,n=d&(1<<-l)-1,d>>=-l,l+=i;l>0;n=256*n+e[t+f],f+=u,l-=8);for(c=n&(1<<-l)-1,n>>=-l,l+=r;l>0;c=256*c+e[t+f],f+=u,l-=8);if(0===n)n=1-o;else{if(n===a)return c?NaN:1/0*(d?-1:1);c+=Math.pow(2,r),n-=o}return(d?-1:1)*c*Math.pow(2,n-r)},$_=function(e,t,_,r,s,n){var c,i,a,o=8*n-s-1,l=(1<<o)-1,f=l>>1,u=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:n-1,h=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,c=l):(c=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-c))<1&&(c--,a*=2),(t+=c+f>=1?u/a:u*Math.pow(2,1-f))*a>=2&&(c++,a/=2),c+f>=l?(i=0,c=l):c+f>=1?(i=(t*a-1)*Math.pow(2,s),c+=f):(i=t*Math.pow(2,f-1)*Math.pow(2,s),c=0));s>=8;e[_+d]=255&i,d+=h,i/=256,s-=8);for(c=c<<s|i,o+=s;o>0;e[_+d]=255&c,d+=h,c/=256,o-=8);e[_+d-h]|=128*v},J_=(q_=function(e,t){var _="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=n,t.SlowBuffer=function(e){return+e!=e&&(e=0),n.alloc(+e)},t.INSPECT_MAX_BYTES=50;var r=2147483647;function s(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,n.prototype),t}function n(e,t,_){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return a(e)}return c(e,t,_)}function c(e,t,_){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!n.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var _=0|u(e,t),r=s(_),c=r.write(e,t);return c!==_&&(r=r.slice(0,c)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return o(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return l(e,t,_);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return l(e,t,_);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return n.from(r,t,_);var c=function(e){if(n.isBuffer(e)){var t=0|f(e.length),_=s(t);return 0===_.length||e.copy(_,0,0,t),_}return void 0!==e.length?"number"!=typeof e.length||D(e.length)?s(0):o(e):"Buffer"===e.type&&Array.isArray(e.data)?o(e.data):void 0}(e);if(c)return c;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return n.from(e[Symbol.toPrimitive]("string"),t,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function i(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function a(e){return i(e),s(e<0?0:0|f(e))}function o(e){for(var t=e.length<0?0:0|f(e.length),_=s(t),r=0;r<t;r+=1)_[r]=255&e[r];return _}function l(e,t,_){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(_||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===_?new Uint8Array(e):void 0===_?new Uint8Array(e,t):new Uint8Array(e,t,_),Object.setPrototypeOf(r,n.prototype),r}function f(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function u(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var _=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===_)return 0;for(var s=!1;;)switch(t){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*_;case"hex":return _>>>1;case"base64":return z(e).length;default:if(s)return r?-1:R(e).length;t=(""+t).toLowerCase(),s=!0}}function d(e,t,_){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===_||_>this.length)&&(_=this.length),_<=0)return"";if((_>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,_);case"utf8":case"utf-8":return w(this,t,_);case"ascii":return k(this,t,_);case"latin1":case"binary":return I(this,t,_);case"base64":return E(this,t,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,_);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,_){var r=e[t];e[t]=e[_],e[_]=r}function v(e,t,_,r,s){if(0===e.length)return-1;if("string"==typeof _?(r=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),D(_=+_)&&(_=s?0:e.length-1),_<0&&(_=e.length+_),_>=e.length){if(s)return-1;_=e.length-1}else if(_<0){if(!s)return-1;_=0}if("string"==typeof t&&(t=n.from(t,r)),n.isBuffer(t))return 0===t.length?-1:p(e,t,_,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,_):Uint8Array.prototype.lastIndexOf.call(e,t,_):p(e,[t],_,r,s);throw new TypeError("val must be string, number or Buffer")}function p(e,t,_,r,s){var n,c=1,i=e.length,a=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;c=2,i/=2,a/=2,_/=2}function o(e,t){return 1===c?e[t]:e.readUInt16BE(t*c)}if(s){var l=-1;for(n=_;n<i;n++)if(o(e,n)===o(t,-1===l?0:n-l)){if(-1===l&&(l=n),n-l+1===a)return l*c}else-1!==l&&(n-=n-l),l=-1}else for(_+a>i&&(_=i-a),n=_;n>=0;n--){for(var f=!0,u=0;u<a;u++)if(o(e,n+u)!==o(t,u)){f=!1;break}if(f)return n}return-1}function y(e,t,_,r){_=Number(_)||0;var s=e.length-_;r?(r=Number(r))>s&&(r=s):r=s;var n=t.length;r>n/2&&(r=n/2);for(var c=0;c<r;++c){var i=parseInt(t.substr(2*c,2),16);if(D(i))return c;e[_+c]=i}return c}function P(e,t,_,r){return B(R(t,e.length-_),e,_,r)}function x(e,t,_,r){return B(function(e){for(var t=[],_=0;_<e.length;++_)t.push(255&e.charCodeAt(_));return t}(t),e,_,r)}function g(e,t,_,r){return B(z(t),e,_,r)}function m(e,t,_,r){return B(function(e,t){for(var _,r,s,n=[],c=0;c<e.length&&!((t-=2)<0);++c)r=(_=e.charCodeAt(c))>>8,s=_%256,n.push(s),n.push(r);return n}(t,e.length-_),e,_,r)}function E(e,t,_){return 0===t&&_===e.length?W_.fromByteArray(e):W_.fromByteArray(e.slice(t,_))}function w(e,t,_){_=Math.min(e.length,_);for(var r=[],s=t;s<_;){var n,c,i,a,o=e[s],l=null,f=o>239?4:o>223?3:o>191?2:1;if(s+f<=_)switch(f){case 1:o<128&&(l=o);break;case 2:128==(192&(n=e[s+1]))&&(a=(31&o)<<6|63&n)>127&&(l=a);break;case 3:n=e[s+1],c=e[s+2],128==(192&n)&&128==(192&c)&&(a=(15&o)<<12|(63&n)<<6|63&c)>2047&&(a<55296||a>57343)&&(l=a);break;case 4:n=e[s+1],c=e[s+2],i=e[s+3],128==(192&n)&&128==(192&c)&&128==(192&i)&&(a=(15&o)<<18|(63&n)<<12|(63&c)<<6|63&i)>65535&&a<1114112&&(l=a)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),s+=f}return function(e){var t=e.length;if(t<=b)return String.fromCharCode.apply(String,e);for(var _="",r=0;r<t;)_+=String.fromCharCode.apply(String,e.slice(r,r+=b));return _}(r)}t.kMaxLength=r,n.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),n.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}}),n.poolSize=8192,n.from=function(e,t,_){return c(e,t,_)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array),n.alloc=function(e,t,_){return function(e,t,_){return i(e),e<=0?s(e):void 0!==t?"string"==typeof _?s(e).fill(t,_):s(e).fill(t):s(e)}(e,t,_)},n.allocUnsafe=function(e){return a(e)},n.allocUnsafeSlow=function(e){return a(e)},n.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==n.prototype},n.compare=function(e,t){if(U(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var _=e.length,r=t.length,s=0,c=Math.min(_,r);s<c;++s)if(e[s]!==t[s]){_=e[s],r=t[s];break}return _<r?-1:r<_?1:0},n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return n.alloc(0);var _;if(void 0===t)for(t=0,_=0;_<e.length;++_)t+=e[_].length;var r=n.allocUnsafe(t),s=0;for(_=0;_<e.length;++_){var c=e[_];if(U(c,Uint8Array))s+c.length>r.length?n.from(c).copy(r,s):Uint8Array.prototype.set.call(r,c,s);else{if(!n.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(r,s)}s+=c.length}return r},n.byteLength=u,n.prototype._isBuffer=!0,n.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},n.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},n.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},n.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):d.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===n.compare(this,e)},n.prototype.inspect=function(){var e="",_=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(e+=" ... "),"<Buffer "+e+">"},_&&(n.prototype[_]=n.prototype.inspect),n.prototype.compare=function(e,t,_,r,s){if(U(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===_&&(_=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||_>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=_)return 0;if(r>=s)return-1;if(t>=_)return 1;if(this===e)return 0;for(var c=(s>>>=0)-(r>>>=0),i=(_>>>=0)-(t>>>=0),a=Math.min(c,i),o=this.slice(r,s),l=e.slice(t,_),f=0;f<a;++f)if(o[f]!==l[f]){c=o[f],i=l[f];break}return c<i?-1:i<c?1:0},n.prototype.includes=function(e,t,_){return-1!==this.indexOf(e,t,_)},n.prototype.indexOf=function(e,t,_){return v(this,e,t,_,!0)},n.prototype.lastIndexOf=function(e,t,_){return v(this,e,t,_,!1)},n.prototype.write=function(e,t,_,r){if(void 0===t)r="utf8",_=this.length,t=0;else if(void 0===_&&"string"==typeof t)r=t,_=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(_)?(_>>>=0,void 0===r&&(r="utf8")):(r=_,_=void 0)}var s=this.length-t;if((void 0===_||_>s)&&(_=s),e.length>0&&(_<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var n=!1;;)switch(r){case"hex":return y(this,e,t,_);case"utf8":case"utf-8":return P(this,e,t,_);case"ascii":case"latin1":case"binary":return x(this,e,t,_);case"base64":return g(this,e,t,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,e,t,_);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),n=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var b=4096;function k(e,t,_){var r="";_=Math.min(e.length,_);for(var s=t;s<_;++s)r+=String.fromCharCode(127&e[s]);return r}function I(e,t,_){var r="";_=Math.min(e.length,_);for(var s=t;s<_;++s)r+=String.fromCharCode(e[s]);return r}function N(e,t,_){var r=e.length;(!t||t<0)&&(t=0),(!_||_<0||_>r)&&(_=r);for(var s="",n=t;n<_;++n)s+=Y[e[n]];return s}function A(e,t,_){for(var r=e.slice(t,_),s="",n=0;n<r.length-1;n+=2)s+=String.fromCharCode(r[n]+256*r[n+1]);return s}function C(e,t,_){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>_)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,_,r,s,c){if(!n.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<c)throw new RangeError('"value" argument is out of bounds');if(_+r>e.length)throw new RangeError("Index out of range")}function F(e,t,_,r,s,n){if(_+r>e.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function K(e,t,_,r,s){return t=+t,_>>>=0,s||F(e,0,_,4),$_(e,t,_,r,23,4),_+4}function S(e,t,_,r,s){return t=+t,_>>>=0,s||F(e,0,_,8),$_(e,t,_,r,52,8),_+8}n.prototype.slice=function(e,t){var _=this.length;(e=~~e)<0?(e+=_)<0&&(e=0):e>_&&(e=_),(t=void 0===t?_:~~t)<0?(t+=_)<0&&(t=0):t>_&&(t=_),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,n.prototype),r},n.prototype.readUintLE=n.prototype.readUIntLE=function(e,t,_){e>>>=0,t>>>=0,_||C(e,t,this.length);for(var r=this[e],s=1,n=0;++n<t&&(s*=256);)r+=this[e+n]*s;return r},n.prototype.readUintBE=n.prototype.readUIntBE=function(e,t,_){e>>>=0,t>>>=0,_||C(e,t,this.length);for(var r=this[e+--t],s=1;t>0&&(s*=256);)r+=this[e+--t]*s;return r},n.prototype.readUint8=n.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},n.prototype.readUint16LE=n.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUint16BE=n.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUint32LE=n.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUint32BE=n.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,_){e>>>=0,t>>>=0,_||C(e,t,this.length);for(var r=this[e],s=1,n=0;++n<t&&(s*=256);)r+=this[e+n]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*t)),r},n.prototype.readIntBE=function(e,t,_){e>>>=0,t>>>=0,_||C(e,t,this.length);for(var r=t,s=1,n=this[e+--r];r>0&&(s*=256);)n+=this[e+--r]*s;return n>=(s*=128)&&(n-=Math.pow(2,8*t)),n},n.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var _=this[e]|this[e+1]<<8;return 32768&_?4294901760|_:_},n.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var _=this[e+1]|this[e]<<8;return 32768&_?4294901760|_:_},n.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),Z_(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),Z_(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),Z_(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),Z_(this,e,!1,52,8)},n.prototype.writeUintLE=n.prototype.writeUIntLE=function(e,t,_,r){e=+e,t>>>=0,_>>>=0,r||T(this,e,t,_,Math.pow(2,8*_)-1,0);var s=1,n=0;for(this[t]=255&e;++n<_&&(s*=256);)this[t+n]=e/s&255;return t+_},n.prototype.writeUintBE=n.prototype.writeUIntBE=function(e,t,_,r){e=+e,t>>>=0,_>>>=0,r||T(this,e,t,_,Math.pow(2,8*_)-1,0);var s=_-1,n=1;for(this[t+s]=255&e;--s>=0&&(n*=256);)this[t+s]=e/n&255;return t+_},n.prototype.writeUint8=n.prototype.writeUInt8=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,1,255,0),this[t]=255&e,t+1},n.prototype.writeUint16LE=n.prototype.writeUInt16LE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeUint16BE=n.prototype.writeUInt16BE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeUint32LE=n.prototype.writeUInt32LE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},n.prototype.writeUint32BE=n.prototype.writeUInt32BE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeIntLE=function(e,t,_,r){if(e=+e,t>>>=0,!r){var s=Math.pow(2,8*_-1);T(this,e,t,_,s-1,-s)}var n=0,c=1,i=0;for(this[t]=255&e;++n<_&&(c*=256);)e<0&&0===i&&0!==this[t+n-1]&&(i=1),this[t+n]=(e/c>>0)-i&255;return t+_},n.prototype.writeIntBE=function(e,t,_,r){if(e=+e,t>>>=0,!r){var s=Math.pow(2,8*_-1);T(this,e,t,_,s-1,-s)}var n=_-1,c=1,i=0;for(this[t+n]=255&e;--n>=0&&(c*=256);)e<0&&0===i&&0!==this[t+n+1]&&(i=1),this[t+n]=(e/c>>0)-i&255;return t+_},n.prototype.writeInt8=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeInt32LE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},n.prototype.writeInt32BE=function(e,t,_){return e=+e,t>>>=0,_||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeFloatLE=function(e,t,_){return K(this,e,t,!0,_)},n.prototype.writeFloatBE=function(e,t,_){return K(this,e,t,!1,_)},n.prototype.writeDoubleLE=function(e,t,_){return S(this,e,t,!0,_)},n.prototype.writeDoubleBE=function(e,t,_){return S(this,e,t,!1,_)},n.prototype.copy=function(e,t,_,r){if(!n.isBuffer(e))throw new TypeError("argument should be a Buffer");if(_||(_=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<_&&(r=_),r===_)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-_&&(r=e.length-t+_);var s=r-_;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,_,r):Uint8Array.prototype.set.call(e,this.subarray(_,r),t),s},n.prototype.fill=function(e,t,_,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,_=this.length):"string"==typeof _&&(r=_,_=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!n.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var s=e.charCodeAt(0);("utf8"===r&&s<128||"latin1"===r)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<_)throw new RangeError("Out of range index");if(_<=t)return this;var c;if(t>>>=0,_=void 0===_?this.length:_>>>0,e||(e=0),"number"==typeof e)for(c=t;c<_;++c)this[c]=e;else{var i=n.isBuffer(e)?e:n.from(e,r),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(c=0;c<_-t;++c)this[c+t]=i[c%a]}return this};var L=/[^+/0-9A-Za-z-_]/g;function R(e,t){var _;t=t||1/0;for(var r=e.length,s=null,n=[],c=0;c<r;++c){if((_=e.charCodeAt(c))>55295&&_<57344){if(!s){if(_>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(c+1===r){(t-=3)>-1&&n.push(239,191,189);continue}s=_;continue}if(_<56320){(t-=3)>-1&&n.push(239,191,189),s=_;continue}_=65536+(s-55296<<10|_-56320)}else s&&(t-=3)>-1&&n.push(239,191,189);if(s=null,_<128){if((t-=1)<0)break;n.push(_)}else if(_<2048){if((t-=2)<0)break;n.push(_>>6|192,63&_|128)}else if(_<65536){if((t-=3)<0)break;n.push(_>>12|224,_>>6&63|128,63&_|128)}else{if(!(_<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(_>>18|240,_>>12&63|128,_>>6&63|128,63&_|128)}}return n}function z(e){return W_.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,_,r){for(var s=0;s<r&&!(s+_>=t.length||s>=e.length);++s)t[s+_]=e[s];return s}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function D(e){return e!=e}var Y=function(){for(var e="0123456789abcdef",t=new Array(256),_=0;_<16;++_)for(var r=16*_,s=0;s<16;++s)t[r+s]=e[_]+e[s];return t}()},q_(X_={exports:{}},X_.exports),X_.exports),Q_=J_.Buffer;
2/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */J_.SlowBuffer,J_.INSPECT_MAX_BYTES,J_.kMaxLength;const er=(tr=Q_,(e,t)=>{if("string"==typeof e){if("string"==typeof t&&!tr.isEncoding(t))throw new TypeError("Invalid default encoding.");return tr.from(e,t)}if(e instanceof Uint8Array)return e;if("object"==typeof e&&"string"==typeof e.value&&tr.isEncoding(e.encoding))return tr.from(e.value,e.encoding);throw new TypeError("Invalid format of 'Data'.")});var tr;const _r=(e=>t=>{let _=e.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(_=_.slice(t.byteOffset,t.byteOffset+t.byteLength)),_})(Q_),rr=Q_.from("VIRGIL-DATA-SIGNATURE","utf8"),sr=Q_.from("VIRGIL-DATA-SIGNER-ID","utf8"),nr=160;class cr{get isDisposed(){return this._isDisposed}constructor(e,t){this.identifier=_r(e),this.lowLevelPrivateKey=t,this._isDisposed=!1}dispose(){this.lowLevelPrivateKey.delete(),this._isDisposed=!0}}class ir{get isDisposed(){return this._isDisposed}get key(){const e=new(F_().KeyAsn1Serializer);try{return e.setupDefaults(),e.serializePublicKey(this.lowLevelPublicKey)}finally{e.delete()}}constructor(e,t){this.identifier=_r(e),this.lowLevelPublicKey=t,this._isDisposed=!1}dispose(){this.lowLevelPublicKey.delete(),this._isDisposed=!0}}function ar(e){if(!(e instanceof cr))throw new TypeError("An argument is not an instance of 'VirgilPrivateKey' class.");if(e.isDisposed)throw new TypeError("Cannot use an instance of 'VirgilPrivateKey' class after it was disposed.")}function or(e){if(!(e instanceof ir))throw new TypeError("An argument is not a 'VirgilPublicKey'.");if(e.isDisposed)throw new TypeError("Cannot use an instance of 'VirgilPublicKey' class after it was disposed.")}function lr(e){if(!Array.isArray(e))throw new TypeError("An argument is not an array.");if(!e.length)throw new TypeError("An array of 'VirgilPublicKey' instances should not be empty.");e.forEach(or)}function fr(e){if(!(e instanceof Uint8Array))throw new TypeError("An argument is not an instance of 'Uint8Array' class.");if(e.byteLength<10)throw new TypeError("An argument byte length is too small. Expected to be at least '10' bytes.")}function ur(e){const t=F_().GroupSessionMessage.deserialize(e),_={epochNumber:t.getEpoch(),sessionId:_r(t.getSessionId()).toString("hex"),data:_r(e).toString("base64")};return t.delete(),_}function dr(e){const t=F_().GroupSessionMessage.deserialize(e),_=t.getEpoch();return t.delete(),_}function hr(e){const t=new(F_().GroupSession);t.rng=k_();const _=[];try{for(const r of e){const e=F_().GroupSessionMessage.deserialize(r);_.push(e),t.addEpoch(e)}return t}finally{for(;_.length;){const e=_.pop();e&&e.delete()}}}function vr(e){const t=new(F_().Sha512);try{return t.hash(e).subarray(0,32)}finally{t.delete()}}function pr(e){return e=e.slice().sort(((e,t)=>dr(e)-dr(t))),{getSessionId(){const t=hr(e),_=t.getSessionId();return t.delete(),_r(_).toString("hex")},getCurrentEpochNumber:()=>dr(e[e.length-1]),encrypt(t,_){const r=er(t,"utf8");let s;ar(_);try{s=hr(e);const t=s.encrypt(r,_.lowLevelPrivateKey),n=t.serialize();return t.delete(),_r(n)}finally{s&&s.delete()}},decrypt(t,_){const r=er(t,"base64");let s,n;or(_);try{return s=hr(e),n=F_().GroupSessionMessage.deserialize(r),_r(s.decrypt(n,_.lowLevelPublicKey))}finally{n&&n.delete(),s&&s.delete()}},addNewEpoch(){const t=hr(e);try{const _=t.createGroupTicket(),r=_.getTicketMessage(),s=r.serialize();return e.push(s),r.delete(),_.delete(),ur(s)}finally{t.delete()}},export:()=>e.map(_r),parseMessage:e=>ur(er(e,"base64"))}}const yr=e=>null==e?[]:Array.isArray(e)?e:[e];var Pr;!function(e){e.STREAM_ILLEGAL_STATE="STREAM_ILLEGAL_STATE",e.DATA_NOT_SIGNED="DATA_NOT_SIGNED",e.SIGNER_NOT_FOUND="SIGNER_NOT_FOUND",e.INVALID_SIGNATURE="INVALID_SIGNATURE"}(Pr||(Pr={}));class xr extends Error{constructor(e,t){super(t||xr.DEFAULT_MESSAGE),Object.setPrototypeOf(this,xr.prototype),this.name="VirgilCryptoError",this.status=e}}xr.DEFAULT_MESSAGE="Use the 'status' property and 'VirgilCryptoErrorStatus' enum to check for specific error.";class gr{get isRunning(){return this._isRunning}get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e,t){const _=F_(),r=yr(e);if(lr(r),this.recipientCipher=new _.RecipientCipher,this.aes256Gcm=new _.Aes256Gcm,this.recipientCipher.encryptionCipher=this.aes256Gcm,this.recipientCipher.random=k_(),r.forEach((e=>{this.recipientCipher.addKeyRecipient(e.identifier,e.lowLevelPublicKey)})),t){const e=er(t,"base64");this.messageInfoCustomParams=this.recipientCipher.customParams(),this.messageInfoCustomParams.addData(rr,e)}this._isFinished=!1,this._isRunning=!1,this._isDisposed=!1}start(){return this.ensureLegalState(),this.recipientCipher.startEncryption(),this._isRunning=!0,_r(this.recipientCipher.packMessageInfo())}update(e){this.ensureLegalState(),this.ensureIsRunning();const t=er(e,"utf8");return _r(this.recipientCipher.processEncryption(t))}final(e=!0){this.ensureLegalState(),this.ensureIsRunning();try{return _r(this.recipientCipher.finishEncryption())}finally{this._isFinished=!0,this._isRunning=!1,e&&this.dispose()}}dispose(){this.messageInfoCustomParams&&this.messageInfoCustomParams.delete(),this.aes256Gcm.delete(),this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}ensureIsRunning(){if(!this._isRunning)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher before the 'start' method.")}}class mr{get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e){this._isFinished=!1,this._isDisposed=!1;const t=F_();ar(e),this.recipientCipher=new t.RecipientCipher;try{this.recipientCipher.startDecryptionWithKey(e.identifier,e.lowLevelPrivateKey,new Uint8Array)}catch(e){throw this.recipientCipher.delete(),e}}getSignature(){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot get signature after the 'dispose' method has been called.");if(!this._isFinished)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot get signature before the 'final' method has been called.");const e=this.recipientCipher.customParams();try{return _r(e.findData(rr))}finally{e.delete()}}update(e){this.ensureLegalState();const t=er(e,"utf8");return _r(this.recipientCipher.processDecryption(t))}final(e=!0){this.ensureLegalState();try{return _r(this.recipientCipher.finishDecryption())}finally{this._isFinished=!0,e&&this.dispose()}}dispose(){this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}}class Er{constructor(){const e=F_();this.paddingParams=e.PaddingParams.newWithConstraints(nr,nr),this.recipientCipher=new e.RecipientCipher,this.recipientCipher.random=k_(),this.recipientCipher.paddingParams=this.paddingParams,this._isDisposed=!1,this._isFinished=!1}start(e){this.ensureLegalState(),ar(e),this.recipientCipher.startDecryptionWithKey(e.identifier,e.lowLevelPrivateKey,new Uint8Array)}update(e){this.ensureLegalState();const t=er(e),_=this.recipientCipher.processDecryption(t);return _r(_)}final(){this.ensureLegalState();const e=this.recipientCipher.finishDecryption();try{return _r(e)}finally{this._isFinished=!0}}verify(e,t=!0){const _=yr(e);if(lr(_),this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot verify signature after the 'dispose' method has been called.");if(!this._isFinished)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot verify signature before the 'final' method has been called.");let r;try{if(!this.recipientCipher.isDataSigned())throw new xr(Pr.DATA_NOT_SIGNED);if(r=this.recipientCipher.signerInfos(),!r.hasItem())throw new xr(Pr.DATA_NOT_SIGNED);const e=r.item();let t;for(let r=0;r<_.length;r+=1){if(0===Q_.compare(e.signerId(),_[r].identifier)){t=_[r];break}if(r===_.length-1)throw new xr(Pr.SIGNER_NOT_FOUND)}if(!this.recipientCipher.verifySignerInfo(e,t.lowLevelPublicKey))throw new xr(Pr.INVALID_SIGNATURE)}finally{r&&r.delete(),t&&this.dispose()}}dispose(){this.paddingParams.delete(),this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}}class wr{get isRunning(){return this._isRunning}get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e,t,_){ar(e);const r=yr(t);lr(r);const s=F_(),n=k_();this.recipientCipher=new s.RecipientCipher,this.aes256Gcm=new s.Aes256Gcm,this.sha512=new s.Sha512,this.recipientCipher.encryptionCipher=this.aes256Gcm,this.recipientCipher.random=n,this.recipientCipher.signerHash=this.sha512,_&&(this.randomPadding=new s.RandomPadding,this.randomPadding.random=n,this.recipientCipher.encryptionPadding=this.randomPadding,this.paddingParams=s.PaddingParams.newWithConstraints(nr,nr),this.recipientCipher.paddingParams=this.paddingParams),r.forEach((e=>{this.recipientCipher.addKeyRecipient(e.identifier,e.lowLevelPublicKey)}));try{this.recipientCipher.addSigner(e.identifier,e.lowLevelPrivateKey),this._isDisposed=!1,this._isRunning=!1,this._isFinished=!1}catch(e){throw this.dispose(),e}}start(e){this.ensureLegalState(),this.recipientCipher.startSignedEncryption(e);const t=this.recipientCipher.packMessageInfo();return this._isRunning=!0,_r(t)}update(e){this.ensureLegalState(),this.ensureIsRunning();const t=er(e),_=this.recipientCipher.processEncryption(t);return _r(_)}final(e=!0){this.ensureLegalState(),this.ensureIsRunning();const t=this.recipientCipher.finishEncryption(),_=this.recipientCipher.packMessageInfoFooter();try{return Q_.concat([t,_])}finally{this._isFinished=!0,this._isRunning=!1,e&&this.dispose()}}dispose(){this.sha512.delete(),this.aes256Gcm.delete(),this.randomPadding&&this.randomPadding.delete(),this.paddingParams&&this.paddingParams.delete(),this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}ensureIsRunning(){if(!this._isRunning)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher before the 'start' method.")}}class br{get isDisposed(){return this._isDisposed}constructor(){this._isDisposed=!1;const e=F_();this.signer=new e.Signer,this.sha512=new e.Sha512,this.signer.hash=this.sha512,this.signer.random=k_(),this.signer.reset()}update(e){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use signer after the 'dispose' method has been called.");const t=er(e,"utf8");return this.signer.appendData(t),this}sign(e,t=!0){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. The VirgilStreamSigner has been disposed. Pass 'false' as the second argument to the 'sign' method if you need to generate more than one signature.");ar(e);const _=this.signer.sign(e.lowLevelPrivateKey);return t&&this.dispose(),_r(_)}dispose(){this.sha512.delete(),this.signer.delete(),this._isDisposed=!0}}class kr{get isDisposed(){return this._isDisposed}constructor(e){this._isDisposed=!1;const t=F_(),_=er(e,"base64");this.verifier=new t.Verifier;try{this.verifier.reset(_)}catch(e){throw this.verifier.delete(),e}}update(e){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use signer after the 'dispose' method has been called.");const t=er(e,"utf8");return this.verifier.appendData(t),this}verify(e,t=!0){if(this._isDisposed)throw new xr(Pr.STREAM_ILLEGAL_STATE,"Illegal state. The VirgilStreamVerifier has been disposed. Pass 'false' as the second argument to the 'verify' method if you need to verify with more than one public key.");or(e);const _=this.verifier.verify(e.lowLevelPublicKey);return t&&this.dispose(),_}dispose(){this.verifier.delete(),this._isDisposed=!0}}class Ir{constructor(e={}){this.hashAlgorithm=L_,this.keyPairType=R_,this.defaultKeyPairType=e.defaultKeyPairType||R_.DEFAULT,this.useSha256Identifiers=e.useSha256Identifiers||!1}generateKeys(e){const t=e||this.defaultKeyPairType,_=z_(t);return this.generateKeyPair(I_(),_)}generateKeysFromKeyMaterial(e,t){const _=t||this.defaultKeyPairType,r=z_(_),s=er(e,"base64"),n=F_(),c=new n.KeyMaterialRng;c.resetKeyMaterial(s);const i=new n.KeyProvider;i.random=c;try{i.setupDefaults()}catch(e){throw c.delete(),i.delete(),e}try{return this.generateKeyPair(i,r)}finally{c.delete(),i.delete()}}importPrivateKey(e){const t=I_(),_=er(e,"base64"),r=t.importPrivateKey(_),s=r.extractPublicKey();try{const e=t.exportPublicKey(s),_=this.calculateKeyPairIdentifier(e);return new cr(_,r)}finally{s.delete()}}exportPrivateKey(e){ar(e);const t=I_().exportPrivateKey(e.lowLevelPrivateKey);return _r(t)}importPublicKey(e){const t=er(e,"base64"),_=I_().importPublicKey(t),r=this.calculateKeyPairIdentifier(t);return new ir(r,_)}exportPublicKey(e){or(e);const t=I_().exportPublicKey(e.lowLevelPublicKey);return _r(t)}encrypt(e,t,_){const r=er(e,"utf8"),s=yr(t);lr(s);const n=F_(),c=k_(),i=new n.RecipientCipher,a=new n.Aes256Gcm;let o,l;i.encryptionCipher=a,i.random=c,_&&(o=new n.RandomPadding,o.random=c,i.encryptionPadding=o,l=n.PaddingParams.newWithConstraints(nr,nr),i.paddingParams=l),s.forEach((({identifier:e},t)=>{i.addKeyRecipient(e,s[t].lowLevelPublicKey)}));try{i.startEncryption();const e=i.packMessageInfo(),t=i.processEncryption(r),_=i.finishEncryption();return Q_.concat([e,t,_])}finally{a.delete(),l&&l.delete(),o&&o.delete(),i.delete()}}decrypt(e,t){const _=er(e,"base64");ar(t);const r=F_(),s=new r.RecipientCipher;s.random=k_();const n=r.PaddingParams.newWithConstraints(nr,nr);s.paddingParams=n;try{s.startDecryptionWithKey(t.identifier,t.lowLevelPrivateKey,new Uint8Array);const e=s.processDecryption(_),r=s.finishDecryption();return Q_.concat([e,r])}finally{n.delete(),s.delete()}}calculateHash(e,t=L_.SHA512){const _=er(e,"utf8");let r;switch(t){case L_.SHA224:r=this.createHash(_,F_().Sha224);break;case L_.SHA256:r=this.createHash(_,F_().Sha256);break;case L_.SHA384:r=this.createHash(_,F_().Sha384);break;case L_.SHA512:r=this.createHash(_,F_().Sha512);break;default:throw new TypeError("Unknown hash algorithm")}return _r(r)}extractPublicKey(e){ar(e);const t=e.lowLevelPrivateKey.extractPublicKey();return new ir(e.identifier,t)}calculateSignature(e,t){const _=er(e,"utf8");ar(t);const r=F_(),s=new r.Signer,n=new r.Sha512;s.random=k_(),s.hash=n,s.reset(),s.appendData(_);try{const e=s.sign(t.lowLevelPrivateKey);return _r(e)}finally{s.delete(),n.delete()}}verifySignature(e,t,_){const r=er(e,"utf8"),s=er(t,"base64");or(_);const n=new(F_().Verifier);try{n.reset(s)}catch(e){throw n.delete(),e}n.appendData(r);const c=n.verify(_.lowLevelPublicKey);return n.delete(),c}signAndEncrypt(e,t,_,r){const s=er(e,"utf8");ar(t);const n=yr(_);lr(n);const{messageInfo:c,processEncryption:i,finishEncryption:a,messageInfoFooter:o}=this._signAndEncrypt(s,t,n,r);return Q_.concat([c,i,a,o])}signThenEncrypt(e,t,_,r){const s=er(e,"utf8");ar(t);const n=yr(_);lr(n);const{messageInfo:c,processEncryption:i,finishEncryption:a}=this._signThenEncrypt(s,t,n,r);return Q_.concat([c,i,a])}decryptAndVerify(e,t,_){const r=er(e,"base64");ar(t);const s=yr(_);return lr(s),this._decryptAndVerify(r,new Uint8Array,t,s)}decryptThenVerify(e,t,_){const r=er(e,"base64");ar(t);const s=yr(_);return lr(s),this._decryptThenVerify(r,new Uint8Array,t,s)}getRandomBytes(e){!function(e){if("number"!=typeof e)throw new TypeError("An argument is not a number.");if(e<=0)throw new TypeError(`An argument should be greater that '0', but received '${e}'.`)}(e);const t=k_().random(e);return _r(t)}signThenEncryptDetached(e,t,_,r){const s=er(e,"utf8");ar(t);const n=yr(_);lr(n);const{messageInfo:c,processEncryption:i,finishEncryption:a}=this._signThenEncrypt(s,t,n,r);return{encryptedData:Q_.concat([i,a]),metadata:_r(c)}}decryptThenVerifyDetached(e,t,_,r){const s=er(e,"base64"),n=er(t,"base64");ar(_);const c=yr(r);return lr(c),this._decryptThenVerify(s,n,_,c)}createStreamCipher(e,t){return new gr(e,t)}createStreamDecipher(e){return new mr(e)}createStreamSignAndEncrypt(e,t,_){return new wr(e,t,_)}createStreamDecryptAndVerify(){return new Er}createStreamSigner(){return new br}createStreamVerifier(e){return new kr(e)}generateGroupSession(e){const t=er(e,"utf8");fr(t);const _=function(e){const t=new(F_().GroupSessionTicket);t.rng=k_();try{return t.setupTicketAsNew(e),t.getTicketMessage()}finally{t.delete()}}(vr(t)),r=_.serialize();return _.delete(),pr([r])}importGroupSession(e){if(!Array.isArray(e))throw new TypeError("Epoch messages must be an array.");if(0===e.length)throw new TypeError("Epoch messages must not be empty.");return pr(e.map((e=>er(e,"base64"))))}calculateGroupSessionId(e){const t=er(e,"utf8");return fr(t),_r(vr(t)).toString("hex")}createHash(e,t){const _=new t,r=_.hash(e);return _.delete(),r}calculateKeyPairIdentifier(e){return this.useSha256Identifiers?this.createHash(e,F_().Sha256):this.createHash(e,F_().Sha512).slice(0,8)}generateKeyPair(e,t){let _;if((r=t.type)===R_.CURVE25519_ROUND5_ED25519_FALCON||r===R_.CURVE25519_ED25519){const[r,s]=t.cipherAlgIds,[n,c]=t.signerAlgIds;_=e.generateCompoundHybridPrivateKey(r,s,n,c)}else(e=>e===R_.RSA_2048||e===R_.RSA_3072||e===R_.RSA_4096||e===R_.RSA_8192)(t.type)&&e.setRsaParams(t.bitlen),_=e.generatePrivateKey(t.algId);var r;const s=_.extractPublicKey();let n;try{n=e.exportPublicKey(s)}catch(e){throw _.delete(),s.delete(),e}const c=this.calculateKeyPairIdentifier(n);return{privateKey:new cr(c,_),publicKey:new ir(c,s)}}_signAndEncrypt(e,t,_,r){const s=F_(),n=k_(),c=new s.RecipientCipher,i=new s.Aes256Gcm,a=new s.Sha512;let o,l;c.encryptionCipher=i,c.random=n,c.signerHash=a,r&&(o=new s.RandomPadding,o.random=n,c.encryptionPadding=o,l=s.PaddingParams.newWithConstraints(nr,nr),c.paddingParams=l),_.forEach((({identifier:e},t)=>{c.addKeyRecipient(e,_[t].lowLevelPublicKey)}));try{c.addSigner(t.identifier,t.lowLevelPrivateKey),c.startSignedEncryption(e.length);const _=c.packMessageInfo(),r=c.processEncryption(e),s=c.finishEncryption();return{messageInfo:_,processEncryption:r,finishEncryption:s,messageInfoFooter:c.packMessageInfoFooter()}}finally{a.delete(),i.delete(),o&&o.delete(),l&&l.delete(),c.delete()}}_signThenEncrypt(e,t,_,r){const s=F_(),n=k_(),c=new s.RecipientCipher,i=new s.Aes256Gcm;let a,o;c.encryptionCipher=i,c.random=n,r&&(a=new s.RandomPadding,a.random=n,c.encryptionPadding=a,o=s.PaddingParams.newWithConstraints(nr,nr),c.paddingParams=o),_.forEach((({identifier:e},t)=>{c.addKeyRecipient(e,_[t].lowLevelPublicKey)}));const l=c.customParams();try{const _=this.calculateSignature(e,t);l.addData(rr,_),l.addData(sr,t.identifier),c.startEncryption();const r=c.packMessageInfo(),s=c.processEncryption(e);return{messageInfo:r,processEncryption:s,finishEncryption:c.finishEncryption()}}finally{l.delete(),i.delete(),a&&a.delete(),o&&o.delete(),c.delete()}}_decryptAndVerify(e,t,_,r){const s=F_(),n=s.PaddingParams.newWithConstraints(nr,nr),c=new s.RecipientCipher;let i;c.random=k_(),c.paddingParams=n;try{c.startDecryptionWithKey(_.identifier,_.lowLevelPrivateKey,t);const r=c.processDecryption(e),s=c.finishDecryption();i=Q_.concat([r,s])}catch(e){throw n.delete(),c.delete(),e}if(!c.isDataSigned())throw n.delete(),c.delete(),new xr(Pr.DATA_NOT_SIGNED);const a=c.signerInfos();if(!a.hasItem())throw n.delete(),a.delete(),c.delete(),new xr(Pr.DATA_NOT_SIGNED);const o=a.item();let l;for(let e=0;e<r.length;e+=1){if(0===Q_.compare(o.signerId(),r[e].identifier)){l=r[e];break}if(e===r.length-1)throw n.delete(),o.delete(),a.delete(),c.delete(),new xr(Pr.SIGNER_NOT_FOUND)}if(!c.verifySignerInfo(o,l.lowLevelPublicKey))throw n.delete(),o.delete(),a.delete(),c.delete(),new xr(Pr.INVALID_SIGNATURE);return n.delete(),o.delete(),a.delete(),c.delete(),i}_decryptThenVerify(e,t,_,r){const s=F_(),n=s.PaddingParams.newWithConstraints(nr,nr),c=new s.RecipientCipher;let i;c.random=k_(),c.paddingParams=n;try{c.startDecryptionWithKey(_.identifier,_.lowLevelPrivateKey,t);const r=c.processDecryption(e),s=c.finishDecryption();i=Q_.concat([r,s])}catch(e){throw n.delete(),c.delete(),e}const a=c.customParams();let o;if(1===r.length)o=r[0];else{let e;try{e=a.findData(sr)}catch(e){throw n.delete(),c.delete(),a.delete(),e}for(let t=0;t<r.length;t+=1)if(0===Q_.compare(e,r[t].identifier)){o=r[t];break}if(!o)throw a.delete(),n.delete(),c.delete(),new xr(Pr.SIGNER_NOT_FOUND)}try{const e=a.findData(rr);if(!this.verifySignature(i,e,o))throw new xr(Pr.INVALID_SIGNATURE);return i}finally{a.delete(),n.delete(),c.delete()}}}export{L_ as HashAlgorithm,R_ as KeyPairType,e as VirgilAccessTokenSigner,t as VirgilCardCrypto,Ir as VirgilCrypto,xr as VirgilCryptoError,Pr as VirgilCryptoErrorStatus,cr as VirgilPrivateKey,_ as VirgilPrivateKeyExporter,ir as VirgilPublicKey,gr as VirgilStreamCipher,mr as VirgilStreamDecipher,br as VirgilStreamSigner,kr as VirgilStreamVerifier,F_ as getFoundationModules,T_ as hasFoundationModules,S_ as initCrypto,A_ as moduleInitializer,K_ as setFoundationModules};