UNPKG

439 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VirgilCrypto={})}(this,(function(e){"use strict";var t={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):"."},H=e=>{if("/"===e)return"/";var t=(e=(e=D(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},M=e=>(M=(()=>{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 V="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,G=(e,t)=>{for(var _=t+NaN,r=t;e[r]&&!(r>=_);)++r;if(16<r-t&&e.buffer&&V)return V.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(G(e.It,0)),e.It=[]):0!=t&&e.It.push(t)},Ut(e){e.It&&0<e.It.length&&(o(G(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(G(e.It,0)),e.It=[]):0!=t&&e.It.push(t)},Ut(e){e.It&&0<e.It.length&&(l(G(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 Me(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=H(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=H(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,He=e=>{u=e,B||0<Ye||(s.onExit?.(e),P=!0),c(e,new L(e))};function Me(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(Me.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=M(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?G(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,He(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:He},Ve=function(){function e(e){return Ve=e.exports,f=Ve.p,x(),R=Ve.Ct,m.unshift(Ve.q),b--,s.monitorRunDependencies?.(b),0==b&&k&&(e=k,k=null,e()),Ve}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=Ve.r)(e,t),s._vscf_impl_tag=e=>(s._vscf_impl_tag=Ve.s)(e),s._vscf_impl_shallow_copy=e=>(s._vscf_impl_shallow_copy=Ve.t)(e),s._vscf_aes256_cbc_alg_id=e=>(s._vscf_aes256_cbc_alg_id=Ve.u)(e),s._vscf_aes256_cbc_produce_alg_info=e=>(s._vscf_aes256_cbc_produce_alg_info=Ve.v)(e),s._vscf_aes256_cbc_restore_alg_info=(e,t)=>(s._vscf_aes256_cbc_restore_alg_info=Ve.w)(e,t),s._vscf_aes256_cbc_set_nonce=(e,t)=>(s._vscf_aes256_cbc_set_nonce=Ve.x)(e,t),s._vscf_aes256_cbc_encrypt=(e,t,_)=>(s._vscf_aes256_cbc_encrypt=Ve.y)(e,t,_),s._vscf_aes256_cbc_start_encryption=e=>(s._vscf_aes256_cbc_start_encryption=Ve.z)(e),s._vscf_aes256_cbc_update=(e,t,_)=>(s._vscf_aes256_cbc_update=Ve.A)(e,t,_),s._vscf_aes256_cbc_finish=(e,t)=>(s._vscf_aes256_cbc_finish=Ve.B)(e,t),s._vscf_aes256_cbc_encrypted_len=(e,t)=>(s._vscf_aes256_cbc_encrypted_len=Ve.C)(e,t),s._vscf_aes256_cbc_precise_encrypted_len=(e,t)=>(s._vscf_aes256_cbc_precise_encrypted_len=Ve.D)(e,t),s._vscf_aes256_cbc_decrypt=(e,t,_)=>(s._vscf_aes256_cbc_decrypt=Ve.E)(e,t,_),s._vscf_aes256_cbc_start_decryption=e=>(s._vscf_aes256_cbc_start_decryption=Ve.F)(e),s._vscf_aes256_cbc_decrypted_len=(e,t)=>(s._vscf_aes256_cbc_decrypted_len=Ve.G)(e,t),s._vscf_aes256_cbc_set_key=(e,t)=>(s._vscf_aes256_cbc_set_key=Ve.H)(e,t),s._vscf_aes256_cbc_state=e=>(s._vscf_aes256_cbc_state=Ve.I)(e),s._vscf_aes256_cbc_out_len=(e,t)=>(s._vscf_aes256_cbc_out_len=Ve.J)(e,t),s._vscf_aes256_cbc_decrypted_out_len=(e,t)=>(s._vscf_aes256_cbc_decrypted_out_len=Ve.K)(e,t),s._vscf_aes256_cbc_encrypted_out_len=(e,t)=>(s._vscf_aes256_cbc_encrypted_out_len=Ve.L)(e,t),s._vscf_aes256_cbc_new=()=>(s._vscf_aes256_cbc_new=Ve.M)(),s._vscf_aes256_cbc_delete=e=>(s._vscf_aes256_cbc_delete=Ve.N)(e),s._vscf_aes256_cbc_shallow_copy=e=>(s._vscf_aes256_cbc_shallow_copy=Ve.O)(e),s._vscf_aes256_gcm_out_len=(e,t)=>(s._vscf_aes256_gcm_out_len=Ve.P)(e,t),s._vscf_aes256_gcm_alg_id=e=>(s._vscf_aes256_gcm_alg_id=Ve.Q)(e),s._vscf_aes256_gcm_produce_alg_info=e=>(s._vscf_aes256_gcm_produce_alg_info=Ve.R)(e),s._vscf_aes256_gcm_restore_alg_info=(e,t)=>(s._vscf_aes256_gcm_restore_alg_info=Ve.S)(e,t),s._vscf_aes256_gcm_set_nonce=(e,t)=>(s._vscf_aes256_gcm_set_nonce=Ve.T)(e,t),s._vscf_aes256_gcm_encrypt=(e,t,_)=>(s._vscf_aes256_gcm_encrypt=Ve.U)(e,t,_),s._vscf_aes256_gcm_start_encryption=e=>(s._vscf_aes256_gcm_start_encryption=Ve.V)(e),s._vscf_aes256_gcm_update=(e,t,_)=>(s._vscf_aes256_gcm_update=Ve.W)(e,t,_),s._vscf_aes256_gcm_finish=(e,t)=>(s._vscf_aes256_gcm_finish=Ve.X)(e,t),s._vscf_aes256_gcm_encrypted_len=(e,t)=>(s._vscf_aes256_gcm_encrypted_len=Ve.Y)(e,t),s._vscf_aes256_gcm_finish_auth_decryption=(e,t,_)=>(s._vscf_aes256_gcm_finish_auth_decryption=Ve.Z)(e,t,_),s._vscf_aes256_gcm_finish_auth_encryption=(e,t,_)=>(s._vscf_aes256_gcm_finish_auth_encryption=Ve._)(e,t,_),s._vscf_aes256_gcm_precise_encrypted_len=(e,t)=>(s._vscf_aes256_gcm_precise_encrypted_len=Ve.$)(e,t),s._vscf_aes256_gcm_decrypt=(e,t,_)=>(s._vscf_aes256_gcm_decrypt=Ve.aa)(e,t,_),s._vscf_aes256_gcm_start_decryption=e=>(s._vscf_aes256_gcm_start_decryption=Ve.ba)(e),s._vscf_aes256_gcm_decrypted_len=(e,t)=>(s._vscf_aes256_gcm_decrypted_len=Ve.ca)(e,t),s._vscf_aes256_gcm_set_key=(e,t)=>(s._vscf_aes256_gcm_set_key=Ve.da)(e,t),s._vscf_aes256_gcm_state=e=>(s._vscf_aes256_gcm_state=Ve.ea)(e),s._vscf_aes256_gcm_decrypted_out_len=(e,t)=>(s._vscf_aes256_gcm_decrypted_out_len=Ve.fa)(e,t),s._vscf_aes256_gcm_encrypted_out_len=(e,t)=>(s._vscf_aes256_gcm_encrypted_out_len=Ve.ga)(e,t),s._vscf_aes256_gcm_auth_encrypt=(e,t,_,r,n)=>(s._vscf_aes256_gcm_auth_encrypt=Ve.ha)(e,t,_,r,n),s._vscf_aes256_gcm_auth_encrypted_len=(e,t)=>(s._vscf_aes256_gcm_auth_encrypted_len=Ve.ia)(e,t),s._vscf_aes256_gcm_set_auth_data=(e,t)=>(s._vscf_aes256_gcm_set_auth_data=Ve.ja)(e,t),s._vscf_aes256_gcm_auth_decrypt=(e,t,_,r,n)=>(s._vscf_aes256_gcm_auth_decrypt=Ve.ka)(e,t,_,r,n),s._vscf_aes256_gcm_auth_decrypted_len=(e,t)=>(s._vscf_aes256_gcm_auth_decrypted_len=Ve.la)(e,t),s._vscf_aes256_gcm_new=()=>(s._vscf_aes256_gcm_new=Ve.ma)(),s._vscf_aes256_gcm_delete=e=>(s._vscf_aes256_gcm_delete=Ve.na)(e),s._vscf_aes256_gcm_shallow_copy=e=>(s._vscf_aes256_gcm_shallow_copy=Ve.oa)(e),s._vscf_alg_info_der_deserializer_setup_defaults=e=>(s._vscf_alg_info_der_deserializer_setup_defaults=Ve.pa)(e),s._vscf_alg_info_der_deserializer_deserialize_inplace=(e,t)=>(s._vscf_alg_info_der_deserializer_deserialize_inplace=Ve.qa)(e,t),s._vscf_alg_info_der_deserializer_deserialize=(e,t,_)=>(s._vscf_alg_info_der_deserializer_deserialize=Ve.ra)(e,t,_),s._vscf_alg_info_der_deserializer_release_asn1_reader=e=>(s._vscf_alg_info_der_deserializer_release_asn1_reader=Ve.sa)(e),s._vscf_alg_info_der_deserializer_new=()=>(s._vscf_alg_info_der_deserializer_new=Ve.ta)(),s._vscf_alg_info_der_deserializer_delete=e=>(s._vscf_alg_info_der_deserializer_delete=Ve.ua)(e),s._vscf_alg_info_der_deserializer_shallow_copy=e=>(s._vscf_alg_info_der_deserializer_shallow_copy=Ve.va)(e),s._vscf_alg_info_der_deserializer_use_asn1_reader=(e,t)=>(s._vscf_alg_info_der_deserializer_use_asn1_reader=Ve.wa)(e,t),s._vscf_alg_info_der_serializer_setup_defaults=e=>(s._vscf_alg_info_der_serializer_setup_defaults=Ve.xa)(e),s._vscf_alg_info_der_serializer_serialize_inplace=(e,t)=>(s._vscf_alg_info_der_serializer_serialize_inplace=Ve.ya)(e,t),s._vscf_alg_info_der_serializer_serialized_len=(e,t)=>(s._vscf_alg_info_der_serializer_serialized_len=Ve.za)(e,t),s._vscf_alg_info_der_serializer_serialize=(e,t,_)=>(s._vscf_alg_info_der_serializer_serialize=Ve.Aa)(e,t,_),s._vscf_alg_info_der_serializer_release_asn1_writer=e=>(s._vscf_alg_info_der_serializer_release_asn1_writer=Ve.Ba)(e),s._vscf_alg_info_der_serializer_new=()=>(s._vscf_alg_info_der_serializer_new=Ve.Ca)(),s._vscf_alg_info_der_serializer_delete=e=>(s._vscf_alg_info_der_serializer_delete=Ve.Da)(e),s._vscf_alg_info_der_serializer_shallow_copy=e=>(s._vscf_alg_info_der_serializer_shallow_copy=Ve.Ea)(e),s._vscf_alg_info_der_serializer_use_asn1_writer=(e,t)=>(s._vscf_alg_info_der_serializer_use_asn1_writer=Ve.Fa)(e,t),s._vscf_asn1rd_reset=(e,t)=>(s._vscf_asn1rd_reset=Ve.Ga)(e,t),s._vscf_asn1rd_left_len=e=>(s._vscf_asn1rd_left_len=Ve.Ha)(e),s._vscf_asn1rd_has_error=e=>(s._vscf_asn1rd_has_error=Ve.Ia)(e),s._vscf_asn1rd_status=e=>(s._vscf_asn1rd_status=Ve.Ja)(e),s._vscf_asn1rd_get_tag=e=>(s._vscf_asn1rd_get_tag=Ve.Ka)(e),s._vscf_asn1rd_get_len=e=>(s._vscf_asn1rd_get_len=Ve.La)(e),s._vscf_asn1rd_get_data_len=e=>(s._vscf_asn1rd_get_data_len=Ve.Ma)(e),s._vscf_asn1rd_read_tag=(e,t)=>(s._vscf_asn1rd_read_tag=Ve.Na)(e,t),s._vscf_asn1rd_read_context_tag=(e,t)=>(s._vscf_asn1rd_read_context_tag=Ve.Oa)(e,t),s._vscf_asn1rd_read_int=e=>(s._vscf_asn1rd_read_int=Ve.Pa)(e),s._vscf_asn1rd_read_int64=e=>(s._vscf_asn1rd_read_int64=Ve.Qa)(e),s._vscf_asn1rd_read_int8=e=>(s._vscf_asn1rd_read_int8=Ve.Ra)(e),s._vscf_asn1rd_read_int16=e=>(s._vscf_asn1rd_read_int16=Ve.Sa)(e),s._vscf_asn1rd_read_int32=e=>(s._vscf_asn1rd_read_int32=Ve.Ta)(e),s._vscf_asn1rd_read_uint=e=>(s._vscf_asn1rd_read_uint=Ve.Ua)(e),s._vscf_asn1rd_read_uint64=e=>(s._vscf_asn1rd_read_uint64=Ve.Va)(e),s._vscf_asn1rd_read_uint8=e=>(s._vscf_asn1rd_read_uint8=Ve.Wa)(e),s._vscf_asn1rd_read_uint16=e=>(s._vscf_asn1rd_read_uint16=Ve.Xa)(e),s._vscf_asn1rd_read_uint32=e=>(s._vscf_asn1rd_read_uint32=Ve.Ya)(e),s._vscf_asn1rd_read_bool=e=>(s._vscf_asn1rd_read_bool=Ve.Za)(e),s._vscf_asn1rd_read_null=e=>(s._vscf_asn1rd_read_null=Ve._a)(e),s._vscf_asn1rd_read_null_optional=e=>(s._vscf_asn1rd_read_null_optional=Ve.$a)(e),s._vscf_asn1rd_read_octet_str=(e,t)=>(s._vscf_asn1rd_read_octet_str=Ve.ab)(e,t),s._vscf_asn1rd_read_bitstring_as_octet_str=(e,t)=>(s._vscf_asn1rd_read_bitstring_as_octet_str=Ve.bb)(e,t),s._vscf_asn1rd_read_utf8_str=(e,t)=>(s._vscf_asn1rd_read_utf8_str=Ve.cb)(e,t),s._vscf_asn1rd_read_oid=(e,t)=>(s._vscf_asn1rd_read_oid=Ve.db)(e,t),s._vscf_asn1rd_read_data=(e,t,_)=>(s._vscf_asn1rd_read_data=Ve.eb)(e,t,_),s._vscf_asn1rd_read_sequence=e=>(s._vscf_asn1rd_read_sequence=Ve.fb)(e),s._vscf_asn1rd_read_set=e=>(s._vscf_asn1rd_read_set=Ve.gb)(e),s._vscf_asn1rd_new=()=>(s._vscf_asn1rd_new=Ve.hb)(),s._vscf_asn1rd_delete=e=>(s._vscf_asn1rd_delete=Ve.ib)(e),s._vscf_asn1rd_shallow_copy=e=>(s._vscf_asn1rd_shallow_copy=Ve.jb)(e),s._vscf_asn1wr_reset=(e,t,_)=>(s._vscf_asn1wr_reset=Ve.kb)(e,t,_),s._vscf_asn1wr_finish=(e,t)=>(s._vscf_asn1wr_finish=Ve.lb)(e,t),s._vscf_asn1wr_bytes=e=>(s._vscf_asn1wr_bytes=Ve.mb)(e),s._vscf_asn1wr_len=e=>(s._vscf_asn1wr_len=Ve.nb)(e),s._vscf_asn1wr_written_len=e=>(s._vscf_asn1wr_written_len=Ve.ob)(e),s._vscf_asn1wr_unwritten_len=e=>(s._vscf_asn1wr_unwritten_len=Ve.pb)(e),s._vscf_asn1wr_has_error=e=>(s._vscf_asn1wr_has_error=Ve.qb)(e),s._vscf_asn1wr_status=e=>(s._vscf_asn1wr_status=Ve.rb)(e),s._vscf_asn1wr_reserve=(e,t)=>(s._vscf_asn1wr_reserve=Ve.sb)(e,t),s._vscf_asn1wr_write_tag=(e,t)=>(s._vscf_asn1wr_write_tag=Ve.tb)(e,t),s._vscf_asn1wr_write_context_tag=(e,t,_)=>(s._vscf_asn1wr_write_context_tag=Ve.ub)(e,t,_),s._vscf_asn1wr_write_len=(e,t)=>(s._vscf_asn1wr_write_len=Ve.vb)(e,t),s._vscf_asn1wr_write_int=(e,t)=>(s._vscf_asn1wr_write_int=Ve.wb)(e,t),s._vscf_asn1wr_write_int64=(e,t,_)=>(s._vscf_asn1wr_write_int64=Ve.xb)(e,t,_),s._vscf_asn1wr_write_int8=(e,t)=>(s._vscf_asn1wr_write_int8=Ve.yb)(e,t),s._vscf_asn1wr_write_int16=(e,t)=>(s._vscf_asn1wr_write_int16=Ve.zb)(e,t),s._vscf_asn1wr_write_int32=(e,t)=>(s._vscf_asn1wr_write_int32=Ve.Ab)(e,t),s._vscf_asn1wr_write_uint=(e,t)=>(s._vscf_asn1wr_write_uint=Ve.Bb)(e,t),s._vscf_asn1wr_write_uint64=(e,t,_)=>(s._vscf_asn1wr_write_uint64=Ve.Cb)(e,t,_),s._vscf_asn1wr_write_uint8=(e,t)=>(s._vscf_asn1wr_write_uint8=Ve.Db)(e,t),s._vscf_asn1wr_write_uint16=(e,t)=>(s._vscf_asn1wr_write_uint16=Ve.Eb)(e,t),s._vscf_asn1wr_write_uint32=(e,t)=>(s._vscf_asn1wr_write_uint32=Ve.Fb)(e,t),s._vscf_asn1wr_write_bool=(e,t)=>(s._vscf_asn1wr_write_bool=Ve.Gb)(e,t),s._vscf_asn1wr_write_null=e=>(s._vscf_asn1wr_write_null=Ve.Hb)(e),s._vscf_asn1wr_write_octet_str=(e,t)=>(s._vscf_asn1wr_write_octet_str=Ve.Ib)(e,t),s._vscf_asn1wr_write_octet_str_as_bitstring=(e,t)=>(s._vscf_asn1wr_write_octet_str_as_bitstring=Ve.Jb)(e,t),s._vscf_asn1wr_write_data=(e,t)=>(s._vscf_asn1wr_write_data=Ve.Kb)(e,t),s._vscf_asn1wr_write_utf8_str=(e,t)=>(s._vscf_asn1wr_write_utf8_str=Ve.Lb)(e,t),s._vscf_asn1wr_write_oid=(e,t)=>(s._vscf_asn1wr_write_oid=Ve.Mb)(e,t),s._vscf_asn1wr_write_sequence=(e,t)=>(s._vscf_asn1wr_write_sequence=Ve.Nb)(e,t),s._vscf_asn1wr_write_set=(e,t)=>(s._vscf_asn1wr_write_set=Ve.Ob)(e,t),s._vscf_asn1wr_new=()=>(s._vscf_asn1wr_new=Ve.Pb)(),s._vscf_asn1wr_delete=e=>(s._vscf_asn1wr_delete=Ve.Qb)(e),s._vscf_asn1wr_shallow_copy=e=>(s._vscf_asn1wr_shallow_copy=Ve.Rb)(e),s._vscf_cipher_alg_info_nonce=(e,t)=>(s._vscf_cipher_alg_info_nonce=Ve.Sb)(e,t),s._vscf_cipher_alg_info_alg_id=e=>(s._vscf_cipher_alg_info_alg_id=Ve.Tb)(e),s._vscf_cipher_alg_info_new=()=>(s._vscf_cipher_alg_info_new=Ve.Ub)(),s._vscf_cipher_alg_info_delete=e=>(s._vscf_cipher_alg_info_delete=Ve.Vb)(e),s._vscf_cipher_alg_info_shallow_copy=e=>(s._vscf_cipher_alg_info_shallow_copy=Ve.Wb)(e),s._vscf_cipher_alg_info_new_with_members=(e,t)=>(s._vscf_cipher_alg_info_new_with_members=Ve.Xb)(e,t),s._vscf_compound_key_alg_setup_defaults=e=>(s._vscf_compound_key_alg_setup_defaults=Ve.Yb)(e),s._vscf_compound_key_alg_make_key=(e,t,_,r)=>(s._vscf_compound_key_alg_make_key=Ve.Zb)(e,t,_,r),s._vscf_compound_key_alg_alg_id=e=>(s._vscf_compound_key_alg_alg_id=Ve._b)(e),s._vscf_compound_key_alg_produce_alg_info=e=>(s._vscf_compound_key_alg_produce_alg_info=Ve.$b)(e),s._vscf_compound_key_alg_restore_alg_info=(e,t)=>(s._vscf_compound_key_alg_restore_alg_info=Ve.ac)(e,t),s._vscf_compound_key_alg_generate_ephemeral_key=(e,t,_)=>(s._vscf_compound_key_alg_generate_ephemeral_key=Ve.bc)(e,t,_),s._vscf_compound_key_alg_import_public_key=(e,t,_)=>(s._vscf_compound_key_alg_import_public_key=Ve.cc)(e,t,_),s._vscf_compound_key_alg_import_public_key_data=(e,t,_,r)=>(s._vscf_compound_key_alg_import_public_key_data=Ve.dc)(e,t,_,r),s._vscf_compound_key_alg_export_public_key=(e,t,_)=>(s._vscf_compound_key_alg_export_public_key=Ve.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=Ve.fc)(e,t),s._vscf_compound_key_alg_export_public_key_data=(e,t,_)=>(s._vscf_compound_key_alg_export_public_key_data=Ve.gc)(e,t,_),s._vscf_compound_key_alg_import_private_key=(e,t,_)=>(s._vscf_compound_key_alg_import_private_key=Ve.hc)(e,t,_),s._vscf_compound_key_alg_import_private_key_data=(e,t,_,r)=>(s._vscf_compound_key_alg_import_private_key_data=Ve.ic)(e,t,_,r),s._vscf_compound_key_alg_export_private_key=(e,t,_)=>(s._vscf_compound_key_alg_export_private_key=Ve.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=Ve.kc)(e,t),s._vscf_compound_key_alg_export_private_key_data=(e,t,_)=>(s._vscf_compound_key_alg_export_private_key_data=Ve.lc)(e,t,_),s._vscf_compound_key_alg_can_encrypt=(e,t,_)=>(s._vscf_compound_key_alg_can_encrypt=Ve.mc)(e,t,_),s._vscf_compound_key_alg_encrypted_len=(e,t,_)=>(s._vscf_compound_key_alg_encrypted_len=Ve.nc)(e,t,_),s._vscf_compound_key_alg_encrypt=(e,t,_,r)=>(s._vscf_compound_key_alg_encrypt=Ve.oc)(e,t,_,r),s._vscf_compound_key_alg_can_decrypt=(e,t,_)=>(s._vscf_compound_key_alg_can_decrypt=Ve.pc)(e,t,_),s._vscf_compound_key_alg_decrypted_len=(e,t,_)=>(s._vscf_compound_key_alg_decrypted_len=Ve.qc)(e,t,_),s._vscf_compound_key_alg_decrypt=(e,t,_,r)=>(s._vscf_compound_key_alg_decrypt=Ve.rc)(e,t,_,r),s._vscf_compound_key_alg_can_sign=(e,t)=>(s._vscf_compound_key_alg_can_sign=Ve.sc)(e,t),s._vscf_compound_key_alg_signature_len=(e,t)=>(s._vscf_compound_key_alg_signature_len=Ve.tc)(e,t),s._vscf_compound_key_alg_sign_hash=(e,t,_,r,n)=>(s._vscf_compound_key_alg_sign_hash=Ve.uc)(e,t,_,r,n),s._vscf_compound_key_alg_can_verify=(e,t)=>(s._vscf_compound_key_alg_can_verify=Ve.vc)(e,t),s._vscf_compound_key_alg_verify_hash=(e,t,_,r,n)=>(s._vscf_compound_key_alg_verify_hash=Ve.wc)(e,t,_,r,n),s._vscf_compound_key_alg_release_random=e=>(s._vscf_compound_key_alg_release_random=Ve.xc)(e),s._vscf_compound_key_alg_new=()=>(s._vscf_compound_key_alg_new=Ve.yc)(),s._vscf_compound_key_alg_delete=e=>(s._vscf_compound_key_alg_delete=Ve.zc)(e),s._vscf_compound_key_alg_shallow_copy=e=>(s._vscf_compound_key_alg_shallow_copy=Ve.Ac)(e),s._vscf_compound_key_alg_use_random=(e,t)=>(s._vscf_compound_key_alg_use_random=Ve.Bc)(e,t),s._vscf_compound_key_alg_info_cipher_alg_info=e=>(s._vscf_compound_key_alg_info_cipher_alg_info=Ve.Cc)(e),s._vscf_compound_key_alg_info_signer_alg_info=e=>(s._vscf_compound_key_alg_info_signer_alg_info=Ve.Dc)(e),s._vscf_compound_key_alg_info_alg_id=e=>(s._vscf_compound_key_alg_info_alg_id=Ve.Ec)(e),s._vscf_compound_key_alg_info_new=()=>(s._vscf_compound_key_alg_info_new=Ve.Fc)(),s._vscf_compound_key_alg_info_delete=e=>(s._vscf_compound_key_alg_info_delete=Ve.Gc)(e),s._vscf_compound_key_alg_info_shallow_copy=e=>(s._vscf_compound_key_alg_info_shallow_copy=Ve.Hc)(e),s._vscf_compound_private_key_cipher_key=e=>(s._vscf_compound_private_key_cipher_key=Ve.Ic)(e),s._vscf_compound_private_key_signer_key=e=>(s._vscf_compound_private_key_signer_key=Ve.Jc)(e),s._vscf_compound_private_key_alg_id=e=>(s._vscf_compound_private_key_alg_id=Ve.Kc)(e),s._vscf_compound_private_key_alg_info=e=>(s._vscf_compound_private_key_alg_info=Ve.Lc)(e),s._vscf_compound_private_key_len=e=>(s._vscf_compound_private_key_len=Ve.Mc)(e),s._vscf_compound_private_key_bitlen=e=>(s._vscf_compound_private_key_bitlen=Ve.Nc)(e),s._vscf_compound_private_key_impl_tag=e=>(s._vscf_compound_private_key_impl_tag=Ve.Oc)(e),s._vscf_compound_private_key_is_valid=e=>(s._vscf_compound_private_key_is_valid=Ve.Pc)(e),s._vscf_compound_private_key_extract_public_key=e=>(s._vscf_compound_private_key_extract_public_key=Ve.Qc)(e),s._vscf_compound_private_key_new=()=>(s._vscf_compound_private_key_new=Ve.Rc)(),s._vscf_compound_private_key_delete=e=>(s._vscf_compound_private_key_delete=Ve.Sc)(e),s._vscf_compound_private_key_shallow_copy=e=>(s._vscf_compound_private_key_shallow_copy=Ve.Tc)(e),s._vscf_compound_public_key_cipher_key=e=>(s._vscf_compound_public_key_cipher_key=Ve.Uc)(e),s._vscf_compound_public_key_signer_key=e=>(s._vscf_compound_public_key_signer_key=Ve.Vc)(e),s._vscf_compound_public_key_alg_id=e=>(s._vscf_compound_public_key_alg_id=Ve.Wc)(e),s._vscf_compound_public_key_alg_info=e=>(s._vscf_compound_public_key_alg_info=Ve.Xc)(e),s._vscf_compound_public_key_len=e=>(s._vscf_compound_public_key_len=Ve.Yc)(e),s._vscf_compound_public_key_bitlen=e=>(s._vscf_compound_public_key_bitlen=Ve.Zc)(e),s._vscf_compound_public_key_impl_tag=e=>(s._vscf_compound_public_key_impl_tag=Ve._c)(e),s._vscf_compound_public_key_is_valid=e=>(s._vscf_compound_public_key_is_valid=Ve.$c)(e),s._vscf_compound_public_key_new=()=>(s._vscf_compound_public_key_new=Ve.ad)(),s._vscf_compound_public_key_delete=e=>(s._vscf_compound_public_key_delete=Ve.bd)(e),s._vscf_compound_public_key_shallow_copy=e=>(s._vscf_compound_public_key_shallow_copy=Ve.cd)(e),s._vscf_ctr_drbg_setup_defaults=e=>(s._vscf_ctr_drbg_setup_defaults=Ve.dd)(e),s._vscf_ctr_drbg_enable_prediction_resistance=e=>(s._vscf_ctr_drbg_enable_prediction_resistance=Ve.ed)(e),s._vscf_ctr_drbg_set_reseed_interval=(e,t)=>(s._vscf_ctr_drbg_set_reseed_interval=Ve.fd)(e,t),s._vscf_ctr_drbg_set_entropy_len=(e,t)=>(s._vscf_ctr_drbg_set_entropy_len=Ve.gd)(e,t),s._vscf_ctr_drbg_random=(e,t,_)=>(s._vscf_ctr_drbg_random=Ve.hd)(e,t,_),s._vscf_ctr_drbg_reseed=e=>(s._vscf_ctr_drbg_reseed=Ve.id)(e),s._vscf_ctr_drbg_release_entropy_source=e=>(s._vscf_ctr_drbg_release_entropy_source=Ve.jd)(e),s._vscf_ctr_drbg_new=()=>(s._vscf_ctr_drbg_new=Ve.kd)(),s._vscf_ctr_drbg_delete=e=>(s._vscf_ctr_drbg_delete=Ve.ld)(e),s._vscf_ctr_drbg_shallow_copy=e=>(s._vscf_ctr_drbg_shallow_copy=Ve.md)(e),s._vscf_ctr_drbg_use_entropy_source=(e,t)=>(s._vscf_ctr_drbg_use_entropy_source=Ve.nd)(e,t),s._vscf_curve25519_setup_defaults=e=>(s._vscf_curve25519_setup_defaults=Ve.od)(e),s._vscf_curve25519_generate_key=(e,t)=>(s._vscf_curve25519_generate_key=Ve.pd)(e,t),s._vscf_curve25519_generate_ephemeral_key=(e,t,_)=>(s._vscf_curve25519_generate_ephemeral_key=Ve.qd)(e,t,_),s._vscf_curve25519_import_public_key=(e,t,_)=>(s._vscf_curve25519_import_public_key=Ve.rd)(e,t,_),s._vscf_curve25519_import_public_key_data=(e,t,_,r)=>(s._vscf_curve25519_import_public_key_data=Ve.sd)(e,t,_,r),s._vscf_curve25519_export_public_key=(e,t,_)=>(s._vscf_curve25519_export_public_key=Ve.td)(e,t,_),s._vscf_curve25519_exported_public_key_data_len=(e,t)=>(s._vscf_curve25519_exported_public_key_data_len=Ve.ud)(e,t),s._vscf_curve25519_export_public_key_data=(e,t,_)=>(s._vscf_curve25519_export_public_key_data=Ve.vd)(e,t,_),s._vscf_curve25519_import_private_key=(e,t,_)=>(s._vscf_curve25519_import_private_key=Ve.wd)(e,t,_),s._vscf_curve25519_import_private_key_data=(e,t,_,r)=>(s._vscf_curve25519_import_private_key_data=Ve.xd)(e,t,_,r),s._vscf_curve25519_export_private_key=(e,t,_)=>(s._vscf_curve25519_export_private_key=Ve.yd)(e,t,_),s._vscf_curve25519_exported_private_key_data_len=(e,t)=>(s._vscf_curve25519_exported_private_key_data_len=Ve.zd)(e,t),s._vscf_curve25519_export_private_key_data=(e,t,_)=>(s._vscf_curve25519_export_private_key_data=Ve.Ad)(e,t,_),s._vscf_curve25519_can_encrypt=(e,t,_)=>(s._vscf_curve25519_can_encrypt=Ve.Bd)(e,t,_),s._vscf_curve25519_encrypted_len=(e,t,_)=>(s._vscf_curve25519_encrypted_len=Ve.Cd)(e,t,_),s._vscf_curve25519_encrypt=(e,t,_,r)=>(s._vscf_curve25519_encrypt=Ve.Dd)(e,t,_,r),s._vscf_curve25519_can_decrypt=(e,t,_)=>(s._vscf_curve25519_can_decrypt=Ve.Ed)(e,t,_),s._vscf_curve25519_decrypted_len=(e,t,_)=>(s._vscf_curve25519_decrypted_len=Ve.Fd)(e,t,_),s._vscf_curve25519_decrypt=(e,t,_,r)=>(s._vscf_curve25519_decrypt=Ve.Gd)(e,t,_,r),s._vscf_curve25519_compute_shared_key=(e,t,_,r)=>(s._vscf_curve25519_compute_shared_key=Ve.Hd)(e,t,_,r),s._vscf_curve25519_shared_key_len=(e,t)=>(s._vscf_curve25519_shared_key_len=Ve.Id)(e,t),s._vscf_curve25519_kem_shared_key_len=(e,t)=>(s._vscf_curve25519_kem_shared_key_len=Ve.Jd)(e,t),s._vscf_curve25519_kem_encapsulated_key_len=(e,t)=>(s._vscf_curve25519_kem_encapsulated_key_len=Ve.Kd)(e,t),s._vscf_curve25519_kem_encapsulate=(e,t,_,r)=>(s._vscf_curve25519_kem_encapsulate=Ve.Ld)(e,t,_,r),s._vscf_curve25519_kem_decapsulate=(e,t,_,r)=>(s._vscf_curve25519_kem_decapsulate=Ve.Md)(e,t,_,r),s._vscf_curve25519_release_random=e=>(s._vscf_curve25519_release_random=Ve.Nd)(e),s._vscf_curve25519_release_ecies=e=>(s._vscf_curve25519_release_ecies=Ve.Od)(e),s._vscf_curve25519_new=()=>(s._vscf_curve25519_new=Ve.Pd)(),s._vscf_curve25519_delete=e=>(s._vscf_curve25519_delete=Ve.Qd)(e),s._vscf_curve25519_shallow_copy=e=>(s._vscf_curve25519_shallow_copy=Ve.Rd)(e),s._vscf_curve25519_use_random=(e,t)=>(s._vscf_curve25519_use_random=Ve.Sd)(e,t),s._vscf_curve25519_use_ecies=(e,t)=>(s._vscf_curve25519_use_ecies=Ve.Td)(e,t),s._vscf_ecc_setup_defaults=e=>(s._vscf_ecc_setup_defaults=Ve.Ud)(e),s._vscf_ecc_generate_key=(e,t,_)=>(s._vscf_ecc_generate_key=Ve.Vd)(e,t,_),s._vscf_ecc_generate_ephemeral_key=(e,t,_)=>(s._vscf_ecc_generate_ephemeral_key=Ve.Wd)(e,t,_),s._vscf_ecc_import_public_key=(e,t,_)=>(s._vscf_ecc_import_public_key=Ve.Xd)(e,t,_),s._vscf_ecc_import_public_key_data=(e,t,_,r)=>(s._vscf_ecc_import_public_key_data=Ve.Yd)(e,t,_,r),s._vscf_ecc_export_public_key=(e,t,_)=>(s._vscf_ecc_export_public_key=Ve.Zd)(e,t,_),s._vscf_ecc_exported_public_key_data_len=(e,t)=>(s._vscf_ecc_exported_public_key_data_len=Ve._d)(e,t),s._vscf_ecc_export_public_key_data=(e,t,_)=>(s._vscf_ecc_export_public_key_data=Ve.$d)(e,t,_),s._vscf_ecc_import_private_key=(e,t,_)=>(s._vscf_ecc_import_private_key=Ve.ae)(e,t,_),s._vscf_ecc_import_private_key_data=(e,t,_,r)=>(s._vscf_ecc_import_private_key_data=Ve.be)(e,t,_,r),s._vscf_ecc_export_private_key=(e,t,_)=>(s._vscf_ecc_export_private_key=Ve.ce)(e,t,_),s._vscf_ecc_exported_private_key_data_len=(e,t)=>(s._vscf_ecc_exported_private_key_data_len=Ve.de)(e,t),s._vscf_ecc_export_private_key_data=(e,t,_)=>(s._vscf_ecc_export_private_key_data=Ve.ee)(e,t,_),s._vscf_ecc_can_encrypt=(e,t,_)=>(s._vscf_ecc_can_encrypt=Ve.fe)(e,t,_),s._vscf_ecc_encrypted_len=(e,t,_)=>(s._vscf_ecc_encrypted_len=Ve.ge)(e,t,_),s._vscf_ecc_encrypt=(e,t,_,r)=>(s._vscf_ecc_encrypt=Ve.he)(e,t,_,r),s._vscf_ecc_can_decrypt=(e,t,_)=>(s._vscf_ecc_can_decrypt=Ve.ie)(e,t,_),s._vscf_ecc_decrypted_len=(e,t,_)=>(s._vscf_ecc_decrypted_len=Ve.je)(e,t,_),s._vscf_ecc_decrypt=(e,t,_,r)=>(s._vscf_ecc_decrypt=Ve.ke)(e,t,_,r),s._vscf_ecc_can_sign=(e,t)=>(s._vscf_ecc_can_sign=Ve.le)(e,t),s._vscf_ecc_signature_len=(e,t)=>(s._vscf_ecc_signature_len=Ve.me)(e,t),s._vscf_ecc_sign_hash=(e,t,_,r,n)=>(s._vscf_ecc_sign_hash=Ve.ne)(e,t,_,r,n),s._vscf_ecc_can_verify=(e,t)=>(s._vscf_ecc_can_verify=Ve.oe)(e,t),s._vscf_ecc_verify_hash=(e,t,_,r,n)=>(s._vscf_ecc_verify_hash=Ve.pe)(e,t,_,r,n),s._vscf_ecc_compute_shared_key=(e,t,_,r)=>(s._vscf_ecc_compute_shared_key=Ve.qe)(e,t,_,r),s._vscf_ecc_shared_key_len=(e,t)=>(s._vscf_ecc_shared_key_len=Ve.re)(e,t),s._vscf_ecc_kem_shared_key_len=(e,t)=>(s._vscf_ecc_kem_shared_key_len=Ve.se)(e,t),s._vscf_ecc_kem_encapsulated_key_len=(e,t)=>(s._vscf_ecc_kem_encapsulated_key_len=Ve.te)(e,t),s._vscf_ecc_kem_encapsulate=(e,t,_,r)=>(s._vscf_ecc_kem_encapsulate=Ve.ue)(e,t,_,r),s._vscf_ecc_kem_decapsulate=(e,t,_,r)=>(s._vscf_ecc_kem_decapsulate=Ve.ve)(e,t,_,r),s._vscf_ecc_release_random=e=>(s._vscf_ecc_release_random=Ve.we)(e),s._vscf_ecc_release_ecies=e=>(s._vscf_ecc_release_ecies=Ve.xe)(e),s._vscf_ecc_new=()=>(s._vscf_ecc_new=Ve.ye)(),s._vscf_ecc_delete=e=>(s._vscf_ecc_delete=Ve.ze)(e),s._vscf_ecc_shallow_copy=e=>(s._vscf_ecc_shallow_copy=Ve.Ae)(e),s._vscf_ecc_use_random=(e,t)=>(s._vscf_ecc_use_random=Ve.Be)(e,t),s._vscf_ecc_use_ecies=(e,t)=>(s._vscf_ecc_use_ecies=Ve.Ce)(e,t),s._vscf_ecc_alg_info_key_id=e=>(s._vscf_ecc_alg_info_key_id=Ve.De)(e),s._vscf_ecc_alg_info_domain_id=e=>(s._vscf_ecc_alg_info_domain_id=Ve.Ee)(e),s._vscf_ecc_alg_info_alg_id=e=>(s._vscf_ecc_alg_info_alg_id=Ve.Fe)(e),s._vscf_ecc_alg_info_new=()=>(s._vscf_ecc_alg_info_new=Ve.Ge)(),s._vscf_ecc_alg_info_delete=e=>(s._vscf_ecc_alg_info_delete=Ve.He)(e),s._vscf_ecc_alg_info_shallow_copy=e=>(s._vscf_ecc_alg_info_shallow_copy=Ve.Ie)(e),s._vscf_ecc_alg_info_new_with_members=(e,t,_)=>(s._vscf_ecc_alg_info_new_with_members=Ve.Je)(e,t,_),s._vscf_ecc_private_key_alg_id=e=>(s._vscf_ecc_private_key_alg_id=Ve.Ke)(e),s._vscf_ecc_private_key_alg_info=e=>(s._vscf_ecc_private_key_alg_info=Ve.Le)(e),s._vscf_ecc_private_key_len=e=>(s._vscf_ecc_private_key_len=Ve.Me)(e),s._vscf_ecc_private_key_bitlen=e=>(s._vscf_ecc_private_key_bitlen=Ve.Ne)(e),s._vscf_ecc_private_key_impl_tag=e=>(s._vscf_ecc_private_key_impl_tag=Ve.Oe)(e),s._vscf_ecc_private_key_is_valid=e=>(s._vscf_ecc_private_key_is_valid=Ve.Pe)(e),s._vscf_ecc_private_key_extract_public_key=e=>(s._vscf_ecc_private_key_extract_public_key=Ve.Qe)(e),s._vscf_ecc_private_key_new=()=>(s._vscf_ecc_private_key_new=Ve.Re)(),s._vscf_ecc_private_key_delete=e=>(s._vscf_ecc_private_key_delete=Ve.Se)(e),s._vscf_ecc_private_key_shallow_copy=e=>(s._vscf_ecc_private_key_shallow_copy=Ve.Te)(e),s._vscf_ecc_public_key_alg_id=e=>(s._vscf_ecc_public_key_alg_id=Ve.Ue)(e),s._vscf_ecc_public_key_alg_info=e=>(s._vscf_ecc_public_key_alg_info=Ve.Ve)(e),s._vscf_ecc_public_key_len=e=>(s._vscf_ecc_public_key_len=Ve.We)(e),s._vscf_ecc_public_key_bitlen=e=>(s._vscf_ecc_public_key_bitlen=Ve.Xe)(e),s._vscf_ecc_public_key_impl_tag=e=>(s._vscf_ecc_public_key_impl_tag=Ve.Ye)(e),s._vscf_ecc_public_key_is_valid=e=>(s._vscf_ecc_public_key_is_valid=Ve.Ze)(e),s._vscf_ecc_public_key_new=()=>(s._vscf_ecc_public_key_new=Ve._e)(),s._vscf_ecc_public_key_delete=e=>(s._vscf_ecc_public_key_delete=Ve.$e)(e),s._vscf_ecc_public_key_shallow_copy=e=>(s._vscf_ecc_public_key_shallow_copy=Ve.af)(e),s._vscf_ed25519_setup_defaults=e=>(s._vscf_ed25519_setup_defaults=Ve.bf)(e),s._vscf_ed25519_generate_key=(e,t)=>(s._vscf_ed25519_generate_key=Ve.cf)(e,t),s._vscf_ed25519_generate_ephemeral_key=(e,t,_)=>(s._vscf_ed25519_generate_ephemeral_key=Ve.df)(e,t,_),s._vscf_ed25519_import_public_key=(e,t,_)=>(s._vscf_ed25519_import_public_key=Ve.ef)(e,t,_),s._vscf_ed25519_import_public_key_data=(e,t,_,r)=>(s._vscf_ed25519_import_public_key_data=Ve.ff)(e,t,_,r),s._vscf_ed25519_export_public_key=(e,t,_)=>(s._vscf_ed25519_export_public_key=Ve.gf)(e,t,_),s._vscf_ed25519_exported_public_key_data_len=(e,t)=>(s._vscf_ed25519_exported_public_key_data_len=Ve.hf)(e,t),s._vscf_ed25519_export_public_key_data=(e,t,_)=>(s._vscf_ed25519_export_public_key_data=Ve.jf)(e,t,_),s._vscf_ed25519_import_private_key=(e,t,_)=>(s._vscf_ed25519_import_private_key=Ve.kf)(e,t,_),s._vscf_ed25519_import_private_key_data=(e,t,_,r)=>(s._vscf_ed25519_import_private_key_data=Ve.lf)(e,t,_,r),s._vscf_ed25519_export_private_key=(e,t,_)=>(s._vscf_ed25519_export_private_key=Ve.mf)(e,t,_),s._vscf_ed25519_exported_private_key_data_len=(e,t)=>(s._vscf_ed25519_exported_private_key_data_len=Ve.nf)(e,t),s._vscf_ed25519_export_private_key_data=(e,t,_)=>(s._vscf_ed25519_export_private_key_data=Ve.of)(e,t,_),s._vscf_ed25519_can_encrypt=(e,t,_)=>(s._vscf_ed25519_can_encrypt=Ve.pf)(e,t,_),s._vscf_ed25519_encrypted_len=(e,t,_)=>(s._vscf_ed25519_encrypted_len=Ve.qf)(e,t,_),s._vscf_ed25519_encrypt=(e,t,_,r)=>(s._vscf_ed25519_encrypt=Ve.rf)(e,t,_,r),s._vscf_ed25519_can_decrypt=(e,t,_)=>(s._vscf_ed25519_can_decrypt=Ve.sf)(e,t,_),s._vscf_ed25519_decrypted_len=(e,t,_)=>(s._vscf_ed25519_decrypted_len=Ve.tf)(e,t,_),s._vscf_ed25519_decrypt=(e,t,_,r)=>(s._vscf_ed25519_decrypt=Ve.uf)(e,t,_,r),s._vscf_ed25519_can_sign=(e,t)=>(s._vscf_ed25519_can_sign=Ve.vf)(e,t),s._vscf_ed25519_signature_len=(e,t)=>(s._vscf_ed25519_signature_len=Ve.wf)(e,t),s._vscf_ed25519_sign_hash=(e,t,_,r,n)=>(s._vscf_ed25519_sign_hash=Ve.xf)(e,t,_,r,n),s._vscf_ed25519_can_verify=(e,t)=>(s._vscf_ed25519_can_verify=Ve.yf)(e,t),s._vscf_ed25519_verify_hash=(e,t,_,r,n)=>(s._vscf_ed25519_verify_hash=Ve.zf)(e,t,_,r,n),s._vscf_ed25519_compute_shared_key=(e,t,_,r)=>(s._vscf_ed25519_compute_shared_key=Ve.Af)(e,t,_,r),s._vscf_ed25519_shared_key_len=(e,t)=>(s._vscf_ed25519_shared_key_len=Ve.Bf)(e,t),s._vscf_ed25519_kem_shared_key_len=(e,t)=>(s._vscf_ed25519_kem_shared_key_len=Ve.Cf)(e,t),s._vscf_ed25519_kem_encapsulated_key_len=(e,t)=>(s._vscf_ed25519_kem_encapsulated_key_len=Ve.Df)(e,t),s._vscf_ed25519_kem_encapsulate=(e,t,_,r)=>(s._vscf_ed25519_kem_encapsulate=Ve.Ef)(e,t,_,r),s._vscf_ed25519_kem_decapsulate=(e,t,_,r)=>(s._vscf_ed25519_kem_decapsulate=Ve.Ff)(e,t,_,r),s._vscf_ed25519_release_random=e=>(s._vscf_ed25519_release_random=Ve.Gf)(e),s._vscf_ed25519_release_ecies=e=>(s._vscf_ed25519_release_ecies=Ve.Hf)(e),s._vscf_ed25519_new=()=>(s._vscf_ed25519_new=Ve.If)(),s._vscf_ed25519_delete=e=>(s._vscf_ed25519_delete=Ve.Jf)(e),s._vscf_ed25519_shallow_copy=e=>(s._vscf_ed25519_shallow_copy=Ve.Kf)(e),s._vscf_ed25519_use_random=(e,t)=>(s._vscf_ed25519_use_random=Ve.Lf)(e,t),s._vscf_ed25519_use_ecies=(e,t)=>(s._vscf_ed25519_use_ecies=Ve.Mf)(e,t),s._vscf_entropy_accumulator_setup_defaults=e=>(s._vscf_entropy_accumulator_setup_defaults=Ve.Nf)(e),s._vscf_entropy_accumulator_add_source=(e,t,_)=>(s._vscf_entropy_accumulator_add_source=Ve.Of)(e,t,_),s._vscf_entropy_accumulator_is_strong=e=>(s._vscf_entropy_accumulator_is_strong=Ve.Pf)(e),s._vscf_entropy_accumulator_gather=(e,t,_)=>(s._vscf_entropy_accumulator_gather=Ve.Qf)(e,t,_),s._vscf_entropy_accumulator_new=()=>(s._vscf_entropy_accumulator_new=Ve.Rf)(),s._vscf_entropy_accumulator_delete=e=>(s._vscf_entropy_accumulator_delete=Ve.Sf)(e),s._vscf_entropy_accumulator_shallow_copy=e=>(s._vscf_entropy_accumulator_shallow_copy=Ve.Tf)(e),s._vscf_fake_random_setup_source_byte=(e,t)=>(s._vscf_fake_random_setup_source_byte=Ve.Uf)(e,t),s._vscf_fake_random_setup_source_data=(e,t)=>(s._vscf_fake_random_setup_source_data=Ve.Vf)(e,t),s._vscf_fake_random_random=(e,t,_)=>(s._vscf_fake_random_random=Ve.Wf)(e,t,_),s._vscf_fake_random_reseed=e=>(s._vscf_fake_random_reseed=Ve.Xf)(e),s._vscf_fake_random_is_strong=e=>(s._vscf_fake_random_is_strong=Ve.Yf)(e),s._vscf_fake_random_gather=(e,t,_)=>(s._vscf_fake_random_gather=Ve.Zf)(e,t,_),s._vscf_fake_random_new=()=>(s._vscf_fake_random_new=Ve._f)(),s._vscf_fake_random_delete=e=>(s._vscf_fake_random_delete=Ve.$f)(e),s._vscf_fake_random_shallow_copy=e=>(s._vscf_fake_random_shallow_copy=Ve.ag)(e),s._vscf_falcon_setup_defaults=e=>(s._vscf_falcon_setup_defaults=Ve.bg)(e),s._vscf_falcon_generate_key=(e,t)=>(s._vscf_falcon_generate_key=Ve.cg)(e,t),s._vscf_falcon_produce_alg_info=e=>(s._vscf_falcon_produce_alg_info=Ve.dg)(e),s._vscf_falcon_alg_id=e=>(s._vscf_falcon_alg_id=Ve.eg)(e),s._vscf_falcon_restore_alg_info=(e,t)=>(s._vscf_falcon_restore_alg_info=Ve.fg)(e,t),s._vscf_falcon_generate_ephemeral_key=(e,t,_)=>(s._vscf_falcon_generate_ephemeral_key=Ve.gg)(e,t,_),s._vscf_falcon_import_public_key=(e,t,_)=>(s._vscf_falcon_import_public_key=Ve.hg)(e,t,_),s._vscf_falcon_import_public_key_data=(e,t,_,r)=>(s._vscf_falcon_import_public_key_data=Ve.ig)(e,t,_,r),s._vscf_falcon_export_public_key=(e,t,_)=>(s._vscf_falcon_export_public_key=Ve.jg)(e,t,_),s._vscf_falcon_exported_public_key_data_len=(e,t)=>(s._vscf_falcon_exported_public_key_data_len=Ve.kg)(e,t),s._vscf_falcon_export_public_key_data=(e,t,_)=>(s._vscf_falcon_export_public_key_data=Ve.lg)(e,t,_),s._vscf_falcon_import_private_key=(e,t,_)=>(s._vscf_falcon_import_private_key=Ve.mg)(e,t,_),s._vscf_falcon_import_private_key_data=(e,t,_,r)=>(s._vscf_falcon_import_private_key_data=Ve.ng)(e,t,_,r),s._vscf_falcon_export_private_key=(e,t,_)=>(s._vscf_falcon_export_private_key=Ve.og)(e,t,_),s._vscf_falcon_exported_private_key_data_len=(e,t)=>(s._vscf_falcon_exported_private_key_data_len=Ve.pg)(e,t),s._vscf_falcon_export_private_key_data=(e,t,_)=>(s._vscf_falcon_export_private_key_data=Ve.qg)(e,t,_),s._vscf_falcon_can_sign=(e,t)=>(s._vscf_falcon_can_sign=Ve.rg)(e,t),s._vscf_falcon_signature_len=(e,t)=>(s._vscf_falcon_signature_len=Ve.sg)(e,t),s._vscf_falcon_sign_hash=(e,t,_,r,n)=>(s._vscf_falcon_sign_hash=Ve.tg)(e,t,_,r,n),s._vscf_falcon_can_verify=(e,t)=>(s._vscf_falcon_can_verify=Ve.ug)(e,t),s._vscf_falcon_verify_hash=(e,t,_,r,n)=>(s._vscf_falcon_verify_hash=Ve.vg)(e,t,_,r,n),s._vscf_falcon_release_random=e=>(s._vscf_falcon_release_random=Ve.wg)(e),s._vscf_falcon_new=()=>(s._vscf_falcon_new=Ve.xg)(),s._vscf_falcon_delete=e=>(s._vscf_falcon_delete=Ve.yg)(e),s._vscf_falcon_shallow_copy=e=>(s._vscf_falcon_shallow_copy=Ve.zg)(e),s._vscf_falcon_use_random=(e,t)=>(s._vscf_falcon_use_random=Ve.Ag)(e,t),s._vscf_hash_based_alg_info_hash_alg_info=e=>(s._vscf_hash_based_alg_info_hash_alg_info=Ve.Bg)(e),s._vscf_hash_based_alg_info_alg_id=e=>(s._vscf_hash_based_alg_info_alg_id=Ve.Cg)(e),s._vscf_hash_based_alg_info_new=()=>(s._vscf_hash_based_alg_info_new=Ve.Dg)(),s._vscf_hash_based_alg_info_delete=e=>(s._vscf_hash_based_alg_info_delete=Ve.Eg)(e),s._vscf_hash_based_alg_info_shallow_copy=e=>(s._vscf_hash_based_alg_info_shallow_copy=Ve.Fg)(e),s._vscf_hkdf_alg_id=e=>(s._vscf_hkdf_alg_id=Ve.Gg)(e),s._vscf_hkdf_produce_alg_info=e=>(s._vscf_hkdf_produce_alg_info=Ve.Hg)(e),s._vscf_hkdf_restore_alg_info=(e,t)=>(s._vscf_hkdf_restore_alg_info=Ve.Ig)(e,t),s._vscf_hkdf_derive=(e,t,_,r)=>(s._vscf_hkdf_derive=Ve.Jg)(e,t,_,r),s._vscf_hkdf_reset=(e,t,_)=>(s._vscf_hkdf_reset=Ve.Kg)(e,t,_),s._vscf_hkdf_set_info=(e,t)=>(s._vscf_hkdf_set_info=Ve.Lg)(e,t),s._vscf_hkdf_release_hash=e=>(s._vscf_hkdf_release_hash=Ve.Mg)(e),s._vscf_hkdf_new=()=>(s._vscf_hkdf_new=Ve.Ng)(),s._vscf_hkdf_delete=e=>(s._vscf_hkdf_delete=Ve.Og)(e),s._vscf_hkdf_shallow_copy=e=>(s._vscf_hkdf_shallow_copy=Ve.Pg)(e),s._vscf_hkdf_use_hash=(e,t)=>(s._vscf_hkdf_use_hash=Ve.Qg)(e,t),s._vscf_hmac_alg_id=e=>(s._vscf_hmac_alg_id=Ve.Rg)(e),s._vscf_hmac_produce_alg_info=e=>(s._vscf_hmac_produce_alg_info=Ve.Sg)(e),s._vscf_hmac_restore_alg_info=(e,t)=>(s._vscf_hmac_restore_alg_info=Ve.Tg)(e,t),s._vscf_hmac_digest_len=e=>(s._vscf_hmac_digest_len=Ve.Ug)(e),s._vscf_hmac_mac=(e,t,_,r)=>(s._vscf_hmac_mac=Ve.Vg)(e,t,_,r),s._vscf_hmac_start=(e,t)=>(s._vscf_hmac_start=Ve.Wg)(e,t),s._vscf_hmac_finish=(e,t)=>(s._vscf_hmac_finish=Ve.Xg)(e,t),s._vscf_hmac_update=(e,t)=>(s._vscf_hmac_update=Ve.Yg)(e,t),s._vscf_hmac_reset=e=>(s._vscf_hmac_reset=Ve.Zg)(e),s._vscf_hmac_release_hash=e=>(s._vscf_hmac_release_hash=Ve._g)(e),s._vscf_hmac_new=()=>(s._vscf_hmac_new=Ve.$g)(),s._vscf_hmac_delete=e=>(s._vscf_hmac_delete=Ve.ah)(e),s._vscf_hmac_shallow_copy=e=>(s._vscf_hmac_shallow_copy=Ve.bh)(e),s._vscf_hmac_use_hash=(e,t)=>(s._vscf_hmac_use_hash=Ve.ch)(e,t),s._vscf_hybrid_key_alg_setup_defaults=e=>(s._vscf_hybrid_key_alg_setup_defaults=Ve.dh)(e),s._vscf_hybrid_key_alg_make_key=(e,t,_,r)=>(s._vscf_hybrid_key_alg_make_key=Ve.eh)(e,t,_,r),s._vscf_hybrid_key_alg_generate_ephemeral_key=(e,t,_)=>(s._vscf_hybrid_key_alg_generate_ephemeral_key=Ve.fh)(e,t,_),s._vscf_hybrid_key_alg_import_public_key=(e,t,_)=>(s._vscf_hybrid_key_alg_import_public_key=Ve.gh)(e,t,_),s._vscf_hybrid_key_alg_import_public_key_data=(e,t,_,r)=>(s._vscf_hybrid_key_alg_import_public_key_data=Ve.hh)(e,t,_,r),s._vscf_hybrid_key_alg_export_public_key=(e,t,_)=>(s._vscf_hybrid_key_alg_export_public_key=Ve.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=Ve.jh)(e,t),s._vscf_hybrid_key_alg_export_public_key_data=(e,t,_)=>(s._vscf_hybrid_key_alg_export_public_key_data=Ve.kh)(e,t,_),s._vscf_hybrid_key_alg_import_private_key=(e,t,_)=>(s._vscf_hybrid_key_alg_import_private_key=Ve.lh)(e,t,_),s._vscf_hybrid_key_alg_import_private_key_data=(e,t,_,r)=>(s._vscf_hybrid_key_alg_import_private_key_data=Ve.mh)(e,t,_,r),s._vscf_hybrid_key_alg_export_private_key=(e,t,_)=>(s._vscf_hybrid_key_alg_export_private_key=Ve.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=Ve.oh)(e,t),s._vscf_hybrid_key_alg_export_private_key_data=(e,t,_)=>(s._vscf_hybrid_key_alg_export_private_key_data=Ve.ph)(e,t,_),s._vscf_hybrid_key_alg_can_encrypt=(e,t,_)=>(s._vscf_hybrid_key_alg_can_encrypt=Ve.qh)(e,t,_),s._vscf_hybrid_key_alg_encrypted_len=(e,t,_)=>(s._vscf_hybrid_key_alg_encrypted_len=Ve.rh)(e,t,_),s._vscf_hybrid_key_alg_encrypt=(e,t,_,r)=>(s._vscf_hybrid_key_alg_encrypt=Ve.sh)(e,t,_,r),s._vscf_hybrid_key_alg_can_decrypt=(e,t,_)=>(s._vscf_hybrid_key_alg_can_decrypt=Ve.th)(e,t,_),s._vscf_hybrid_key_alg_decrypted_len=(e,t,_)=>(s._vscf_hybrid_key_alg_decrypted_len=Ve.uh)(e,t,_),s._vscf_hybrid_key_alg_decrypt=(e,t,_,r)=>(s._vscf_hybrid_key_alg_decrypt=Ve.vh)(e,t,_,r),s._vscf_hybrid_key_alg_can_sign=(e,t)=>(s._vscf_hybrid_key_alg_can_sign=Ve.wh)(e,t),s._vscf_hybrid_key_alg_signature_len=(e,t)=>(s._vscf_hybrid_key_alg_signature_len=Ve.xh)(e,t),s._vscf_hybrid_key_alg_sign_hash=(e,t,_,r,n)=>(s._vscf_hybrid_key_alg_sign_hash=Ve.yh)(e,t,_,r,n),s._vscf_hybrid_key_alg_can_verify=(e,t)=>(s._vscf_hybrid_key_alg_can_verify=Ve.zh)(e,t),s._vscf_hybrid_key_alg_verify_hash=(e,t,_,r,n)=>(s._vscf_hybrid_key_alg_verify_hash=Ve.Ah)(e,t,_,r,n),s._vscf_hybrid_key_alg_release_random=e=>(s._vscf_hybrid_key_alg_release_random=Ve.Bh)(e),s._vscf_hybrid_key_alg_release_cipher=e=>(s._vscf_hybrid_key_alg_release_cipher=Ve.Ch)(e),s._vscf_hybrid_key_alg_release_hash=e=>(s._vscf_hybrid_key_alg_release_hash=Ve.Dh)(e),s._vscf_hybrid_key_alg_new=()=>(s._vscf_hybrid_key_alg_new=Ve.Eh)(),s._vscf_hybrid_key_alg_delete=e=>(s._vscf_hybrid_key_alg_delete=Ve.Fh)(e),s._vscf_hybrid_key_alg_shallow_copy=e=>(s._vscf_hybrid_key_alg_shallow_copy=Ve.Gh)(e),s._vscf_hybrid_key_alg_use_random=(e,t)=>(s._vscf_hybrid_key_alg_use_random=Ve.Hh)(e,t),s._vscf_hybrid_key_alg_use_cipher=(e,t)=>(s._vscf_hybrid_key_alg_use_cipher=Ve.Ih)(e,t),s._vscf_hybrid_key_alg_use_hash=(e,t)=>(s._vscf_hybrid_key_alg_use_hash=Ve.Jh)(e,t),s._vscf_hybrid_key_alg_info_first_key_alg_info=e=>(s._vscf_hybrid_key_alg_info_first_key_alg_info=Ve.Kh)(e),s._vscf_hybrid_key_alg_info_second_key_alg_info=e=>(s._vscf_hybrid_key_alg_info_second_key_alg_info=Ve.Lh)(e),s._vscf_hybrid_key_alg_info_alg_id=e=>(s._vscf_hybrid_key_alg_info_alg_id=Ve.Mh)(e),s._vscf_hybrid_key_alg_info_new=()=>(s._vscf_hybrid_key_alg_info_new=Ve.Nh)(),s._vscf_hybrid_key_alg_info_delete=e=>(s._vscf_hybrid_key_alg_info_delete=Ve.Oh)(e),s._vscf_hybrid_key_alg_info_shallow_copy=e=>(s._vscf_hybrid_key_alg_info_shallow_copy=Ve.Ph)(e),s._vscf_hybrid_private_key_first_key=e=>(s._vscf_hybrid_private_key_first_key=Ve.Qh)(e),s._vscf_hybrid_private_key_second_key=e=>(s._vscf_hybrid_private_key_second_key=Ve.Rh)(e),s._vscf_hybrid_private_key_alg_id=e=>(s._vscf_hybrid_private_key_alg_id=Ve.Sh)(e),s._vscf_hybrid_private_key_alg_info=e=>(s._vscf_hybrid_private_key_alg_info=Ve.Th)(e),s._vscf_hybrid_private_key_len=e=>(s._vscf_hybrid_private_key_len=Ve.Uh)(e),s._vscf_hybrid_private_key_bitlen=e=>(s._vscf_hybrid_private_key_bitlen=Ve.Vh)(e),s._vscf_hybrid_private_key_impl_tag=e=>(s._vscf_hybrid_private_key_impl_tag=Ve.Wh)(e),s._vscf_hybrid_private_key_is_valid=e=>(s._vscf_hybrid_private_key_is_valid=Ve.Xh)(e),s._vscf_hybrid_private_key_extract_public_key=e=>(s._vscf_hybrid_private_key_extract_public_key=Ve.Yh)(e),s._vscf_hybrid_private_key_new=()=>(s._vscf_hybrid_private_key_new=Ve.Zh)(),s._vscf_hybrid_private_key_delete=e=>(s._vscf_hybrid_private_key_delete=Ve._h)(e),s._vscf_hybrid_private_key_shallow_copy=e=>(s._vscf_hybrid_private_key_shallow_copy=Ve.$h)(e),s._vscf_hybrid_public_key_first_key=e=>(s._vscf_hybrid_public_key_first_key=Ve.ai)(e),s._vscf_hybrid_public_key_second_key=e=>(s._vscf_hybrid_public_key_second_key=Ve.bi)(e),s._vscf_hybrid_public_key_alg_id=e=>(s._vscf_hybrid_public_key_alg_id=Ve.ci)(e),s._vscf_hybrid_public_key_alg_info=e=>(s._vscf_hybrid_public_key_alg_info=Ve.di)(e),s._vscf_hybrid_public_key_len=e=>(s._vscf_hybrid_public_key_len=Ve.ei)(e),s._vscf_hybrid_public_key_bitlen=e=>(s._vscf_hybrid_public_key_bitlen=Ve.fi)(e),s._vscf_hybrid_public_key_impl_tag=e=>(s._vscf_hybrid_public_key_impl_tag=Ve.gi)(e),s._vscf_hybrid_public_key_is_valid=e=>(s._vscf_hybrid_public_key_is_valid=Ve.hi)(e),s._vscf_hybrid_public_key_new=()=>(s._vscf_hybrid_public_key_new=Ve.ii)(),s._vscf_hybrid_public_key_delete=e=>(s._vscf_hybrid_public_key_delete=Ve.ji)(e),s._vscf_hybrid_public_key_shallow_copy=e=>(s._vscf_hybrid_public_key_shallow_copy=Ve.ki)(e),s._vscf_kdf1_alg_id=e=>(s._vscf_kdf1_alg_id=Ve.li)(e),s._vscf_kdf1_produce_alg_info=e=>(s._vscf_kdf1_produce_alg_info=Ve.mi)(e),s._vscf_kdf1_restore_alg_info=(e,t)=>(s._vscf_kdf1_restore_alg_info=Ve.ni)(e,t),s._vscf_kdf1_derive=(e,t,_,r)=>(s._vscf_kdf1_derive=Ve.oi)(e,t,_,r),s._vscf_kdf1_release_hash=e=>(s._vscf_kdf1_release_hash=Ve.pi)(e),s._vscf_kdf1_new=()=>(s._vscf_kdf1_new=Ve.qi)(),s._vscf_kdf1_delete=e=>(s._vscf_kdf1_delete=Ve.ri)(e),s._vscf_kdf1_shallow_copy=e=>(s._vscf_kdf1_shallow_copy=Ve.si)(e),s._vscf_kdf1_use_hash=(e,t)=>(s._vscf_kdf1_use_hash=Ve.ti)(e,t),s._vscf_kdf2_alg_id=e=>(s._vscf_kdf2_alg_id=Ve.ui)(e),s._vscf_kdf2_produce_alg_info=e=>(s._vscf_kdf2_produce_alg_info=Ve.vi)(e),s._vscf_kdf2_restore_alg_info=(e,t)=>(s._vscf_kdf2_restore_alg_info=Ve.wi)(e,t),s._vscf_kdf2_derive=(e,t,_,r)=>(s._vscf_kdf2_derive=Ve.xi)(e,t,_,r),s._vscf_kdf2_release_hash=e=>(s._vscf_kdf2_release_hash=Ve.yi)(e),s._vscf_kdf2_new=()=>(s._vscf_kdf2_new=Ve.zi)(),s._vscf_kdf2_delete=e=>(s._vscf_kdf2_delete=Ve.Ai)(e),s._vscf_kdf2_shallow_copy=e=>(s._vscf_kdf2_shallow_copy=Ve.Bi)(e),s._vscf_kdf2_use_hash=(e,t)=>(s._vscf_kdf2_use_hash=Ve.Ci)(e,t),s._vscf_key_asn1_deserializer_setup_defaults=e=>(s._vscf_key_asn1_deserializer_setup_defaults=Ve.Di)(e),s._vscf_key_asn1_deserializer_deserialize_public_key_inplace=(e,t)=>(s._vscf_key_asn1_deserializer_deserialize_public_key_inplace=Ve.Ei)(e,t),s._vscf_key_asn1_deserializer_deserialize_private_key_inplace=(e,t)=>(s._vscf_key_asn1_deserializer_deserialize_private_key_inplace=Ve.Fi)(e,t),s._vscf_key_asn1_deserializer_deserialize_public_key=(e,t,_)=>(s._vscf_key_asn1_deserializer_deserialize_public_key=Ve.Gi)(e,t,_),s._vscf_key_asn1_deserializer_deserialize_private_key=(e,t,_)=>(s._vscf_key_asn1_deserializer_deserialize_private_key=Ve.Hi)(e,t,_),s._vscf_key_asn1_deserializer_release_asn1_reader=e=>(s._vscf_key_asn1_deserializer_release_asn1_reader=Ve.Ii)(e),s._vscf_key_asn1_deserializer_new=()=>(s._vscf_key_asn1_deserializer_new=Ve.Ji)(),s._vscf_key_asn1_deserializer_delete=e=>(s._vscf_key_asn1_deserializer_delete=Ve.Ki)(e),s._vscf_key_asn1_deserializer_shallow_copy=e=>(s._vscf_key_asn1_deserializer_shallow_copy=Ve.Li)(e),s._vscf_key_asn1_deserializer_use_asn1_reader=(e,t)=>(s._vscf_key_asn1_deserializer_use_asn1_reader=Ve.Mi)(e,t),s._vscf_key_asn1_serializer_setup_defaults=e=>(s._vscf_key_asn1_serializer_setup_defaults=Ve.Ni)(e),s._vscf_key_asn1_serializer_serialize_public_key_inplace=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_public_key_inplace=Ve.Oi)(e,t,_),s._vscf_key_asn1_serializer_serialized_public_key_len=(e,t)=>(s._vscf_key_asn1_serializer_serialized_public_key_len=Ve.Pi)(e,t),s._vscf_key_asn1_serializer_serialize_private_key_inplace=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_private_key_inplace=Ve.Qi)(e,t,_),s._vscf_key_asn1_serializer_serialized_private_key_len=(e,t)=>(s._vscf_key_asn1_serializer_serialized_private_key_len=Ve.Ri)(e,t),s._vscf_key_asn1_serializer_serialize_public_key=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_public_key=Ve.Si)(e,t,_),s._vscf_key_asn1_serializer_serialize_private_key=(e,t,_)=>(s._vscf_key_asn1_serializer_serialize_private_key=Ve.Ti)(e,t,_),s._vscf_key_asn1_serializer_release_asn1_writer=e=>(s._vscf_key_asn1_serializer_release_asn1_writer=Ve.Ui)(e),s._vscf_key_asn1_serializer_new=()=>(s._vscf_key_asn1_serializer_new=Ve.Vi)(),s._vscf_key_asn1_serializer_delete=e=>(s._vscf_key_asn1_serializer_delete=Ve.Wi)(e),s._vscf_key_asn1_serializer_shallow_copy=e=>(s._vscf_key_asn1_serializer_shallow_copy=Ve.Xi)(e),s._vscf_key_asn1_serializer_use_asn1_writer=(e,t)=>(s._vscf_key_asn1_serializer_use_asn1_writer=Ve.Yi)(e,t),s._vscf_key_material_rng_reset_key_material=(e,t)=>(s._vscf_key_material_rng_reset_key_material=Ve.Zi)(e,t),s._vscf_key_material_rng_random=(e,t,_)=>(s._vscf_key_material_rng_random=Ve._i)(e,t,_),s._vscf_key_material_rng_reseed=e=>(s._vscf_key_material_rng_reseed=Ve.$i)(e),s._vscf_key_material_rng_new=()=>(s._vscf_key_material_rng_new=Ve.aj)(),s._vscf_key_material_rng_delete=e=>(s._vscf_key_material_rng_delete=Ve.bj)(e),s._vscf_key_material_rng_shallow_copy=e=>(s._vscf_key_material_rng_shallow_copy=Ve.cj)(e),s._vscf_message_info_der_serializer_setup_defaults=e=>(s._vscf_message_info_der_serializer_setup_defaults=Ve.dj)(e),s._vscf_message_info_der_serializer_serialized_len=(e,t)=>(s._vscf_message_info_der_serializer_serialized_len=Ve.ej)(e,t),s._vscf_message_info_der_serializer_serialize=(e,t,_)=>(s._vscf_message_info_der_serializer_serialize=Ve.fj)(e,t,_),s._vscf_message_info_der_serializer_read_prefix=(e,t)=>(s._vscf_message_info_der_serializer_read_prefix=Ve.gj)(e,t),s._vscf_message_info_der_serializer_deserialize=(e,t,_)=>(s._vscf_message_info_der_serializer_deserialize=Ve.hj)(e,t,_),s._vscf_message_info_der_serializer_serialized_footer_len=(e,t)=>(s._vscf_message_info_der_serializer_serialized_footer_len=Ve.ij)(e,t),s._vscf_message_info_der_serializer_serialize_footer=(e,t,_)=>(s._vscf_message_info_der_serializer_serialize_footer=Ve.jj)(e,t,_),s._vscf_message_info_der_serializer_deserialize_footer=(e,t,_)=>(s._vscf_message_info_der_serializer_deserialize_footer=Ve.kj)(e,t,_),s._vscf_message_info_der_serializer_release_asn1_reader=e=>(s._vscf_message_info_der_serializer_release_asn1_reader=Ve.lj)(e),s._vscf_message_info_der_serializer_release_asn1_writer=e=>(s._vscf_message_info_der_serializer_release_asn1_writer=Ve.mj)(e),s._vscf_message_info_der_serializer_new=()=>(s._vscf_message_info_der_serializer_new=Ve.nj)(),s._vscf_message_info_der_serializer_delete=e=>(s._vscf_message_info_der_serializer_delete=Ve.oj)(e),s._vscf_message_info_der_serializer_shallow_copy=e=>(s._vscf_message_info_der_serializer_shallow_copy=Ve.pj)(e),s._vscf_message_info_der_serializer_use_asn1_reader=(e,t)=>(s._vscf_message_info_der_serializer_use_asn1_reader=Ve.qj)(e,t),s._vscf_message_info_der_serializer_use_asn1_writer=(e,t)=>(s._vscf_message_info_der_serializer_use_asn1_writer=Ve.rj)(e,t),s._vscf_pbe_alg_info_kdf_alg_info=e=>(s._vscf_pbe_alg_info_kdf_alg_info=Ve.sj)(e),s._vscf_pbe_alg_info_cipher_alg_info=e=>(s._vscf_pbe_alg_info_cipher_alg_info=Ve.tj)(e),s._vscf_pbe_alg_info_alg_id=e=>(s._vscf_pbe_alg_info_alg_id=Ve.uj)(e),s._vscf_pbe_alg_info_new=()=>(s._vscf_pbe_alg_info_new=Ve.vj)(),s._vscf_pbe_alg_info_delete=e=>(s._vscf_pbe_alg_info_delete=Ve.wj)(e),s._vscf_pbe_alg_info_shallow_copy=e=>(s._vscf_pbe_alg_info_shallow_copy=Ve.xj)(e),s._vscf_pkcs5_pbes2_reset=(e,t)=>(s._vscf_pkcs5_pbes2_reset=Ve.yj)(e,t),s._vscf_pkcs5_pbes2_alg_id=e=>(s._vscf_pkcs5_pbes2_alg_id=Ve.zj)(e),s._vscf_pkcs5_pbes2_produce_alg_info=e=>(s._vscf_pkcs5_pbes2_produce_alg_info=Ve.Aj)(e),s._vscf_pkcs5_pbes2_restore_alg_info=(e,t)=>(s._vscf_pkcs5_pbes2_restore_alg_info=Ve.Bj)(e,t),s._vscf_pkcs5_pbes2_encrypt=(e,t,_)=>(s._vscf_pkcs5_pbes2_encrypt=Ve.Cj)(e,t,_),s._vscf_pkcs5_pbes2_encrypted_len=(e,t)=>(s._vscf_pkcs5_pbes2_encrypted_len=Ve.Dj)(e,t),s._vscf_pkcs5_pbes2_precise_encrypted_len=(e,t)=>(s._vscf_pkcs5_pbes2_precise_encrypted_len=Ve.Ej)(e,t),s._vscf_pkcs5_pbes2_decrypt=(e,t,_)=>(s._vscf_pkcs5_pbes2_decrypt=Ve.Fj)(e,t,_),s._vscf_pkcs5_pbes2_decrypted_len=(e,t)=>(s._vscf_pkcs5_pbes2_decrypted_len=Ve.Gj)(e,t),s._vscf_pkcs5_pbes2_release_kdf=e=>(s._vscf_pkcs5_pbes2_release_kdf=Ve.Hj)(e),s._vscf_pkcs5_pbes2_release_cipher=e=>(s._vscf_pkcs5_pbes2_release_cipher=Ve.Ij)(e),s._vscf_pkcs5_pbes2_new=()=>(s._vscf_pkcs5_pbes2_new=Ve.Jj)(),s._vscf_pkcs5_pbes2_delete=e=>(s._vscf_pkcs5_pbes2_delete=Ve.Kj)(e),s._vscf_pkcs5_pbes2_shallow_copy=e=>(s._vscf_pkcs5_pbes2_shallow_copy=Ve.Lj)(e),s._vscf_pkcs5_pbes2_use_kdf=(e,t)=>(s._vscf_pkcs5_pbes2_use_kdf=Ve.Mj)(e,t),s._vscf_pkcs5_pbes2_use_cipher=(e,t)=>(s._vscf_pkcs5_pbes2_use_cipher=Ve.Nj)(e,t),s._vscf_pkcs5_pbkdf2_setup_defaults=e=>(s._vscf_pkcs5_pbkdf2_setup_defaults=Ve.Oj)(e),s._vscf_pkcs5_pbkdf2_alg_id=e=>(s._vscf_pkcs5_pbkdf2_alg_id=Ve.Pj)(e),s._vscf_pkcs5_pbkdf2_produce_alg_info=e=>(s._vscf_pkcs5_pbkdf2_produce_alg_info=Ve.Qj)(e),s._vscf_pkcs5_pbkdf2_restore_alg_info=(e,t)=>(s._vscf_pkcs5_pbkdf2_restore_alg_info=Ve.Rj)(e,t),s._vscf_pkcs5_pbkdf2_reset=(e,t,_)=>(s._vscf_pkcs5_pbkdf2_reset=Ve.Sj)(e,t,_),s._vscf_pkcs5_pbkdf2_derive=(e,t,_,r)=>(s._vscf_pkcs5_pbkdf2_derive=Ve.Tj)(e,t,_,r),s._vscf_pkcs5_pbkdf2_set_info=(e,t)=>(s._vscf_pkcs5_pbkdf2_set_info=Ve.Uj)(e,t),s._vscf_pkcs5_pbkdf2_release_hmac=e=>(s._vscf_pkcs5_pbkdf2_release_hmac=Ve.Vj)(e),s._vscf_pkcs5_pbkdf2_new=()=>(s._vscf_pkcs5_pbkdf2_new=Ve.Wj)(),s._vscf_pkcs5_pbkdf2_delete=e=>(s._vscf_pkcs5_pbkdf2_delete=Ve.Xj)(e),s._vscf_pkcs5_pbkdf2_shallow_copy=e=>(s._vscf_pkcs5_pbkdf2_shallow_copy=Ve.Yj)(e),s._vscf_pkcs5_pbkdf2_use_hmac=(e,t)=>(s._vscf_pkcs5_pbkdf2_use_hmac=Ve.Zj)(e,t),s._vscf_pkcs8_serializer_setup_defaults=e=>(s._vscf_pkcs8_serializer_setup_defaults=Ve._j)(e),s._vscf_pkcs8_serializer_serialize_public_key_inplace=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_public_key_inplace=Ve.$j)(e,t,_),s._vscf_pkcs8_serializer_serialized_public_key_len=(e,t)=>(s._vscf_pkcs8_serializer_serialized_public_key_len=Ve.ak)(e,t),s._vscf_pkcs8_serializer_serialize_private_key_inplace=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_private_key_inplace=Ve.bk)(e,t,_),s._vscf_pkcs8_serializer_serialized_private_key_len=(e,t)=>(s._vscf_pkcs8_serializer_serialized_private_key_len=Ve.ck)(e,t),s._vscf_pkcs8_serializer_serialize_public_key=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_public_key=Ve.dk)(e,t,_),s._vscf_pkcs8_serializer_serialize_private_key=(e,t,_)=>(s._vscf_pkcs8_serializer_serialize_private_key=Ve.ek)(e,t,_),s._vscf_pkcs8_serializer_release_asn1_writer=e=>(s._vscf_pkcs8_serializer_release_asn1_writer=Ve.fk)(e),s._vscf_pkcs8_serializer_new=()=>(s._vscf_pkcs8_serializer_new=Ve.gk)(),s._vscf_pkcs8_serializer_delete=e=>(s._vscf_pkcs8_serializer_delete=Ve.hk)(e),s._vscf_pkcs8_serializer_shallow_copy=e=>(s._vscf_pkcs8_serializer_shallow_copy=Ve.ik)(e),s._vscf_pkcs8_serializer_use_asn1_writer=(e,t)=>(s._vscf_pkcs8_serializer_use_asn1_writer=Ve.jk)(e,t),s._vscf_random_padding_alg_id=e=>(s._vscf_random_padding_alg_id=Ve.kk)(e),s._vscf_random_padding_produce_alg_info=e=>(s._vscf_random_padding_produce_alg_info=Ve.lk)(e),s._vscf_random_padding_restore_alg_info=(e,t)=>(s._vscf_random_padding_restore_alg_info=Ve.mk)(e,t),s._vscf_random_padding_configure=(e,t)=>(s._vscf_random_padding_configure=Ve.nk)(e,t),s._vscf_random_padding_padded_data_len=(e,t)=>(s._vscf_random_padding_padded_data_len=Ve.ok)(e,t),s._vscf_random_padding_len=e=>(s._vscf_random_padding_len=Ve.pk)(e),s._vscf_random_padding_len_max=e=>(s._vscf_random_padding_len_max=Ve.qk)(e),s._vscf_random_padding_start_data_processing=e=>(s._vscf_random_padding_start_data_processing=Ve.rk)(e),s._vscf_random_padding_process_data=(e,t,_)=>(s._vscf_random_padding_process_data=Ve.sk)(e,t,_),s._vscf_random_padding_finish_data_processing=(e,t)=>(s._vscf_random_padding_finish_data_processing=Ve.tk)(e,t),s._vscf_random_padding_start_padded_data_processing=e=>(s._vscf_random_padding_start_padded_data_processing=Ve.uk)(e),s._vscf_random_padding_process_padded_data=(e,t,_)=>(s._vscf_random_padding_process_padded_data=Ve.vk)(e,t,_),s._vscf_random_padding_finish_padded_data_processing_out_len=e=>(s._vscf_random_padding_finish_padded_data_processing_out_len=Ve.wk)(e),s._vscf_random_padding_finish_padded_data_processing=(e,t)=>(s._vscf_random_padding_finish_padded_data_processing=Ve.xk)(e,t),s._vscf_random_padding_release_random=e=>(s._vscf_random_padding_release_random=Ve.yk)(e),s._vscf_random_padding_new=()=>(s._vscf_random_padding_new=Ve.zk)(),s._vscf_random_padding_delete=e=>(s._vscf_random_padding_delete=Ve.Ak)(e),s._vscf_random_padding_shallow_copy=e=>(s._vscf_random_padding_shallow_copy=Ve.Bk)(e),s._vscf_random_padding_use_random=(e,t)=>(s._vscf_random_padding_use_random=Ve.Ck)(e,t),s._vscf_raw_private_key_data=(e,t)=>(s._vscf_raw_private_key_data=Ve.Dk)(e,t),s._vscf_raw_private_key_has_public_key=e=>(s._vscf_raw_private_key_has_public_key=Ve.Ek)(e),s._vscf_raw_private_key_set_public_key=(e,t)=>(s._vscf_raw_private_key_set_public_key=Ve.Fk)(e,t),s._vscf_raw_private_key_get_public_key=e=>(s._vscf_raw_private_key_get_public_key=Ve.Gk)(e),s._vscf_raw_private_key_alg_id=e=>(s._vscf_raw_private_key_alg_id=Ve.Hk)(e),s._vscf_raw_private_key_alg_info=e=>(s._vscf_raw_private_key_alg_info=Ve.Ik)(e),s._vscf_raw_private_key_len=e=>(s._vscf_raw_private_key_len=Ve.Jk)(e),s._vscf_raw_private_key_bitlen=e=>(s._vscf_raw_private_key_bitlen=Ve.Kk)(e),s._vscf_raw_private_key_impl_tag=e=>(s._vscf_raw_private_key_impl_tag=Ve.Lk)(e),s._vscf_raw_private_key_is_valid=e=>(s._vscf_raw_private_key_is_valid=Ve.Mk)(e),s._vscf_raw_private_key_extract_public_key=e=>(s._vscf_raw_private_key_extract_public_key=Ve.Nk)(e),s._vscf_raw_private_key_new=()=>(s._vscf_raw_private_key_new=Ve.Ok)(),s._vscf_raw_private_key_delete=e=>(s._vscf_raw_private_key_delete=Ve.Pk)(e),s._vscf_raw_private_key_shallow_copy=e=>(s._vscf_raw_private_key_shallow_copy=Ve.Qk)(e),s._vscf_raw_public_key_data=(e,t)=>(s._vscf_raw_public_key_data=Ve.Rk)(e,t),s._vscf_raw_public_key_alg_id=e=>(s._vscf_raw_public_key_alg_id=Ve.Sk)(e),s._vscf_raw_public_key_alg_info=e=>(s._vscf_raw_public_key_alg_info=Ve.Tk)(e),s._vscf_raw_public_key_len=e=>(s._vscf_raw_public_key_len=Ve.Uk)(e),s._vscf_raw_public_key_bitlen=e=>(s._vscf_raw_public_key_bitlen=Ve.Vk)(e),s._vscf_raw_public_key_impl_tag=e=>(s._vscf_raw_public_key_impl_tag=Ve.Wk)(e),s._vscf_raw_public_key_is_valid=e=>(s._vscf_raw_public_key_is_valid=Ve.Xk)(e),s._vscf_raw_public_key_new=()=>(s._vscf_raw_public_key_new=Ve.Yk)(),s._vscf_raw_public_key_delete=e=>(s._vscf_raw_public_key_delete=Ve.Zk)(e),s._vscf_raw_public_key_shallow_copy=e=>(s._vscf_raw_public_key_shallow_copy=Ve._k)(e),s._vscf_round5_setup_defaults=e=>(s._vscf_round5_setup_defaults=Ve.$k)(e),s._vscf_round5_generate_key=(e,t,_)=>(s._vscf_round5_generate_key=Ve.al)(e,t,_),s._vscf_round5_generate_ephemeral_key=(e,t,_)=>(s._vscf_round5_generate_ephemeral_key=Ve.bl)(e,t,_),s._vscf_round5_import_public_key=(e,t,_)=>(s._vscf_round5_import_public_key=Ve.cl)(e,t,_),s._vscf_round5_import_public_key_data=(e,t,_,r)=>(s._vscf_round5_import_public_key_data=Ve.dl)(e,t,_,r),s._vscf_round5_export_public_key=(e,t,_)=>(s._vscf_round5_export_public_key=Ve.el)(e,t,_),s._vscf_round5_exported_public_key_data_len=(e,t)=>(s._vscf_round5_exported_public_key_data_len=Ve.fl)(e,t),s._vscf_round5_export_public_key_data=(e,t,_)=>(s._vscf_round5_export_public_key_data=Ve.gl)(e,t,_),s._vscf_round5_import_private_key=(e,t,_)=>(s._vscf_round5_import_private_key=Ve.hl)(e,t,_),s._vscf_round5_import_private_key_data=(e,t,_,r)=>(s._vscf_round5_import_private_key_data=Ve.il)(e,t,_,r),s._vscf_round5_export_private_key=(e,t,_)=>(s._vscf_round5_export_private_key=Ve.jl)(e,t,_),s._vscf_round5_exported_private_key_data_len=(e,t)=>(s._vscf_round5_exported_private_key_data_len=Ve.kl)(e,t),s._vscf_round5_export_private_key_data=(e,t,_)=>(s._vscf_round5_export_private_key_data=Ve.ll)(e,t,_),s._vscf_round5_kem_shared_key_len=(e,t)=>(s._vscf_round5_kem_shared_key_len=Ve.ml)(e,t),s._vscf_round5_kem_encapsulated_key_len=(e,t)=>(s._vscf_round5_kem_encapsulated_key_len=Ve.nl)(e,t),s._vscf_round5_kem_encapsulate=(e,t,_,r)=>(s._vscf_round5_kem_encapsulate=Ve.ol)(e,t,_,r),s._vscf_round5_kem_decapsulate=(e,t,_,r)=>(s._vscf_round5_kem_decapsulate=Ve.pl)(e,t,_,r),s._vscf_round5_release_random=e=>(s._vscf_round5_release_random=Ve.ql)(e),s._vscf_round5_new=()=>(s._vscf_round5_new=Ve.rl)(),s._vscf_round5_delete=e=>(s._vscf_round5_delete=Ve.sl)(e),s._vscf_round5_shallow_copy=e=>(s._vscf_round5_shallow_copy=Ve.tl)(e),s._vscf_round5_use_random=(e,t)=>(s._vscf_round5_use_random=Ve.ul)(e,t),s._vscf_rsa_setup_defaults=e=>(s._vscf_rsa_setup_defaults=Ve.vl)(e),s._vscf_rsa_generate_key=(e,t,_)=>(s._vscf_rsa_generate_key=Ve.wl)(e,t,_),s._vscf_rsa_generate_ephemeral_key=(e,t,_)=>(s._vscf_rsa_generate_ephemeral_key=Ve.xl)(e,t,_),s._vscf_rsa_import_public_key=(e,t,_)=>(s._vscf_rsa_import_public_key=Ve.yl)(e,t,_),s._vscf_rsa_import_public_key_data=(e,t,_,r)=>(s._vscf_rsa_import_public_key_data=Ve.zl)(e,t,_,r),s._vscf_rsa_export_public_key=(e,t,_)=>(s._vscf_rsa_export_public_key=Ve.Al)(e,t,_),s._vscf_rsa_exported_public_key_data_len=(e,t)=>(s._vscf_rsa_exported_public_key_data_len=Ve.Bl)(e,t),s._vscf_rsa_export_public_key_data=(e,t,_)=>(s._vscf_rsa_export_public_key_data=Ve.Cl)(e,t,_),s._vscf_rsa_import_private_key=(e,t,_)=>(s._vscf_rsa_import_private_key=Ve.Dl)(e,t,_),s._vscf_rsa_import_private_key_data=(e,t,_,r)=>(s._vscf_rsa_import_private_key_data=Ve.El)(e,t,_,r),s._vscf_rsa_export_private_key=(e,t,_)=>(s._vscf_rsa_export_private_key=Ve.Fl)(e,t,_),s._vscf_rsa_exported_private_key_data_len=(e,t)=>(s._vscf_rsa_exported_private_key_data_len=Ve.Gl)(e,t),s._vscf_rsa_export_private_key_data=(e,t,_)=>(s._vscf_rsa_export_private_key_data=Ve.Hl)(e,t,_),s._vscf_rsa_can_encrypt=(e,t,_)=>(s._vscf_rsa_can_encrypt=Ve.Il)(e,t,_),s._vscf_rsa_encrypted_len=(e,t,_)=>(s._vscf_rsa_encrypted_len=Ve.Jl)(e,t,_),s._vscf_rsa_encrypt=(e,t,_,r)=>(s._vscf_rsa_encrypt=Ve.Kl)(e,t,_,r),s._vscf_rsa_can_decrypt=(e,t,_)=>(s._vscf_rsa_can_decrypt=Ve.Ll)(e,t,_),s._vscf_rsa_decrypted_len=(e,t,_)=>(s._vscf_rsa_decrypted_len=Ve.Ml)(e,t,_),s._vscf_rsa_decrypt=(e,t,_,r)=>(s._vscf_rsa_decrypt=Ve.Nl)(e,t,_,r),s._vscf_rsa_can_sign=(e,t)=>(s._vscf_rsa_can_sign=Ve.Ol)(e,t),s._vscf_rsa_signature_len=(e,t)=>(s._vscf_rsa_signature_len=Ve.Pl)(e,t),s._vscf_rsa_sign_hash=(e,t,_,r,n)=>(s._vscf_rsa_sign_hash=Ve.Ql)(e,t,_,r,n),s._vscf_rsa_can_verify=(e,t)=>(s._vscf_rsa_can_verify=Ve.Rl)(e,t),s._vscf_rsa_verify_hash=(e,t,_,r,n)=>(s._vscf_rsa_verify_hash=Ve.Sl)(e,t,_,r,n),s._vscf_rsa_release_random=e=>(s._vscf_rsa_release_random=Ve.Tl)(e),s._vscf_rsa_new=()=>(s._vscf_rsa_new=Ve.Ul)(),s._vscf_rsa_delete=e=>(s._vscf_rsa_delete=Ve.Vl)(e),s._vscf_rsa_shallow_copy=e=>(s._vscf_rsa_shallow_copy=Ve.Wl)(e),s._vscf_rsa_use_random=(e,t)=>(s._vscf_rsa_use_random=Ve.Xl)(e,t),s._vscf_rsa_private_key_is_valid=e=>(s._vscf_rsa_private_key_is_valid=Ve.Yl)(e),s._vscf_rsa_private_key_len=e=>(s._vscf_rsa_private_key_len=Ve.Zl)(e),s._vscf_rsa_private_key_alg_id=e=>(s._vscf_rsa_private_key_alg_id=Ve._l)(e),s._vscf_rsa_private_key_alg_info=e=>(s._vscf_rsa_private_key_alg_info=Ve.$l)(e),s._vscf_rsa_private_key_bitlen=e=>(s._vscf_rsa_private_key_bitlen=Ve.am)(e),s._vscf_rsa_private_key_impl_tag=e=>(s._vscf_rsa_private_key_impl_tag=Ve.bm)(e),s._vscf_rsa_private_key_extract_public_key=e=>(s._vscf_rsa_private_key_extract_public_key=Ve.cm)(e),s._vscf_rsa_private_key_new=()=>(s._vscf_rsa_private_key_new=Ve.dm)(),s._vscf_rsa_private_key_delete=e=>(s._vscf_rsa_private_key_delete=Ve.em)(e),s._vscf_rsa_private_key_shallow_copy=e=>(s._vscf_rsa_private_key_shallow_copy=Ve.fm)(e),s._vscf_rsa_public_key_key_exponent=e=>(s._vscf_rsa_public_key_key_exponent=Ve.gm)(e),s._vscf_rsa_public_key_is_valid=e=>(s._vscf_rsa_public_key_is_valid=Ve.hm)(e),s._vscf_rsa_public_key_len=e=>(s._vscf_rsa_public_key_len=Ve.im)(e),s._vscf_rsa_public_key_alg_id=e=>(s._vscf_rsa_public_key_alg_id=Ve.jm)(e),s._vscf_rsa_public_key_alg_info=e=>(s._vscf_rsa_public_key_alg_info=Ve.km)(e),s._vscf_rsa_public_key_bitlen=e=>(s._vscf_rsa_public_key_bitlen=Ve.lm)(e),s._vscf_rsa_public_key_impl_tag=e=>(s._vscf_rsa_public_key_impl_tag=Ve.mm)(e),s._vscf_rsa_public_key_new=()=>(s._vscf_rsa_public_key_new=Ve.nm)(),s._vscf_rsa_public_key_delete=e=>(s._vscf_rsa_public_key_delete=Ve.om)(e),s._vscf_rsa_public_key_shallow_copy=e=>(s._vscf_rsa_public_key_shallow_copy=Ve.pm)(e),s._vscf_salted_kdf_alg_info_hash_alg_info=e=>(s._vscf_salted_kdf_alg_info_hash_alg_info=Ve.qm)(e),s._vscf_salted_kdf_alg_info_salt=(e,t)=>(s._vscf_salted_kdf_alg_info_salt=Ve.rm)(e,t),s._vscf_salted_kdf_alg_info_iteration_count=e=>(s._vscf_salted_kdf_alg_info_iteration_count=Ve.sm)(e),s._vscf_salted_kdf_alg_info_alg_id=e=>(s._vscf_salted_kdf_alg_info_alg_id=Ve.tm)(e),s._vscf_salted_kdf_alg_info_new=()=>(s._vscf_salted_kdf_alg_info_new=Ve.um)(),s._vscf_salted_kdf_alg_info_delete=e=>(s._vscf_salted_kdf_alg_info_delete=Ve.vm)(e),s._vscf_salted_kdf_alg_info_shallow_copy=e=>(s._vscf_salted_kdf_alg_info_shallow_copy=Ve.wm)(e),s._vscf_sec1_serializer_setup_defaults=e=>(s._vscf_sec1_serializer_setup_defaults=Ve.xm)(e),s._vscf_sec1_serializer_serialize_public_key_inplace=(e,t,_)=>(s._vscf_sec1_serializer_serialize_public_key_inplace=Ve.ym)(e,t,_),s._vscf_sec1_serializer_serialized_public_key_len=(e,t)=>(s._vscf_sec1_serializer_serialized_public_key_len=Ve.zm)(e,t),s._vscf_sec1_serializer_serialize_private_key_inplace=(e,t,_)=>(s._vscf_sec1_serializer_serialize_private_key_inplace=Ve.Am)(e,t,_),s._vscf_sec1_serializer_serialized_private_key_len=(e,t)=>(s._vscf_sec1_serializer_serialized_private_key_len=Ve.Bm)(e,t),s._vscf_sec1_serializer_serialize_public_key=(e,t,_)=>(s._vscf_sec1_serializer_serialize_public_key=Ve.Cm)(e,t,_),s._vscf_sec1_serializer_serialize_private_key=(e,t,_)=>(s._vscf_sec1_serializer_serialize_private_key=Ve.Dm)(e,t,_),s._vscf_sec1_serializer_release_asn1_writer=e=>(s._vscf_sec1_serializer_release_asn1_writer=Ve.Em)(e),s._vscf_sec1_serializer_new=()=>(s._vscf_sec1_serializer_new=Ve.Fm)(),s._vscf_sec1_serializer_delete=e=>(s._vscf_sec1_serializer_delete=Ve.Gm)(e),s._vscf_sec1_serializer_shallow_copy=e=>(s._vscf_sec1_serializer_shallow_copy=Ve.Hm)(e),s._vscf_sec1_serializer_use_asn1_writer=(e,t)=>(s._vscf_sec1_serializer_use_asn1_writer=Ve.Im)(e,t),s._vscf_seed_entropy_source_reset_seed=(e,t)=>(s._vscf_seed_entropy_source_reset_seed=Ve.Jm)(e,t),s._vscf_seed_entropy_source_is_strong=e=>(s._vscf_seed_entropy_source_is_strong=Ve.Km)(e),s._vscf_seed_entropy_source_gather=(e,t,_)=>(s._vscf_seed_entropy_source_gather=Ve.Lm)(e,t,_),s._vscf_seed_entropy_source_new=()=>(s._vscf_seed_entropy_source_new=Ve.Mm)(),s._vscf_seed_entropy_source_delete=e=>(s._vscf_seed_entropy_source_delete=Ve.Nm)(e),s._vscf_seed_entropy_source_shallow_copy=e=>(s._vscf_seed_entropy_source_shallow_copy=Ve.Om)(e),s._vscf_sha224_alg_id=e=>(s._vscf_sha224_alg_id=Ve.Pm)(e),s._vscf_sha224_produce_alg_info=e=>(s._vscf_sha224_produce_alg_info=Ve.Qm)(e),s._vscf_sha224_restore_alg_info=(e,t)=>(s._vscf_sha224_restore_alg_info=Ve.Rm)(e,t),s._vscf_sha224_hash=(e,t)=>(s._vscf_sha224_hash=Ve.Sm)(e,t),s._vscf_sha224_finish=(e,t)=>(s._vscf_sha224_finish=Ve.Tm)(e,t),s._vscf_sha224_start=e=>(s._vscf_sha224_start=Ve.Um)(e),s._vscf_sha224_update=(e,t)=>(s._vscf_sha224_update=Ve.Vm)(e,t),s._vscf_sha224_new=()=>(s._vscf_sha224_new=Ve.Wm)(),s._vscf_sha224_delete=e=>(s._vscf_sha224_delete=Ve.Xm)(e),s._vscf_sha224_shallow_copy=e=>(s._vscf_sha224_shallow_copy=Ve.Ym)(e),s._vscf_sha256_alg_id=e=>(s._vscf_sha256_alg_id=Ve.Zm)(e),s._vscf_sha256_produce_alg_info=e=>(s._vscf_sha256_produce_alg_info=Ve._m)(e),s._vscf_sha256_restore_alg_info=(e,t)=>(s._vscf_sha256_restore_alg_info=Ve.$m)(e,t),s._vscf_sha256_hash=(e,t)=>(s._vscf_sha256_hash=Ve.an)(e,t),s._vscf_sha256_finish=(e,t)=>(s._vscf_sha256_finish=Ve.bn)(e,t),s._vscf_sha256_start=e=>(s._vscf_sha256_start=Ve.cn)(e),s._vscf_sha256_update=(e,t)=>(s._vscf_sha256_update=Ve.dn)(e,t),s._vscf_sha256_new=()=>(s._vscf_sha256_new=Ve.en)(),s._vscf_sha256_delete=e=>(s._vscf_sha256_delete=Ve.fn)(e),s._vscf_sha256_shallow_copy=e=>(s._vscf_sha256_shallow_copy=Ve.gn)(e),s._vscf_sha384_alg_id=e=>(s._vscf_sha384_alg_id=Ve.hn)(e),s._vscf_sha384_produce_alg_info=e=>(s._vscf_sha384_produce_alg_info=Ve.jn)(e),s._vscf_sha384_restore_alg_info=(e,t)=>(s._vscf_sha384_restore_alg_info=Ve.kn)(e,t),s._vscf_sha384_hash=(e,t)=>(s._vscf_sha384_hash=Ve.ln)(e,t),s._vscf_sha384_finish=(e,t)=>(s._vscf_sha384_finish=Ve.mn)(e,t),s._vscf_sha384_start=e=>(s._vscf_sha384_start=Ve.nn)(e),s._vscf_sha384_update=(e,t)=>(s._vscf_sha384_update=Ve.on)(e,t),s._vscf_sha384_new=()=>(s._vscf_sha384_new=Ve.pn)(),s._vscf_sha384_delete=e=>(s._vscf_sha384_delete=Ve.qn)(e),s._vscf_sha384_shallow_copy=e=>(s._vscf_sha384_shallow_copy=Ve.rn)(e),s._vscf_sha512_alg_id=e=>(s._vscf_sha512_alg_id=Ve.sn)(e),s._vscf_sha512_produce_alg_info=e=>(s._vscf_sha512_produce_alg_info=Ve.tn)(e),s._vscf_sha512_restore_alg_info=(e,t)=>(s._vscf_sha512_restore_alg_info=Ve.un)(e,t),s._vscf_sha512_hash=(e,t)=>(s._vscf_sha512_hash=Ve.vn)(e,t),s._vscf_sha512_finish=(e,t)=>(s._vscf_sha512_finish=Ve.wn)(e,t),s._vscf_sha512_start=e=>(s._vscf_sha512_start=Ve.xn)(e),s._vscf_sha512_update=(e,t)=>(s._vscf_sha512_update=Ve.yn)(e,t),s._vscf_sha512_new=()=>(s._vscf_sha512_new=Ve.zn)(),s._vscf_sha512_delete=e=>(s._vscf_sha512_delete=Ve.An)(e),s._vscf_sha512_shallow_copy=e=>(s._vscf_sha512_shallow_copy=Ve.Bn)(e),s._vscf_simple_alg_info_alg_id=e=>(s._vscf_simple_alg_info_alg_id=Ve.Cn)(e),s._vscf_simple_alg_info_new=()=>(s._vscf_simple_alg_info_new=Ve.Dn)(),s._vscf_simple_alg_info_delete=e=>(s._vscf_simple_alg_info_delete=Ve.En)(e),s._vscf_simple_alg_info_shallow_copy=e=>(s._vscf_simple_alg_info_shallow_copy=Ve.Fn)(e),s._vscf_simple_alg_info_new_with_alg_id=e=>(s._vscf_simple_alg_info_new_with_alg_id=Ve.Gn)(e),s._vscf_alg_factory_create_hash_from_info=e=>(s._vscf_alg_factory_create_hash_from_info=Ve.Hn)(e),s._vscf_alg_factory_create_mac_from_info=e=>(s._vscf_alg_factory_create_mac_from_info=Ve.In)(e),s._vscf_alg_factory_create_kdf_from_info=e=>(s._vscf_alg_factory_create_kdf_from_info=Ve.Jn)(e),s._vscf_alg_factory_create_salted_kdf_from_info=e=>(s._vscf_alg_factory_create_salted_kdf_from_info=Ve.Kn)(e),s._vscf_alg_factory_create_cipher_from_info=e=>(s._vscf_alg_factory_create_cipher_from_info=Ve.Ln)(e),s._vscf_alg_factory_create_padding_from_info=(e,t)=>(s._vscf_alg_factory_create_padding_from_info=Ve.Mn)(e,t),s._vscf_base64_encoded_len=e=>(s._vscf_base64_encoded_len=Ve.Nn)(e),s._vscf_base64_encode=(e,t)=>(s._vscf_base64_encode=Ve.On)(e,t),s._vscf_base64_decoded_len=e=>(s._vscf_base64_decoded_len=Ve.Pn)(e),s._vscf_base64_decode=(e,t)=>(s._vscf_base64_decode=Ve.Qn)(e,t),s._vscf_brainkey_client_release_random=e=>(s._vscf_brainkey_client_release_random=Ve.Rn)(e),s._vscf_brainkey_client_release_operation_random=e=>(s._vscf_brainkey_client_release_operation_random=Ve.Sn)(e),s._vscf_brainkey_client_new=()=>(s._vscf_brainkey_client_new=Ve.Tn)(),s._vscf_brainkey_client_delete=e=>(s._vscf_brainkey_client_delete=Ve.Un)(e),s._vscf_brainkey_client_shallow_copy=e=>(s._vscf_brainkey_client_shallow_copy=Ve.Vn)(e),s._vscf_brainkey_client_use_random=(e,t)=>(s._vscf_brainkey_client_use_random=Ve.Wn)(e,t),s._vscf_brainkey_client_use_operation_random=(e,t)=>(s._vscf_brainkey_client_use_operation_random=Ve.Xn)(e,t),s._vscf_brainkey_client_setup_defaults=e=>(s._vscf_brainkey_client_setup_defaults=Ve.Yn)(e),s._vscf_brainkey_client_blind=(e,t,_,r)=>(s._vscf_brainkey_client_blind=Ve.Zn)(e,t,_,r),s._vscf_brainkey_client_deblind=(e,t,_,r,n,c)=>(s._vscf_brainkey_client_deblind=Ve._n)(e,t,_,r,n,c),s._vscf_brainkey_server_release_random=e=>(s._vscf_brainkey_server_release_random=Ve.$n)(e),s._vscf_brainkey_server_release_operation_random=e=>(s._vscf_brainkey_server_release_operation_random=Ve.ao)(e),s._vscf_brainkey_server_new=()=>(s._vscf_brainkey_server_new=Ve.bo)(),s._vscf_brainkey_server_delete=e=>(s._vscf_brainkey_server_delete=Ve.co)(e),s._vscf_brainkey_server_shallow_copy=e=>(s._vscf_brainkey_server_shallow_copy=Ve.eo)(e),s._vscf_brainkey_server_use_random=(e,t)=>(s._vscf_brainkey_server_use_random=Ve.fo)(e,t),s._vscf_brainkey_server_use_operation_random=(e,t)=>(s._vscf_brainkey_server_use_operation_random=Ve.go)(e,t),s._vscf_brainkey_server_setup_defaults=e=>(s._vscf_brainkey_server_setup_defaults=Ve.ho)(e),s._vscf_brainkey_server_generate_identity_secret=(e,t)=>(s._vscf_brainkey_server_generate_identity_secret=Ve.io)(e,t),s._vscf_brainkey_server_harden=(e,t,_,r)=>(s._vscf_brainkey_server_harden=Ve.jo)(e,t,_,r);s._vscf_ecies_release_random=e=>(s._vscf_ecies_release_random=Ve.ko)(e),s._vscf_ecies_release_cipher=e=>(s._vscf_ecies_release_cipher=Ve.lo)(e),s._vscf_ecies_release_mac=e=>(s._vscf_ecies_release_mac=Ve.mo)(e),s._vscf_ecies_release_kdf=e=>(s._vscf_ecies_release_kdf=Ve.no)(e),s._vscf_ecies_release_ephemeral_key=e=>(s._vscf_ecies_release_ephemeral_key=Ve.oo)(e),s._vscf_ecies_new=()=>(s._vscf_ecies_new=Ve.po)(),s._vscf_ecies_delete=e=>(s._vscf_ecies_delete=Ve.qo)(e),s._vscf_ecies_shallow_copy=e=>(s._vscf_ecies_shallow_copy=Ve.ro)(e),s._vscf_ecies_use_random=(e,t)=>(s._vscf_ecies_use_random=Ve.so)(e,t),s._vscf_ecies_use_cipher=(e,t)=>(s._vscf_ecies_use_cipher=Ve.to)(e,t),s._vscf_ecies_use_mac=(e,t)=>(s._vscf_ecies_use_mac=Ve.uo)(e,t),s._vscf_ecies_use_kdf=(e,t)=>(s._vscf_ecies_use_kdf=Ve.vo)(e,t),s._vscf_ecies_use_ephemeral_key=(e,t)=>(s._vscf_ecies_use_ephemeral_key=Ve.wo)(e,t),s._vscf_ecies_set_key_alg=(e,t)=>(s._vscf_ecies_set_key_alg=Ve.xo)(e,t),s._vscf_ecies_release_key_alg=e=>(s._vscf_ecies_release_key_alg=Ve.yo)(e),s._vscf_ecies_setup_defaults=e=>(s._vscf_ecies_setup_defaults=Ve.zo)(e),s._vscf_ecies_setup_defaults_no_random=e=>(s._vscf_ecies_setup_defaults_no_random=Ve.Ao)(e),s._vscf_ecies_encrypted_len=(e,t,_)=>(s._vscf_ecies_encrypted_len=Ve.Bo)(e,t,_),s._vscf_ecies_encrypt=(e,t,_,r)=>(s._vscf_ecies_encrypt=Ve.Co)(e,t,_,r),s._vscf_ecies_decrypted_len=(e,t,_)=>(s._vscf_ecies_decrypted_len=Ve.Do)(e,t,_),s._vscf_ecies_decrypt=(e,t,_,r)=>(s._vscf_ecies_decrypt=Ve.Eo)(e,t,_,r),s._vscf_error_ctx_size=()=>(s._vscf_error_ctx_size=Ve.Fo)(),s._vscf_error_reset=e=>(s._vscf_error_reset=Ve.Go)(e),s._vscf_error_status=e=>(s._vscf_error_status=Ve.Ho)(e),s._vscf_footer_info_new=()=>(s._vscf_footer_info_new=Ve.Io)(),s._vscf_footer_info_delete=e=>(s._vscf_footer_info_delete=Ve.Jo)(e),s._vscf_footer_info_shallow_copy=e=>(s._vscf_footer_info_shallow_copy=Ve.Ko)(e),s._vscf_footer_info_has_signed_data_info=e=>(s._vscf_footer_info_has_signed_data_info=Ve.Lo)(e),s._vscf_footer_info_signed_data_info=e=>(s._vscf_footer_info_signed_data_info=Ve.Mo)(e),s._vscf_footer_info_set_data_size=(e,t)=>(s._vscf_footer_info_set_data_size=Ve.No)(e,t),s._vscf_footer_info_data_size=e=>(s._vscf_footer_info_data_size=Ve.Oo)(e),s._vscf_group_session_release_rng=e=>(s._vscf_group_session_release_rng=Ve.Po)(e),s._vscf_group_session_new=()=>(s._vscf_group_session_new=Ve.Qo)(),s._vscf_group_session_delete=e=>(s._vscf_group_session_delete=Ve.Ro)(e),s._vscf_group_session_shallow_copy=e=>(s._vscf_group_session_shallow_copy=Ve.So)(e),s._vscf_group_session_use_rng=(e,t)=>(s._vscf_group_session_use_rng=Ve.To)(e,t),s._vscf_group_session_get_current_epoch=e=>(s._vscf_group_session_get_current_epoch=Ve.Uo)(e),s._vscf_group_session_setup_defaults=e=>(s._vscf_group_session_setup_defaults=Ve.Vo)(e),s._vscf_group_session_get_session_id=(e,t)=>(s._vscf_group_session_get_session_id=Ve.Wo)(e,t),s._vscf_group_session_add_epoch=(e,t)=>(s._vscf_group_session_add_epoch=Ve.Xo)(e,t),s._vscf_group_session_encrypt=(e,t,_,r)=>(s._vscf_group_session_encrypt=Ve.Yo)(e,t,_,r),s._vscf_group_session_decrypt_len=(e,t)=>(s._vscf_group_session_decrypt_len=Ve.Zo)(e,t),s._vscf_group_session_decrypt=(e,t,_,r)=>(s._vscf_group_session_decrypt=Ve._o)(e,t,_,r),s._vscf_group_session_create_group_ticket=(e,t)=>(s._vscf_group_session_create_group_ticket=Ve.$o)(e,t),s._vscf_group_session_message_new=()=>(s._vscf_group_session_message_new=Ve.ap)(),s._vscf_group_session_message_delete=e=>(s._vscf_group_session_message_delete=Ve.bp)(e),s._vscf_group_session_message_shallow_copy=e=>(s._vscf_group_session_message_shallow_copy=Ve.cp)(e),s._vscf_group_session_message_get_type=e=>(s._vscf_group_session_message_get_type=Ve.dp)(e),s._vscf_group_session_message_get_session_id=(e,t)=>(s._vscf_group_session_message_get_session_id=Ve.ep)(e,t),s._vscf_group_session_message_get_epoch=e=>(s._vscf_group_session_message_get_epoch=Ve.fp)(e),s._vscf_group_session_message_serialize_len=e=>(s._vscf_group_session_message_serialize_len=Ve.gp)(e),s._vscf_group_session_message_serialize=(e,t)=>(s._vscf_group_session_message_serialize=Ve.hp)(e,t),s._vscf_group_session_message_deserialize=(e,t)=>(s._vscf_group_session_message_deserialize=Ve.ip)(e,t),s._vscf_group_session_ticket_release_rng=e=>(s._vscf_group_session_ticket_release_rng=Ve.jp)(e),s._vscf_group_session_ticket_new=()=>(s._vscf_group_session_ticket_new=Ve.kp)(),s._vscf_group_session_ticket_delete=e=>(s._vscf_group_session_ticket_delete=Ve.lp)(e),s._vscf_group_session_ticket_shallow_copy=e=>(s._vscf_group_session_ticket_shallow_copy=Ve.mp)(e),s._vscf_group_session_ticket_use_rng=(e,t)=>(s._vscf_group_session_ticket_use_rng=Ve.np)(e,t),s._vscf_group_session_ticket_setup_defaults=e=>(s._vscf_group_session_ticket_setup_defaults=Ve.op)(e),s._vscf_group_session_ticket_setup_ticket_as_new=(e,t)=>(s._vscf_group_session_ticket_setup_ticket_as_new=Ve.pp)(e,t),s._vscf_group_session_ticket_get_ticket_message=e=>(s._vscf_group_session_ticket_get_ticket_message=Ve.qp)(e),s._vscf_key_alg_factory_create_from_alg_id=(e,t,_)=>(s._vscf_key_alg_factory_create_from_alg_id=Ve.rp)(e,t,_),s._vscf_key_alg_factory_create_from_key=(e,t,_)=>(s._vscf_key_alg_factory_create_from_key=Ve.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=Ve.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=Ve.up)(e,t,_),s._vscf_key_info_new=()=>(s._vscf_key_info_new=Ve.vp)(),s._vscf_key_info_new_with_alg_info=e=>(s._vscf_key_info_new_with_alg_info=Ve.wp)(e),s._vscf_key_info_delete=e=>(s._vscf_key_info_delete=Ve.xp)(e),s._vscf_key_info_shallow_copy=e=>(s._vscf_key_info_shallow_copy=Ve.yp)(e),s._vscf_key_info_is_compound=e=>(s._vscf_key_info_is_compound=Ve.zp)(e),s._vscf_key_info_is_hybrid=e=>(s._vscf_key_info_is_hybrid=Ve.Ap)(e),s._vscf_key_info_is_compound_hybrid=e=>(s._vscf_key_info_is_compound_hybrid=Ve.Bp)(e),s._vscf_key_info_is_compound_hybrid_cipher=e=>(s._vscf_key_info_is_compound_hybrid_cipher=Ve.Cp)(e),s._vscf_key_info_is_compound_hybrid_signer=e=>(s._vscf_key_info_is_compound_hybrid_signer=Ve.Dp)(e),s._vscf_key_info_is_hybrid_post_quantum=e=>(s._vscf_key_info_is_hybrid_post_quantum=Ve.Ep)(e),s._vscf_key_info_is_hybrid_post_quantum_cipher=e=>(s._vscf_key_info_is_hybrid_post_quantum_cipher=Ve.Fp)(e),s._vscf_key_info_is_hybrid_post_quantum_signer=e=>(s._vscf_key_info_is_hybrid_post_quantum_signer=Ve.Gp)(e),s._vscf_key_info_alg_id=e=>(s._vscf_key_info_alg_id=Ve.Hp)(e),s._vscf_key_info_compound_cipher_alg_id=e=>(s._vscf_key_info_compound_cipher_alg_id=Ve.Ip)(e),s._vscf_key_info_compound_signer_alg_id=e=>(s._vscf_key_info_compound_signer_alg_id=Ve.Jp)(e),s._vscf_key_info_hybrid_first_key_alg_id=e=>(s._vscf_key_info_hybrid_first_key_alg_id=Ve.Kp)(e),s._vscf_key_info_hybrid_second_key_alg_id=e=>(s._vscf_key_info_hybrid_second_key_alg_id=Ve.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=Ve.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=Ve.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=Ve.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=Ve.Pp)(e),s._vscf_key_provider_release_random=e=>(s._vscf_key_provider_release_random=Ve.Qp)(e),s._vscf_key_provider_new=()=>(s._vscf_key_provider_new=Ve.Rp)(),s._vscf_key_provider_delete=e=>(s._vscf_key_provider_delete=Ve.Sp)(e),s._vscf_key_provider_shallow_copy=e=>(s._vscf_key_provider_shallow_copy=Ve.Tp)(e),s._vscf_key_provider_use_random=(e,t)=>(s._vscf_key_provider_use_random=Ve.Up)(e,t),s._vscf_key_provider_setup_defaults=e=>(s._vscf_key_provider_setup_defaults=Ve.Vp)(e),s._vscf_key_provider_set_rsa_params=(e,t)=>(s._vscf_key_provider_set_rsa_params=Ve.Wp)(e,t),s._vscf_key_provider_generate_private_key=(e,t,_)=>(s._vscf_key_provider_generate_private_key=Ve.Xp)(e,t,_),s._vscf_key_provider_generate_post_quantum_private_key=(e,t)=>(s._vscf_key_provider_generate_post_quantum_private_key=Ve.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=Ve.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=Ve._p)(e,t,_,r),s._vscf_key_provider_generate_compound_private_key=(e,t,_,r)=>(s._vscf_key_provider_generate_compound_private_key=Ve.$p)(e,t,_,r),s._vscf_key_provider_import_private_key=(e,t,_)=>(s._vscf_key_provider_import_private_key=Ve.aq)(e,t,_),s._vscf_key_provider_import_public_key=(e,t,_)=>(s._vscf_key_provider_import_public_key=Ve.bq)(e,t,_),s._vscf_key_provider_exported_public_key_len=(e,t)=>(s._vscf_key_provider_exported_public_key_len=Ve.cq)(e,t),s._vscf_key_provider_export_public_key=(e,t,_)=>(s._vscf_key_provider_export_public_key=Ve.dq)(e,t,_),s._vscf_key_provider_exported_private_key_len=(e,t)=>(s._vscf_key_provider_exported_private_key_len=Ve.eq)(e,t),s._vscf_key_provider_export_private_key=(e,t,_)=>(s._vscf_key_provider_export_private_key=Ve.fq)(e,t,_),s._vscf_key_recipient_info_new=()=>(s._vscf_key_recipient_info_new=Ve.gq)(),s._vscf_key_recipient_info_new_with_data=(e,t,_)=>(s._vscf_key_recipient_info_new_with_data=Ve.hq)(e,t,_),s._vscf_key_recipient_info_delete=e=>(s._vscf_key_recipient_info_delete=Ve.iq)(e),s._vscf_key_recipient_info_shallow_copy=e=>(s._vscf_key_recipient_info_shallow_copy=Ve.jq)(e),s._vscf_key_recipient_info_recipient_id=(e,t)=>(s._vscf_key_recipient_info_recipient_id=Ve.kq)(e,t),s._vscf_key_recipient_info_key_encryption_algorithm=e=>(s._vscf_key_recipient_info_key_encryption_algorithm=Ve.lq)(e),s._vscf_key_recipient_info_encrypted_key=(e,t)=>(s._vscf_key_recipient_info_encrypted_key=Ve.mq)(e,t),s._vscf_key_recipient_info_list_new=()=>(s._vscf_key_recipient_info_list_new=Ve.nq)(),s._vscf_key_recipient_info_list_delete=e=>(s._vscf_key_recipient_info_list_delete=Ve.oq)(e),s._vscf_key_recipient_info_list_shallow_copy=e=>(s._vscf_key_recipient_info_list_shallow_copy=Ve.pq)(e),s._vscf_key_recipient_info_list_has_item=e=>(s._vscf_key_recipient_info_list_has_item=Ve.qq)(e),s._vscf_key_recipient_info_list_item=e=>(s._vscf_key_recipient_info_list_item=Ve.rq)(e),s._vscf_key_recipient_info_list_has_next=e=>(s._vscf_key_recipient_info_list_has_next=Ve.sq)(e),s._vscf_key_recipient_info_list_next=e=>(s._vscf_key_recipient_info_list_next=Ve.tq)(e),s._vscf_key_recipient_info_list_has_prev=e=>(s._vscf_key_recipient_info_list_has_prev=Ve.uq)(e),s._vscf_key_recipient_info_list_prev=e=>(s._vscf_key_recipient_info_list_prev=Ve.vq)(e),s._vscf_key_recipient_info_list_clear=e=>(s._vscf_key_recipient_info_list_clear=Ve.wq)(e),s._vscf_message_info_new=()=>(s._vscf_message_info_new=Ve.xq)(),s._vscf_message_info_delete=e=>(s._vscf_message_info_delete=Ve.yq)(e),s._vscf_message_info_shallow_copy=e=>(s._vscf_message_info_shallow_copy=Ve.zq)(e),s._vscf_message_info_data_encryption_alg_info=e=>(s._vscf_message_info_data_encryption_alg_info=Ve.Aq)(e),s._vscf_message_info_key_recipient_info_list=e=>(s._vscf_message_info_key_recipient_info_list=Ve.Bq)(e),s._vscf_message_info_password_recipient_info_list=e=>(s._vscf_message_info_password_recipient_info_list=Ve.Cq)(e),s._vscf_message_info_has_custom_params=e=>(s._vscf_message_info_has_custom_params=Ve.Dq)(e),s._vscf_message_info_custom_params=e=>(s._vscf_message_info_custom_params=Ve.Eq)(e),s._vscf_message_info_has_cipher_kdf_alg_info=e=>(s._vscf_message_info_has_cipher_kdf_alg_info=Ve.Fq)(e),s._vscf_message_info_cipher_kdf_alg_info=e=>(s._vscf_message_info_cipher_kdf_alg_info=Ve.Gq)(e),s._vscf_message_info_has_cipher_padding_alg_info=e=>(s._vscf_message_info_has_cipher_padding_alg_info=Ve.Hq)(e),s._vscf_message_info_cipher_padding_alg_info=e=>(s._vscf_message_info_cipher_padding_alg_info=Ve.Iq)(e),s._vscf_message_info_has_footer_info=e=>(s._vscf_message_info_has_footer_info=Ve.Jq)(e),s._vscf_message_info_footer_info=e=>(s._vscf_message_info_footer_info=Ve.Kq)(e),s._vscf_message_info_clear=e=>(s._vscf_message_info_clear=Ve.Lq)(e),s._vscf_message_info_custom_params_new=()=>(s._vscf_message_info_custom_params_new=Ve.Mq)(),s._vscf_message_info_custom_params_delete=e=>(s._vscf_message_info_custom_params_delete=Ve.Nq)(e),s._vscf_message_info_custom_params_shallow_copy=e=>(s._vscf_message_info_custom_params_shallow_copy=Ve.Oq)(e),s._vscf_message_info_custom_params_add_int=(e,t,_)=>(s._vscf_message_info_custom_params_add_int=Ve.Pq)(e,t,_),s._vscf_message_info_custom_params_add_string=(e,t,_)=>(s._vscf_message_info_custom_params_add_string=Ve.Qq)(e,t,_),s._vscf_message_info_custom_params_add_data=(e,t,_)=>(s._vscf_message_info_custom_params_add_data=Ve.Rq)(e,t,_),s._vscf_message_info_custom_params_clear=e=>(s._vscf_message_info_custom_params_clear=Ve.Sq)(e),s._vscf_message_info_custom_params_find_int=(e,t,_)=>(s._vscf_message_info_custom_params_find_int=Ve.Tq)(e,t,_),s._vscf_message_info_custom_params_find_string=(e,t,_,r)=>(s._vscf_message_info_custom_params_find_string=Ve.Uq)(e,t,_,r),s._vscf_message_info_custom_params_find_data=(e,t,_,r)=>(s._vscf_message_info_custom_params_find_data=Ve.Vq)(e,t,_,r),s._vscf_message_info_custom_params_has_params=e=>(s._vscf_message_info_custom_params_has_params=Ve.Wq)(e),s._vscf_message_info_editor_release_random=e=>(s._vscf_message_info_editor_release_random=Ve.Xq)(e),s._vscf_message_info_editor_new=()=>(s._vscf_message_info_editor_new=Ve.Yq)(),s._vscf_message_info_editor_delete=e=>(s._vscf_message_info_editor_delete=Ve.Zq)(e),s._vscf_message_info_editor_shallow_copy=e=>(s._vscf_message_info_editor_shallow_copy=Ve._q)(e),s._vscf_message_info_editor_use_random=(e,t)=>(s._vscf_message_info_editor_use_random=Ve.$q)(e,t),s._vscf_message_info_editor_setup_defaults=e=>(s._vscf_message_info_editor_setup_defaults=Ve.ar)(e),s._vscf_message_info_editor_unpack=(e,t)=>(s._vscf_message_info_editor_unpack=Ve.br)(e,t),s._vscf_message_info_editor_unlock=(e,t,_)=>(s._vscf_message_info_editor_unlock=Ve.cr)(e,t,_),s._vscf_message_info_editor_add_key_recipient=(e,t,_)=>(s._vscf_message_info_editor_add_key_recipient=Ve.dr)(e,t,_),s._vscf_message_info_editor_remove_key_recipient=(e,t)=>(s._vscf_message_info_editor_remove_key_recipient=Ve.er)(e,t),s._vscf_message_info_editor_remove_all=e=>(s._vscf_message_info_editor_remove_all=Ve.fr)(e),s._vscf_message_info_editor_packed_len=e=>(s._vscf_message_info_editor_packed_len=Ve.gr)(e),s._vscf_message_info_editor_pack=(e,t)=>(s._vscf_message_info_editor_pack=Ve.hr)(e,t),s._vscf_message_info_footer_new=()=>(s._vscf_message_info_footer_new=Ve.ir)(),s._vscf_message_info_footer_delete=e=>(s._vscf_message_info_footer_delete=Ve.jr)(e),s._vscf_message_info_footer_shallow_copy=e=>(s._vscf_message_info_footer_shallow_copy=Ve.kr)(e),s._vscf_message_info_footer_has_signer_infos=e=>(s._vscf_message_info_footer_has_signer_infos=Ve.lr)(e),s._vscf_message_info_footer_signer_infos=e=>(s._vscf_message_info_footer_signer_infos=Ve.mr)(e),s._vscf_message_info_footer_signer_hash_alg_info=e=>(s._vscf_message_info_footer_signer_hash_alg_info=Ve.nr)(e),s._vscf_message_info_footer_signer_digest=(e,t)=>(s._vscf_message_info_footer_signer_digest=Ve.or)(e,t),s._vscf_oid_from_alg_id=(e,t)=>(s._vscf_oid_from_alg_id=Ve.pr)(e,t),s._vscf_oid_to_alg_id=e=>(s._vscf_oid_to_alg_id=Ve.qr)(e),s._vscf_oid_equal=(e,t)=>(s._vscf_oid_equal=Ve.rr)(e,t),s._vscf_oid_from_id=(e,t)=>(s._vscf_oid_from_id=Ve.sr)(e,t),s._vscf_oid_to_id=e=>(s._vscf_oid_to_id=Ve.tr)(e),s._vscf_oid_id_to_alg_id=e=>(s._vscf_oid_id_to_alg_id=Ve.ur)(e),s._vscf_padding_params_new=()=>(s._vscf_padding_params_new=Ve.vr)(),s._vscf_padding_params_new_with_constraints=(e,t)=>(s._vscf_padding_params_new_with_constraints=Ve.wr)(e,t),s._vscf_padding_params_delete=e=>(s._vscf_padding_params_delete=Ve.xr)(e),s._vscf_padding_params_shallow_copy=e=>(s._vscf_padding_params_shallow_copy=Ve.yr)(e),s._vscf_padding_params_frame=e=>(s._vscf_padding_params_frame=Ve.zr)(e),s._vscf_padding_params_frame_max=e=>(s._vscf_padding_params_frame_max=Ve.Ar)(e),s._vscf_password_recipient_info_new=()=>(s._vscf_password_recipient_info_new=Ve.Br)(),s._vscf_password_recipient_info_new_with_members=(e,t)=>(s._vscf_password_recipient_info_new_with_members=Ve.Cr)(e,t),s._vscf_password_recipient_info_delete=e=>(s._vscf_password_recipient_info_delete=Ve.Dr)(e),s._vscf_password_recipient_info_shallow_copy=e=>(s._vscf_password_recipient_info_shallow_copy=Ve.Er)(e),s._vscf_password_recipient_info_key_encryption_algorithm=e=>(s._vscf_password_recipient_info_key_encryption_algorithm=Ve.Fr)(e),s._vscf_password_recipient_info_encrypted_key=(e,t)=>(s._vscf_password_recipient_info_encrypted_key=Ve.Gr)(e,t),s._vscf_password_recipient_info_list_new=()=>(s._vscf_password_recipient_info_list_new=Ve.Hr)(),s._vscf_password_recipient_info_list_delete=e=>(s._vscf_password_recipient_info_list_delete=Ve.Ir)(e),s._vscf_password_recipient_info_list_shallow_copy=e=>(s._vscf_password_recipient_info_list_shallow_copy=Ve.Jr)(e),s._vscf_password_recipient_info_list_has_item=e=>(s._vscf_password_recipient_info_list_has_item=Ve.Kr)(e),s._vscf_password_recipient_info_list_item=e=>(s._vscf_password_recipient_info_list_item=Ve.Lr)(e),s._vscf_password_recipient_info_list_has_next=e=>(s._vscf_password_recipient_info_list_has_next=Ve.Mr)(e),s._vscf_password_recipient_info_list_next=e=>(s._vscf_password_recipient_info_list_next=Ve.Nr)(e),s._vscf_password_recipient_info_list_has_prev=e=>(s._vscf_password_recipient_info_list_has_prev=Ve.Or)(e),s._vscf_password_recipient_info_list_prev=e=>(s._vscf_password_recipient_info_list_prev=Ve.Pr)(e),s._vscf_password_recipient_info_list_clear=e=>(s._vscf_password_recipient_info_list_clear=Ve.Qr)(e),s._vscf_pem_wrapped_len=(e,t)=>(s._vscf_pem_wrapped_len=Ve.Rr)(e,t),s._vscf_pem_wrap=(e,t,_)=>(s._vscf_pem_wrap=Ve.Sr)(e,t,_),s._vscf_pem_unwrapped_len=e=>(s._vscf_pem_unwrapped_len=Ve.Tr)(e),s._vscf_pem_unwrap=(e,t)=>(s._vscf_pem_unwrap=Ve.Ur)(e,t),s._vscf_pem_title=(e,t)=>(s._vscf_pem_title=Ve.Vr)(e,t),s._vscf_recipient_cipher_release_random=e=>(s._vscf_recipient_cipher_release_random=Ve.Wr)(e),s._vscf_recipient_cipher_release_encryption_cipher=e=>(s._vscf_recipient_cipher_release_encryption_cipher=Ve.Xr)(e),s._vscf_recipient_cipher_release_encryption_padding=e=>(s._vscf_recipient_cipher_release_encryption_padding=Ve.Yr)(e),s._vscf_recipient_cipher_release_padding_params=e=>(s._vscf_recipient_cipher_release_padding_params=Ve.Zr)(e),s._vscf_recipient_cipher_release_signer_hash=e=>(s._vscf_recipient_cipher_release_signer_hash=Ve._r)(e),s._vscf_recipient_cipher_new=()=>(s._vscf_recipient_cipher_new=Ve.$r)(),s._vscf_recipient_cipher_delete=e=>(s._vscf_recipient_cipher_delete=Ve.as)(e),s._vscf_recipient_cipher_shallow_copy=e=>(s._vscf_recipient_cipher_shallow_copy=Ve.bs)(e),s._vscf_recipient_cipher_use_random=(e,t)=>(s._vscf_recipient_cipher_use_random=Ve.cs)(e,t),s._vscf_recipient_cipher_use_encryption_cipher=(e,t)=>(s._vscf_recipient_cipher_use_encryption_cipher=Ve.ds)(e,t),s._vscf_recipient_cipher_use_encryption_padding=(e,t)=>(s._vscf_recipient_cipher_use_encryption_padding=Ve.es)(e,t),s._vscf_recipient_cipher_use_padding_params=(e,t)=>(s._vscf_recipient_cipher_use_padding_params=Ve.fs)(e,t),s._vscf_recipient_cipher_use_signer_hash=(e,t)=>(s._vscf_recipient_cipher_use_signer_hash=Ve.gs)(e,t),s._vscf_recipient_cipher_has_key_recipient=(e,t)=>(s._vscf_recipient_cipher_has_key_recipient=Ve.hs)(e,t),s._vscf_recipient_cipher_add_key_recipient=(e,t,_)=>(s._vscf_recipient_cipher_add_key_recipient=Ve.is)(e,t,_),s._vscf_recipient_cipher_clear_recipients=e=>(s._vscf_recipient_cipher_clear_recipients=Ve.js)(e),s._vscf_recipient_cipher_add_signer=(e,t,_)=>(s._vscf_recipient_cipher_add_signer=Ve.ks)(e,t,_),s._vscf_recipient_cipher_clear_signers=e=>(s._vscf_recipient_cipher_clear_signers=Ve.ls)(e),s._vscf_recipient_cipher_custom_params=e=>(s._vscf_recipient_cipher_custom_params=Ve.ms)(e),s._vscf_recipient_cipher_start_encryption=e=>(s._vscf_recipient_cipher_start_encryption=Ve.ns)(e),s._vscf_recipient_cipher_start_signed_encryption=(e,t)=>(s._vscf_recipient_cipher_start_signed_encryption=Ve.os)(e,t),s._vscf_recipient_cipher_message_info_len=e=>(s._vscf_recipient_cipher_message_info_len=Ve.ps)(e),s._vscf_recipient_cipher_pack_message_info=(e,t)=>(s._vscf_recipient_cipher_pack_message_info=Ve.qs)(e,t),s._vscf_recipient_cipher_encryption_out_len=(e,t)=>(s._vscf_recipient_cipher_encryption_out_len=Ve.rs)(e,t),s._vscf_recipient_cipher_message_info_footer_len=e=>(s._vscf_recipient_cipher_message_info_footer_len=Ve.ss)(e),s._vscf_recipient_cipher_process_encryption=(e,t,_)=>(s._vscf_recipient_cipher_process_encryption=Ve.ts)(e,t,_),s._vscf_recipient_cipher_finish_encryption=(e,t)=>(s._vscf_recipient_cipher_finish_encryption=Ve.us)(e,t),s._vscf_recipient_cipher_start_decryption_with_key=(e,t,_,r)=>(s._vscf_recipient_cipher_start_decryption_with_key=Ve.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=Ve.ws)(e,t,_,r,n),s._vscf_recipient_cipher_decryption_out_len=(e,t)=>(s._vscf_recipient_cipher_decryption_out_len=Ve.xs)(e,t),s._vscf_recipient_cipher_process_decryption=(e,t,_)=>(s._vscf_recipient_cipher_process_decryption=Ve.ys)(e,t,_),s._vscf_recipient_cipher_finish_decryption=(e,t)=>(s._vscf_recipient_cipher_finish_decryption=Ve.zs)(e,t),s._vscf_recipient_cipher_is_data_signed=e=>(s._vscf_recipient_cipher_is_data_signed=Ve.As)(e),s._vscf_recipient_cipher_signer_infos=e=>(s._vscf_recipient_cipher_signer_infos=Ve.Bs)(e),s._vscf_recipient_cipher_verify_signer_info=(e,t,_)=>(s._vscf_recipient_cipher_verify_signer_info=Ve.Cs)(e,t,_),s._vscf_recipient_cipher_pack_message_info_footer=(e,t)=>(s._vscf_recipient_cipher_pack_message_info_footer=Ve.Ds)(e,t),s._vscf_signed_data_info_new=()=>(s._vscf_signed_data_info_new=Ve.Es)(),s._vscf_signed_data_info_delete=e=>(s._vscf_signed_data_info_delete=Ve.Fs)(e),s._vscf_signed_data_info_shallow_copy=e=>(s._vscf_signed_data_info_shallow_copy=Ve.Gs)(e),s._vscf_signed_data_info_hash_alg_info=e=>(s._vscf_signed_data_info_hash_alg_info=Ve.Hs)(e),s._vscf_signer_release_hash=e=>(s._vscf_signer_release_hash=Ve.Is)(e),s._vscf_signer_release_random=e=>(s._vscf_signer_release_random=Ve.Js)(e),s._vscf_signer_new=()=>(s._vscf_signer_new=Ve.Ks)(),s._vscf_signer_delete=e=>(s._vscf_signer_delete=Ve.Ls)(e),s._vscf_signer_shallow_copy=e=>(s._vscf_signer_shallow_copy=Ve.Ms)(e),s._vscf_signer_use_hash=(e,t)=>(s._vscf_signer_use_hash=Ve.Ns)(e,t),s._vscf_signer_use_random=(e,t)=>(s._vscf_signer_use_random=Ve.Os)(e,t),s._vscf_signer_reset=e=>(s._vscf_signer_reset=Ve.Ps)(e),s._vscf_signer_append_data=(e,t)=>(s._vscf_signer_append_data=Ve.Qs)(e,t),s._vscf_signer_signature_len=(e,t)=>(s._vscf_signer_signature_len=Ve.Rs)(e,t),s._vscf_signer_sign=(e,t,_)=>(s._vscf_signer_sign=Ve.Ss)(e,t,_),s._vscf_signer_info_new=()=>(s._vscf_signer_info_new=Ve.Ts)(),s._vscf_signer_info_delete=e=>(s._vscf_signer_info_delete=Ve.Us)(e),s._vscf_signer_info_shallow_copy=e=>(s._vscf_signer_info_shallow_copy=Ve.Vs)(e),s._vscf_signer_info_signer_id=(e,t)=>(s._vscf_signer_info_signer_id=Ve.Ws)(e,t),s._vscf_signer_info_signer_alg_info=e=>(s._vscf_signer_info_signer_alg_info=Ve.Xs)(e),s._vscf_signer_info_signature=(e,t)=>(s._vscf_signer_info_signature=Ve.Ys)(e,t),s._vscf_signer_info_list_new=()=>(s._vscf_signer_info_list_new=Ve.Zs)(),s._vscf_signer_info_list_delete=e=>(s._vscf_signer_info_list_delete=Ve._s)(e),s._vscf_signer_info_list_shallow_copy=e=>(s._vscf_signer_info_list_shallow_copy=Ve.$s)(e),s._vscf_signer_info_list_has_item=e=>(s._vscf_signer_info_list_has_item=Ve.at)(e),s._vscf_signer_info_list_item=e=>(s._vscf_signer_info_list_item=Ve.bt)(e),s._vscf_signer_info_list_has_next=e=>(s._vscf_signer_info_list_has_next=Ve.ct)(e),s._vscf_signer_info_list_next=e=>(s._vscf_signer_info_list_next=Ve.dt)(e),s._vscf_signer_info_list_has_prev=e=>(s._vscf_signer_info_list_has_prev=Ve.et)(e),s._vscf_signer_info_list_prev=e=>(s._vscf_signer_info_list_prev=Ve.ft)(e),s._vscf_signer_info_list_clear=e=>(s._vscf_signer_info_list_clear=Ve.gt)(e),s._vscf_verifier_new=()=>(s._vscf_verifier_new=Ve.ht)(),s._vscf_verifier_delete=e=>(s._vscf_verifier_delete=Ve.it)(e),s._vscf_verifier_shallow_copy=e=>(s._vscf_verifier_shallow_copy=Ve.jt)(e),s._vscf_verifier_reset=(e,t)=>(s._vscf_verifier_reset=Ve.kt)(e,t),s._vscf_verifier_append_data=(e,t)=>(s._vscf_verifier_append_data=Ve.lt)(e,t),s._vscf_verifier_verify=(e,t)=>(s._vscf_verifier_verify=Ve.mt)(e,t),s._vsc_buffer_new=()=>(s._vsc_buffer_new=Ve.nt)(),s._vsc_buffer_new_with_capacity=e=>(s._vsc_buffer_new_with_capacity=Ve.ot)(e),s._vsc_buffer_delete=e=>(s._vsc_buffer_delete=Ve.pt)(e),s._vsc_buffer_data=(e,t)=>(s._vsc_buffer_data=Ve.qt)(e,t),s._vsc_buffer_make_secure=e=>(s._vsc_buffer_make_secure=Ve.rt)(e),s._vsc_buffer_bytes=e=>(s._vsc_buffer_bytes=Ve.st)(e),s._vsc_buffer_len=e=>(s._vsc_buffer_len=Ve.tt)(e),s._vsc_data_ctx_size=()=>(s._vsc_data_ctx_size=Ve.ut)(),s._vsc_data=(e,t,_)=>(s._vsc_data=Ve.vt)(e,t,_),s._vsc_data_len=e=>(s._vsc_data_len=Ve.wt)(e),s._vsc_data_bytes=e=>(s._vsc_data_bytes=Ve.xt)(e);var Ge,je=()=>(je=Ve.yt)(),qe=(e,t)=>(qe=Ve.zt)(e,t);function Xe(){function e(){if(!Ge&&(Ge=!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=Ve.At)(e),s._free=e=>(s._free=Ve.Bt)(e),k=function e(){Ge||Xe(),Ge||(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}(t);var _=t.exports,r={};function s(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 n(e,t){if(s(e,t),0==t)throw new TypeError(`'${e}' is NULL`)}r.ensureNumber=s,r.ensureString=function(e,t){if(!("string"==typeof t||t instanceof String))throw new TypeError(`'${e}' is not a string`)},r.ensureBoolean=function(e,t){if("boolean"!=typeof t)throw new TypeError(`'${e}' is not a boolean`)},r.ensureByteArray=function(e,t){if(!(t instanceof Uint8Array))throw new TypeError(`'${e}' is not an Uint8Array`)},r.ensureClass=function(e,t,_){if(!(t instanceof _))throw new TypeError(`'${e}' is not an instance of the class ${_.name}`);n(e,t.ctxPtr)},r.ensureNotNull=n,r.ensureImplementInterface=function(e,t,_,r,s){if(n(e,t.ctxPtr),!s.isImplemented(t.ctxPtr,r))throw new TypeError(`'${e}' does not implement interface '${_}'`)};const c=r,i=r,a=r,o=r,l=r,f=r,u=r,d=r,h=r,v=r,p=r,y=r,P=r,x=r,g=r,m=r,E=r,w=r,b=r,k=r,I=r,N=r,A=r,C=r,T=r,F=r,K=r,S=r,L=r,R=r,z=r,B=r,U=r,D=r,Y=r,H=r,M=r,O=r,V=r,G=r,j=r,q=r,X=r,W=r,Z=r,$=r,J=r,Q=r,ee=r,te=r,_e=r,re=r,se=r,ne=r,ce=r,ie=r,ae=r,oe=r,le=r,fe=r,ue=r,de=r,he=r,ve=r,pe=r,ye=r,Pe=r,xe=r,ge=r,me=r,Ee=r,we=r,be=r,ke=r,Ie=r,Ne=r,Ae=r,Ce=r,Te=r,Fe=r,Ke=r,Se=r,Le=_,Re=(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}),ze=(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,_)}},Be=(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}),Ue=(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 _},De=(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}),Ye=(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}),He=(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}),Me=(e,t)=>Object.freeze({GROUP_INFO:0,REGULAR:1}),Oe=(e,t)=>Object.freeze({INITIAL:0,ENCRYPTION:1,DECRYPTION:2}),Ve=(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 o.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_data_encryption_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}keyRecipientInfoList(){let _;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_key_recipient_info_list(this.ctxPtr),t.KeyRecipientInfoList.newAndUseCContext(_)}passwordRecipientInfoList(){let _;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_password_recipient_info_list(this.ctxPtr),t.PasswordRecipientInfoList.newAndUseCContext(_)}hasCustomParams(){let t;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_custom_params(this.ctxPtr),!!t}customParams(){let _;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_custom_params(this.ctxPtr),t.MessageInfoCustomParams.newAndUseCContext(_)}hasCipherKdfAlgInfo(){let t;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_cipher_kdf_alg_info(this.ctxPtr),!!t}cipherKdfAlgInfo(){let _;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_kdf_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}hasCipherPaddingAlgInfo(){let t;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_cipher_padding_alg_info(this.ctxPtr),!!t}cipherPaddingAlgInfo(){let _;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_padding_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}hasFooterInfo(){let t;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_footer_info(this.ctxPtr),!!t}footerInfo(){let _;return o.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_info(this.ctxPtr),t.FooterInfo.newAndUseCContext(_)}clear(){o.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_clear(this.ctxPtr)}}return _},Ge=(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){l.ensureByteArray("recipientId",r),l.ensureImplementInterface("keyEncryptionAlgorithm",s,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),l.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 f=n.length*n.BYTES_PER_ELEMENT,u=e._malloc(f);e.HEAP8.set(n,u);const d=e._vsc_data_ctx_size(),h=e._malloc(d);let v;e._vsc_data(h,u,f);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(u),e._free(h)}}recipientId(){l.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 l.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_key_encryption_algorithm(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}encryptedKey(){l.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 _},je=(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 f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_item(this.ctxPtr),!!t}item(){let _;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_list_item(this.ctxPtr),t.KeyRecipientInfo.newAndUseCContext(_)}hasNext(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_next(this.ctxPtr),!!t}next(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_next(this.ctxPtr),_.newAndUseCContext(t)}hasPrev(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return f.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_prev(this.ctxPtr),_.newAndUseCContext(t)}clear(){f.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_recipient_info_list_clear(this.ctxPtr)}}return _},qe=(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){u.ensureImplementInterface("keyEncryptionAlgorithm",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),u.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 u.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_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_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 _},Xe=(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 d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_item(this.ctxPtr),!!t}item(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_list_item(this.ctxPtr),t.PasswordRecipientInfo.newAndUseCContext(_)}hasNext(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_next(this.ctxPtr),!!t}next(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_next(this.ctxPtr),_.newAndUseCContext(t)}hasPrev(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_prev(this.ctxPtr),_.newAndUseCContext(t)}clear(){d.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_password_recipient_info_list_clear(this.ctxPtr)}}return _},We=(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 _},Ze=(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(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureByteArray("recipientId",_),y.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(){y.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_recipients(this.ctxPtr)}addSigner(_,r){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureByteArray("signerId",_),y.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(){y.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_signers(this.ctxPtr)}customParams(){let _;return y.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_custom_params(this.ctxPtr),t.MessageInfoCustomParams.newAndUseCContext(_)}startEncryption(){y.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_recipient_cipher_start_encryption(this.ctxPtr);t.FoundationError.handleStatusCode(_)}startSignedEncryption(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureNumber("dataSize",_);const r=e._vscf_recipient_cipher_start_signed_encryption(this.ctxPtr,_);t.FoundationError.handleStatusCode(r)}messageInfoLen(){let t;return y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_message_info_len(this.ctxPtr),t}packMessageInfo(){y.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 y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureNumber("dataLen",t),_=e._vscf_recipient_cipher_encryption_out_len(this.ctxPtr,t),_}processEncryption(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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(){y.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){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureByteArray("recipientId",_),y.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),y.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){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureByteArray("recipientId",_),y.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),y.ensureByteArray("messageInfo",s),y.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(),P=e._malloc(p);e._vsc_data(P,v,h);try{const _=e._vscf_recipient_cipher_start_verified_decryption_with_key(this.ctxPtr,o,r.ctxPtr,d,P);t.FoundationError.handleStatusCode(_)}finally{e._free(i),e._free(o),e._free(f),e._free(d),e._free(v),e._free(P)}}decryptionOutLen(t){let _;return y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureNumber("dataLen",t),_=e._vscf_recipient_cipher_decryption_out_len(this.ctxPtr,t),_}processDecryption(_){y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.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(){y.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 y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_is_data_signed(this.ctxPtr),!!t}signerInfos(){let _;return y.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_signer_infos(this.ctxPtr),t.SignerInfoList.newAndUseCContext(_)}verifySignerInfo(_,r){let s;return y.ensureNotNull("this.ctxPtr",this.ctxPtr),y.ensureClass("signerInfo",_,t.SignerInfo),y.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 y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_message_info_footer_len(this.ctxPtr),t}packMessageInfoFooter(){y.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 _},$e=(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,_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureByteArray("key",t),P.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,_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureByteArray("key",t),P.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,_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.ensureByteArray("key",t),P.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(){P.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_custom_params_clear(this.ctxPtr)}findInt(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.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(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.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(_){P.ensureNotNull("this.ctxPtr",this.ctxPtr),P.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 P.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_custom_params_has_params(this.ctxPtr),!!t}}return _},Je=(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(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.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(){x.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_provider_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setRsaParams(t){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureNumber("bitlen",t),e._vscf_key_provider_set_rsa_params(this.ctxPtr,t)}generatePrivateKey(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.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(){x.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){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureNumber("cipherAlgId",_),x.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){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureNumber("firstKeyAlgId",_),x.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){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureNumber("cipherFirstKeyAlgId",_),x.ensureNumber("cipherSecondKeyAlgId",r),x.ensureNumber("signerFirstKeyAlgId",s),x.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(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.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(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.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 x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_key_provider_exported_public_key_len(this.ctxPtr,_.ctxPtr),r}exportPublicKey(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.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 x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_key_provider_exported_private_key_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKey(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.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 _},Qe=(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(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.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(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.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(){g.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_reset(this.ctxPtr)}appendData(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);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 g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_signer_signature_len(this.ctxPtr,_.ctxPtr),r}sign(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.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 _},et=(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(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.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){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,_);try{e._vscf_verifier_append_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}verify(_){let r;return m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_verifier_verify(this.ctxPtr,_.ctxPtr),!!r}}return _},tt=(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(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.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(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.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(){E.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_client_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}blind(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.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){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureByteArray("password",_),E.ensureByteArray("hardenedPoint",r),E.ensureByteArray("deblindFactor",s),E.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 w=t.BrainkeyClient.POINT_LEN,b=e._vsc_buffer_new_with_capacity(w);try{const _=e._vscf_brainkey_client_deblind(this.ctxPtr,o,d,y,m,b);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(b),s=e._vsc_buffer_len(b);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(b)}}}return _},_t=(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(_){w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.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(_){w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.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(){w.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_server_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateIdentitySecret(){w.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){w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.ensureByteArray("identitySecret",_),w.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 _},rt=(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 b.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_get_type(this.ctxPtr),t}getSessionId(){b.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 b.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_get_epoch(this.ctxPtr),t}serializeLen(){let t;return b.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_serialize_len(this.ctxPtr),t}serialize(){b.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){b.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 _},st=(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(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.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(){k.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_ticket_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupTicketAsNew(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.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 k.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_group_session_ticket_get_ticket_message(this.ctxPtr),t.GroupSessionMessage.newAndUseCContext(_)}}return _},nt=(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(_){I.ensureNotNull("this.ctxPtr",this.ctxPtr),I.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 I.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_get_current_epoch(this.ctxPtr),t}setupDefaults(){I.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}getSessionId(){I.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(_){I.ensureNotNull("this.ctxPtr",this.ctxPtr),I.ensureClass("message",_,t.GroupSessionMessage);const r=e._vscf_group_session_add_epoch(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_,r){I.ensureNotNull("this.ctxPtr",this.ctxPtr),I.ensureByteArray("plainText",_),I.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 I.ensureNotNull("this.ctxPtr",this.ctxPtr),I.ensureClass("message",_,t.GroupSessionMessage),r=e._vscf_group_session_decrypt_len(this.ctxPtr,_.ctxPtr),r}decrypt(_,r){I.ensureNotNull("this.ctxPtr",this.ctxPtr),I.ensureClass("message",_,t.GroupSessionMessage),I.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(){I.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 _},ct=(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(_){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.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(){N.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_message_info_editor_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}unpack(_){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.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){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.ensureByteArray("ownerRecipientId",_),N.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){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.ensureByteArray("recipientId",_),N.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){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.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(){N.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_editor_remove_all(this.ctxPtr)}packedLen(){let t;return N.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_editor_packed_len(this.ctxPtr),t}pack(){N.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 _},it=(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(){A.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 A.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_signer_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signature(){A.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 _},at=(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 C.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_item(this.ctxPtr),!!t}item(){let _;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_list_item(this.ctxPtr),t.SignerInfo.newAndUseCContext(_)}hasNext(){let t;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_next(this.ctxPtr),!!t}next(){let t;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_next(this.ctxPtr),_.newAndTakeCContext(t)}hasPrev(){let t;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_prev(this.ctxPtr),_.newAndTakeCContext(t)}clear(){C.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_info_list_clear(this.ctxPtr)}}return _},ot=(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 T.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_footer_has_signer_infos(this.ctxPtr),!!t}signerInfos(){let _;return T.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_infos(this.ctxPtr),t.SignerInfoList.newAndUseCContext(_)}signerHashAlgInfo(){let _;return T.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerDigest(){T.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 _},lt=(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 F.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signed_data_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},ft=(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 K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_footer_info_has_signed_data_info(this.ctxPtr),!!t}signedDataInfo(){let _;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_footer_info_signed_data_info(this.ctxPtr),t.SignedDataInfo.newAndUseCContext(_)}setDataSize(t){K.ensureNotNull("this.ctxPtr",this.ctxPtr),K.ensureNumber("dataSize",t),e._vscf_footer_info_set_data_size(this.ctxPtr,t)}dataSize(){let t;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_footer_info_data_size(this.ctxPtr),t}}return _},ut=(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 S.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 S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound(this.ctxPtr),!!t}isHybrid(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid(this.ctxPtr),!!t}isCompoundHybrid(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid(this.ctxPtr),!!t}isCompoundHybridCipher(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid_cipher(this.ctxPtr),!!t}isCompoundHybridSigner(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid_signer(this.ctxPtr),!!t}isHybridPostQuantum(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum(this.ctxPtr),!!t}isHybridPostQuantumCipher(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum_cipher(this.ctxPtr),!!t}isHybridPostQuantumSigner(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum_signer(this.ctxPtr),!!t}algId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_alg_id(this.ctxPtr),t}compoundCipherAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_cipher_alg_id(this.ctxPtr),t}compoundSignerAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_signer_alg_id(this.ctxPtr),t}hybridFirstKeyAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_hybrid_first_key_alg_id(this.ctxPtr),t}hybridSecondKeyAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_hybrid_second_key_alg_id(this.ctxPtr),t}compoundHybridCipherFirstKeyAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_cipher_first_key_alg_id(this.ctxPtr),t}compoundHybridCipherSecondKeyAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_cipher_second_key_alg_id(this.ctxPtr),t}compoundHybridSignerFirstKeyAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_signer_first_key_alg_id(this.ctxPtr),t}compoundHybridSignerSecondKeyAlgId(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_signer_second_key_alg_id(this.ctxPtr),t}}return _},dt=(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 L.ensureNumber("frame",t),L.ensureNumber("frameMax",r),s=e._vscf_padding_params_new_with_constraints(t,r),_.newAndTakeCContext(s)}frame(){let t;return L.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_padding_params_frame(this.ctxPtr),t}frameMax(){let t;return L.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_padding_params_frame_max(this.ctxPtr),t}}return _},ht=(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 R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha224_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha224_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){R.ensureNotNull("this.ctxPtr",this.ctxPtr),R.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){R.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(){R.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha224_start(this.ctxPtr)}update(t){R.ensureNotNull("this.ctxPtr",this.ctxPtr),R.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(){R.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 _},vt=(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 z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha256_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha256_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){z.ensureNotNull("this.ctxPtr",this.ctxPtr),z.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){z.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(){z.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha256_start(this.ctxPtr)}update(t){z.ensureNotNull("this.ctxPtr",this.ctxPtr),z.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(){z.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 B.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha384_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return B.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha384_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_sha384_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_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(){B.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha384_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_sha384_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_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 _},yt=(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 U.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha512_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return U.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha512_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_sha512_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_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(){U.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha512_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_sha512_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_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 _},Pt=(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 D.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_gcm_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_gcm_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_aes256_gcm_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.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 D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.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 D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_decrypted_len(this.ctxPtr,t),_}setNonce(t){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.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){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.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 D.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_gcm_state(this.ctxPtr),t}startEncryption(){D.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_encryption(this.ctxPtr)}startDecryption(){D.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_decryption(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,_);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 D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_out_len(this.ctxPtr,t),_}encryptedOutLen(t){let _;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_encrypted_out_len(this.ctxPtr,t),_}decryptedOutLen(t){let _;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_decrypted_out_len(this.ctxPtr,t),_}finish(){D.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){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureByteArray("data",_),D.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 D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_auth_encrypted_len(this.ctxPtr,t),_}authDecrypt(_,r,s){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureByteArray("data",_),D.ensureByteArray("authData",r),D.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 D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_auth_decrypted_len(this.ctxPtr,t),_}setAuthData(t){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.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(){D.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(_){D.ensureNotNull("this.ctxPtr",this.ctxPtr),D.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 _},xt=(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 Y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_cbc_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_cbc_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_aes256_cbc_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.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 Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.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 Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_decrypted_len(this.ctxPtr,t),_}setNonce(t){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.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){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.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 Y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_cbc_state(this.ctxPtr),t}startEncryption(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_encryption(this.ctxPtr)}startDecryption(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_decryption(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,_);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 Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_out_len(this.ctxPtr,t),_}encryptedOutLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_encrypted_out_len(this.ctxPtr,t),_}decryptedOutLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_decrypted_out_len(this.ctxPtr,t),_}finish(){Y.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 _},gt=(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){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,_);try{e._vscf_asn1rd_reset(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}leftLen(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_left_len(this.ctxPtr),t}hasError(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_has_error(this.ctxPtr),!!t}status(){H.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1rd_status(this.ctxPtr);t.FoundationError.handleStatusCode(_)}getTag(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_tag(this.ctxPtr),t}getLen(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_len(this.ctxPtr),t}getDataLen(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_data_len(this.ctxPtr),t}readTag(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("tag",t),_=e._vscf_asn1rd_read_tag(this.ctxPtr,t),_}readContextTag(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("tag",t),_=e._vscf_asn1rd_read_context_tag(this.ctxPtr,t),_}readInt(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int(this.ctxPtr),t}readInt8(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int8(this.ctxPtr),t}readInt16(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int16(this.ctxPtr),t}readInt32(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int32(this.ctxPtr),t}readInt64(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int64(this.ctxPtr),t}readUint(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint(this.ctxPtr),t}readUint8(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint8(this.ctxPtr),t}readUint16(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint16(this.ctxPtr),t}readUint32(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint32(this.ctxPtr),t}readUint64(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint64(this.ctxPtr),t}readBool(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_bool(this.ctxPtr),!!t}readNull(){H.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null(this.ctxPtr)}readNullOptional(){H.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null_optional(this.ctxPtr)}readOctetStr(){H.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(){H.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(){H.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(){H.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){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.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 H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_sequence(this.ctxPtr),t}readSet(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_set(this.ctxPtr),t}}return _},mt=(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,_){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("out",t),M.ensureNumber("outLen",_),e._vscf_asn1wr_reset(this.ctxPtr,t,_)}finish(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureBoolean("doNotAdjust",t),_=e._vscf_asn1wr_finish(this.ctxPtr,t),_}bytes(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_bytes(this.ctxPtr),t}len(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_len(this.ctxPtr),t}writtenLen(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_written_len(this.ctxPtr),t}unwrittenLen(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_unwritten_len(this.ctxPtr),t}hasError(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_has_error(this.ctxPtr),!!t}status(){M.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1wr_status(this.ctxPtr);t.FoundationError.handleStatusCode(_)}reserve(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("len",t),_=e._vscf_asn1wr_reserve(this.ctxPtr,t),_}writeTag(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("tag",t),_=e._vscf_asn1wr_write_tag(this.ctxPtr,t),_}writeContextTag(t,_){let r;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("tag",t),M.ensureNumber("len",_),r=e._vscf_asn1wr_write_context_tag(this.ctxPtr,t,_),r}writeLen(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("len",t),_=e._vscf_asn1wr_write_len(this.ctxPtr,t),_}writeInt(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_int(this.ctxPtr,t),_}writeInt8(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_int8(this.ctxPtr,t),_}writeInt16(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_int16(this.ctxPtr,t),_}writeInt32(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_int32(this.ctxPtr,t),_}writeInt64(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_int64(this.ctxPtr,t),_}writeUint(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint(this.ctxPtr,t),_}writeUint8(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint8(this.ctxPtr,t),_}writeUint16(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint16(this.ctxPtr,t),_}writeUint32(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint32(this.ctxPtr,t),_}writeUint64(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint64(this.ctxPtr,t),_}writeBool(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureBoolean("value",t),_=e._vscf_asn1wr_write_bool(this.ctxPtr,t),_}writeNull(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_write_null(this.ctxPtr),t}writeOctetStr(t){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.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){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.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){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);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){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.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){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.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 M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("len",t),_=e._vscf_asn1wr_write_sequence(this.ctxPtr,t),_}writeSet(t){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureNumber("len",t),_=e._vscf_asn1wr_write_set(this.ctxPtr,t),_}}return _},Et=(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 O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_len(this.ctxPtr),t}bitlen(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_is_valid(this.ctxPtr),!!t}keyExponent(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_key_exponent(this.ctxPtr),t}}return _},wt=(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 V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_len(this.ctxPtr),t}bitlen(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}}return _},bt=(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(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("keyData",_),G.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(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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 G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_rsa_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("keyData",_),G.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(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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 G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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 G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),G.ensureNumber("dataLen",r),s=e._vscf_rsa_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),G.ensureNumber("dataLen",r),s=e._vscf_rsa_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),G.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 G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),G.ensureNumber("dataLen",r),s=e._vscf_rsa_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),G.ensureNumber("dataLen",r),s=e._vscf_rsa_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),G.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 G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),G.ensureNumber("hashId",r),G.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 G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_rsa_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),G.ensureNumber("hashId",r),G.ensureByteArray("digest",s),G.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(){G.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_rsa_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.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 _},kt=(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 j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_len(this.ctxPtr),t}bitlen(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_is_valid(this.ctxPtr),!!t}}return _},It=(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 q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_len(this.ctxPtr),t}bitlen(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}}return _},Nt=(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(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureClass("ecies",_,t.Ecies),e._vscf_ecc_release_ecies(this.ctxPtr),e._vscf_ecc_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureByteArray("keyData",_),X.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(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureByteArray("keyData",_),X.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(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),X.ensureNumber("dataLen",r),s=e._vscf_ecc_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),X.ensureNumber("dataLen",r),s=e._vscf_ecc_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),X.ensureNumber("dataLen",r),s=e._vscf_ecc_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),X.ensureNumber("dataLen",r),s=e._vscf_ecc_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),X.ensureNumber("hashId",r),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),X.ensureNumber("hashId",r),X.ensureByteArray("digest",s),X.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){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ecc_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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 X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.ensureByteArray("encapsulatedKey",_),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);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(){X.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ecc_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){X.ensureNotNull("this.ctxPtr",this.ctxPtr),X.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 _},At=(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 W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_entropy_accumulator_is_strong(this.ctxPtr),!!t}gather(_){W.ensureNotNull("this.ctxPtr",this.ctxPtr),W.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(){W.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_entropy_accumulator_setup_defaults(this.ctxPtr)}addSource(_,r){W.ensureNotNull("this.ctxPtr",this.ctxPtr),W.ensureImplementInterface("source",_,"Foundation.EntropySource",t.FoundationInterfaceTag.ENTROPY_SOURCE,t.FoundationInterface),W.ensureNumber("threshold",r),e._vscf_entropy_accumulator_add_source(this.ctxPtr,_.ctxPtr,r)}}return _},Ct=(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(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.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(_){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.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(){Z.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupDefaults(){Z.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}enablePredictionResistance(){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ctr_drbg_enable_prediction_resistance(this.ctxPtr)}setReseedInterval(t){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureNumber("interval",t),e._vscf_ctr_drbg_set_reseed_interval(this.ctxPtr,t)}setEntropyLen(t){Z.ensureNotNull("this.ctxPtr",this.ctxPtr),Z.ensureNumber("len",t),e._vscf_ctr_drbg_set_entropy_len(this.ctxPtr,t)}}return _},Tt=(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(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.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 $.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hmac_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hmac_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.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 $.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hmac_digest_len(this.ctxPtr),t}mac(t,_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureByteArray("key",t),$.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){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.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){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.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(){$.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(){$.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_hmac_reset(this.ctxPtr)}}return _},Ft=(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(_){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.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 J.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hkdf_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return J.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hkdf_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.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,_){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureByteArray("data",t),J.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,_){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureByteArray("salt",t),J.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){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.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 _},Kt=(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(_){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.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 Q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_kdf1_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return Q.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf1_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_kdf1_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureByteArray("data",t),Q.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 _},St=(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(_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.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 ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_kdf2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf2_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_kdf2_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_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 _},Lt=(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(_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.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(){te.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_fake_random_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}isStrong(){let t;return te.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_fake_random_is_strong(this.ctxPtr),!!t}gather(_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.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){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureNumber("byteSource",t),e._vscf_fake_random_setup_source_byte(this.ctxPtr,t)}setupSourceData(t){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.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 _},Rt=(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(_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.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 _e.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pkcs5_pbkdf2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return _e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbkdf2_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_pkcs5_pbkdf2_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_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,_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.ensureByteArray("salt",t),_e.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){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.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(){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs5_pbkdf2_setup_defaults(this.ctxPtr)}}return _},zt=(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(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.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(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.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 re.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pkcs5_pbes2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return re.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbes2_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_pkcs5_pbes2_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.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 re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.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 re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_decrypted_len(this.ctxPtr,t),_}reset(t){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.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 _},Bt=(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 se.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_seed_entropy_source_is_strong(this.ctxPtr),!!t}gather(_){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.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){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.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 _},Ut=(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(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.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(){ne.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_material_rng_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}resetKeyMaterial(t){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.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 _},Dt=(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 ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_len(this.ctxPtr),t}bitlen(){let t;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_is_valid(this.ctxPtr),!!t}data(){ce.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 _},Yt=(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 ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return ie.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_len(this.ctxPtr),t}bitlen(){let t;return ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return ie.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}data(){ie.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 ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_has_public_key(this.ctxPtr),!!t}setPublicKey(_){ie.ensureNotNull("this.ctxPtr",this.ctxPtr),ie.ensureClass("rawPublicKey",_,t.RawPublicKey),e._vscf_raw_private_key_set_public_key(this.ctxPtr,_.ctxPtr)}getPublicKey(){let _;return ie.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_get_public_key(this.ctxPtr),t.RawPublicKey.newAndUseCContext(_)}}return _},Ht=(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(_){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.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 ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_pkcs8_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.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 ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_pkcs8_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.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(){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs8_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.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(_){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.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 _},Mt=(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(_){oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.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 oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_sec1_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.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 oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_sec1_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.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(){oe.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sec1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.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(_){oe.ensureNotNull("this.ctxPtr",this.ctxPtr),oe.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 _},Ot=(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(_){le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.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 le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_key_asn1_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_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 le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_key_asn1_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_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(){le.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_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_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(_){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_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 _},Vt=(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(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.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(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.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(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.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(){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_deserializer_setup_defaults(this.ctxPtr)}deserializePublicKeyInplace(){fe.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(){fe.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 _},Gt=(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(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("ecies",_,t.Ecies),e._vscf_ed25519_release_ecies(this.ctxPtr),e._vscf_ed25519_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureByteArray("keyData",_),ue.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(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureByteArray("keyData",_),ue.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(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ue.ensureNumber("dataLen",r),s=e._vscf_ed25519_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ue.ensureNumber("dataLen",r),s=e._vscf_ed25519_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ue.ensureNumber("dataLen",r),s=e._vscf_ed25519_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ue.ensureNumber("dataLen",r),s=e._vscf_ed25519_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ue.ensureNumber("hashId",r),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ue.ensureNumber("hashId",r),ue.ensureByteArray("digest",s),ue.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){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ed25519_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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 ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.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){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureByteArray("encapsulatedKey",_),ue.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(){ue.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ed25519_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){ue.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 _},jt=(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(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureClass("ecies",_,t.Ecies),e._vscf_curve25519_release_ecies(this.ctxPtr),e._vscf_curve25519_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureByteArray("keyData",_),de.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(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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 de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_curve25519_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureByteArray("keyData",_),de.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(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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 de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_curve25519_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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 de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),de.ensureNumber("dataLen",r),s=e._vscf_curve25519_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),de.ensureNumber("dataLen",r),s=e._vscf_curve25519_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),de.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 de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),de.ensureNumber("dataLen",r),s=e._vscf_curve25519_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),de.ensureNumber("dataLen",r),s=e._vscf_curve25519_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),de.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){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),de.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 de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_curve25519_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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 de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_curve25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.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){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureByteArray("encapsulatedKey",_),de.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(){de.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_curve25519_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){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_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 _},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="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(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.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 he.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_falcon_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_falcon_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.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(_){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_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(_){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_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){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_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(_){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_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 he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_falcon_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_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(_){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_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){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_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(_){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_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 he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_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_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 he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_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_falcon_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_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 he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_falcon_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_falcon_verify_hash(this.ctxPtr,_.ctxPtr,r,o,d),!!h}finally{e._free(i),e._free(o),e._free(f),e._free(d)}}setupDefaults(){he.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_falcon_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_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 _},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="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(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.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(_){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_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(_){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_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){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_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(_){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_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 ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_round5_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_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(_){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_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){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_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(_){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_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 ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_round5_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_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 ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.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 ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_round5_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_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){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_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(){ve.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_round5_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.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 _},Wt=(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 _},Zt=(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 ye.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_len(this.ctxPtr),t}bitlen(){let t;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_is_valid(this.ctxPtr),!!t}cipherKey(){let _;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_cipher_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_signer_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},$t=(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 Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_len(this.ctxPtr),t}bitlen(){let t;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}cipherKey(){let _;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_cipher_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_signer_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},Jt=(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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_key_alg_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureByteArray("keyData",_),xe.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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureByteArray("keyData",_),xe.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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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(_){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),xe.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),xe.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),xe.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),xe.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),xe.ensureNumber("hashId",r),xe.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 xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.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){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),xe.ensureNumber("hashId",r),xe.ensureByteArray("digest",s),xe.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(){xe.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_compound_key_alg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}makeKey(_,r){xe.ensureNotNull("this.ctxPtr",this.ctxPtr),xe.ensureImplementInterface("cipherKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),xe.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 _},Qt=(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 ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_key_alg_info_alg_id(this.ctxPtr),t}firstKeyAlgInfo(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_first_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKeyAlgInfo(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_second_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},e_=(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 me.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_len(this.ctxPtr),t}bitlen(){let t;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_is_valid(this.ctxPtr),!!t}firstKey(){let _;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_first_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_second_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},t_=(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 Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_len(this.ctxPtr),t}bitlen(){let t;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}firstKey(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_first_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_second_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},__=(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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureByteArray("keyData",_),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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 we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureByteArray("keyData",_),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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 we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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(_){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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 we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),we.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),we.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),we.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 we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),we.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),we.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),we.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 we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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 we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),we.ensureNumber("hashId",r),we.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 we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.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){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),we.ensureNumber("hashId",r),we.ensureByteArray("digest",s),we.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(){we.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_hybrid_key_alg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}makeKey(_,r){we.ensureNotNull("this.ctxPtr",this.ctxPtr),we.ensureImplementInterface("firstKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),we.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 _},r_=(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 be.ensureNumber("algId",t),r=e._vscf_simple_alg_info_new_with_alg_id(t),_.newAndTakeCContext(r)}algId(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_simple_alg_info_alg_id(this.ctxPtr),t}}return _},s_=(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 ke.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hash_based_alg_info_alg_id(this.ctxPtr),t}hashAlgInfo(){let _;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hash_based_alg_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},n_=(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){Ie.ensureNumber("algId",t),Ie.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 Ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_cipher_alg_info_alg_id(this.ctxPtr),t}nonce(){Ie.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 _},c_=(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 Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_salted_kdf_alg_info_alg_id(this.ctxPtr),t}hashAlgInfo(){let _;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_salted_kdf_alg_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}salt(){Ne.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 Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_salted_kdf_alg_info_iteration_count(this.ctxPtr),t}}return _},i_=(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 Ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pbe_alg_info_alg_id(this.ctxPtr),t}kdfAlgInfo(){let _;return Ae.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_kdf_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}cipherAlgInfo(){let _;return Ae.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_cipher_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},a_=(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 Ce.ensureNumber("algId",t),Ce.ensureNumber("keyId",r),Ce.ensureNumber("domainId",s),n=e._vscf_ecc_alg_info_new_with_members(t,r,s),_.newAndTakeCContext(n)}algId(){let t;return Ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_alg_id(this.ctxPtr),t}keyId(){let t;return Ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_key_id(this.ctxPtr),t}domainId(){let t;return Ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_domain_id(this.ctxPtr),t}}return _},o_=(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(_){Te.ensureNotNull("this.ctxPtr",this.ctxPtr),Te.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 Te.ensureNotNull("this.ctxPtr",this.ctxPtr),Te.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),r}serialize(_){Te.ensureNotNull("this.ctxPtr",this.ctxPtr),Te.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(){Te.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_serializer_setup_defaults(this.ctxPtr)}serializeInplace(_){let r;return Te.ensureNotNull("this.ctxPtr",this.ctxPtr),Te.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_info_der_serializer_serialize_inplace(this.ctxPtr,_.ctxPtr),r}}return _},l_=(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(_){Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),Fe.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(_){Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),Fe.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(){Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_deserializer_setup_defaults(this.ctxPtr)}deserializeInplace(){Fe.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 _},f_=(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(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.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(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.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 Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.ensureClass("messageInfo",_,t.MessageInfo),r=e._vscf_message_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),r}serialize(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.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){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.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(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.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 Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.ensureClass("messageInfoFooter",_,t.MessageInfoFooter),r=e._vscf_message_info_der_serializer_serialized_footer_len(this.ctxPtr,_.ctxPtr),r}serializeFooter(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.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(_){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),Ke.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(){Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_der_serializer_setup_defaults(this.ctxPtr)}}return _},u_=(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(_){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.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 Se.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return Se.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_random_padding_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_random_padding_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}configure(_){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureClass("params",_,t.PaddingParams),e._vscf_random_padding_configure(this.ctxPtr,_.ctxPtr)}paddedDataLen(t){let _;return Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureNumber("dataLen",t),_=e._vscf_random_padding_padded_data_len(this.ctxPtr,t),_}len(){let t;return Se.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_len(this.ctxPtr),t}lenMax(){let t;return Se.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_len_max(this.ctxPtr),t}startDataProcessing(){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_data_processing(this.ctxPtr)}processData(t){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.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(){Se.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(){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_padded_data_processing(this.ctxPtr)}processPaddedData(t){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.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 Se.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_finish_padded_data_processing_out_len(this.ctxPtr),t}finishPaddedDataProcessing(){Se.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 d_=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((e=>new Promise(((t,_)=>{Le(e).then((e=>{const _={};_.FoundationInterfaceTag=Re(),_.FoundationInterface=ze(e,_),_.FoundationImplTag=Be(),_.FoundationError=Ue(),_.Asn1Tag=De(),_.AlgId=Ye(),_.OidId=He(),_.GroupMsgType=Me(),_.CipherState=Oe(),_.Oid=((e,t)=>class{static fromAlgId(t){c.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){c.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 i;e._vsc_data(n,r,_);try{return i=e._vscf_oid_to_alg_id(n),i}finally{e._free(r),e._free(n)}}static fromId(t){c.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){c.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 i;e._vsc_data(n,r,_);try{return i=e._vscf_oid_to_id(n),i}finally{e._free(r),e._free(n)}}static idToAlgId(t){let _;return c.ensureNumber("oidId",t),_=e._vscf_oid_id_to_alg_id(t),_}static equal(t,_){c.ensureByteArray("lhs",t),c.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(),i=e._malloc(n);e._vsc_data(i,s,r);const a=_.length*_.BYTES_PER_ELEMENT,o=e._malloc(a);e.HEAP8.set(_,o);const l=e._vsc_data_ctx_size(),f=e._malloc(l);let u;e._vsc_data(f,o,a);try{return u=e._vscf_oid_equal(i,f),!!u}finally{e._free(s),e._free(i),e._free(o),e._free(f)}}})(e),_.Base64=((e,t)=>class{static encodedLen(t){let _;return i.ensureNumber("dataLen",t),_=e._vscf_base64_encoded_len(t),_}static encode(_){i.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 a=t.Base64.encodedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{e._vscf_base64_encode(c,o);const t=e._vsc_buffer_bytes(o),_=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+_)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(o)}}static decodedLen(t){let _;return i.ensureNumber("strLen",t),_=e._vscf_base64_decoded_len(t),_}static decode(_){i.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 a=t.Base64.decodedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_base64_decode(c,o);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(o)}}})(e,_),_.Pem=((e,t)=>class{static wrappedLen(t,_){let r;return a.ensureNumber("title",t),a.ensureNumber("dataLen",_),r=e._vscf_pem_wrapped_len(t,_),r}static wrap(_,r){a.ensureNumber("title",_),a.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 o=t.Pem.wrappedLen(_,r.length),l=e._vsc_buffer_new_with_capacity(o);try{e._vscf_pem_wrap(_,i,l);const t=e._vsc_buffer_bytes(l),r=e._vsc_buffer_len(l);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(l)}}static unwrappedLen(t){let _;return a.ensureNumber("pemLen",t),_=e._vscf_pem_unwrapped_len(t),_}static unwrap(_){a.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),o=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_pem_unwrap(c,o);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(o)}}static title(t){a.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=Ve(e,_),_.KeyRecipientInfo=Ge(e,_),_.KeyRecipientInfoList=je(e,_),_.PasswordRecipientInfo=qe(e,_),_.PasswordRecipientInfoList=Xe(e,_),_.AlgFactory=((e,t)=>class{static createHashFromInfo(_){let r;return h.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 h.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 h.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 h.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 h.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 h.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),h.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){v.ensureNumber("algId",_),v.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){v.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),v.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){v.ensureClass("publicKey",_,t.RawPublicKey),v.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){v.ensureClass("privateKey",_,t.RawPrivateKey),v.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=We(e,_),_.RecipientCipher=Ze(e,_),_.MessageInfoCustomParams=$e(e,_),_.KeyProvider=Je(e,_),_.Signer=Qe(e,_),_.Verifier=et(e,_),_.BrainkeyClient=tt(e,_),_.BrainkeyServer=_t(e,_),_.GroupSessionMessage=rt(e,_),_.GroupSessionTicket=st(e,_),_.GroupSession=nt(e,_),_.MessageInfoEditor=ct(e,_),_.SignerInfo=it(e,_),_.SignerInfoList=at(e,_),_.MessageInfoFooter=ot(e,_),_.SignedDataInfo=lt(e,_),_.FooterInfo=ft(e,_),_.KeyInfo=ut(e,_),_.PaddingParams=dt(e),_.Sha224=ht(e,_),_.Sha256=vt(e,_),_.Sha384=pt(e,_),_.Sha512=yt(e,_),_.Aes256Gcm=Pt(e,_),_.Aes256Cbc=xt(e,_),_.Asn1rd=gt(e,_),_.Asn1wr=mt(e,_),_.RsaPublicKey=Et(e,_),_.RsaPrivateKey=wt(e,_),_.Rsa=bt(e,_),_.EccPublicKey=kt(e,_),_.EccPrivateKey=It(e,_),_.Ecc=Nt(e,_),_.EntropyAccumulator=At(e,_),_.CtrDrbg=Ct(e,_),_.Hmac=Tt(e,_),_.Hkdf=Ft(e,_),_.Kdf1=Kt(e,_),_.Kdf2=St(e,_),_.FakeRandom=Lt(e,_),_.Pkcs5Pbkdf2=Rt(e,_),_.Pkcs5Pbes2=zt(e,_),_.SeedEntropySource=Bt(e,_),_.KeyMaterialRng=Ut(e,_),_.RawPublicKey=Dt(e,_),_.RawPrivateKey=Yt(e,_),_.Pkcs8Serializer=Ht(e,_),_.Sec1Serializer=Mt(e,_),_.KeyAsn1Serializer=Ot(e,_),_.KeyAsn1Deserializer=Vt(e,_),_.Ed25519=Gt(e,_),_.Curve25519=jt(e,_),_.Falcon=qt(e,_),_.Round5=Xt(e,_),_.CompoundKeyAlgInfo=Wt(e,_),_.CompoundPublicKey=Zt(e,_),_.CompoundPrivateKey=$t(e,_),_.CompoundKeyAlg=Jt(e,_),_.HybridKeyAlgInfo=Qt(e,_),_.HybridPublicKey=e_(e,_),_.HybridPrivateKey=t_(e,_),_.HybridKeyAlg=__(e,_),_.SimpleAlgInfo=r_(e),_.HashBasedAlgInfo=s_(e,_),_.CipherAlgInfo=n_(e),_.SaltedKdfAlgInfo=c_(e,_),_.PbeAlgInfo=i_(e,_),_.EccAlgInfo=a_(e),_.AlgInfoDerSerializer=o_(e,_),_.AlgInfoDerDeserializer=l_(e,_),_.MessageInfoDerSerializer=f_(e,_),_.RandomPadding=u_(e,_),t(_)})).catch((e=>{_(e)}))}))));function h_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v_={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}(v_);var p_,y_=h_(v_.exports);class P_ extends Error{constructor(){super("Module already exists."),Object.setPrototypeOf(this,P_.prototype),this.name="ModuleAlreadyExistsError"}}class x_ extends Error{constructor(){super("Module not found."),Object.setPrototypeOf(this,x_.prototype),this.name="ModuleNotFoundError"}}!function(e){e.load="load",e.remove="remove",e.error="error"}(p_||(p_={}));let g_,m_;const E_=()=>{if(!g_||!m_)throw new Error("Cannot use global instances if the 'resetGlobalInstances' function has been called or 'createGlobalInstances' function has not been called yet.")},w_=()=>(E_(),g_),b_=()=>(E_(),m_),k_=()=>{(g_||m_)&&(E_(),g_.delete(),m_.delete(),g_=void 0,m_=void 0)},I_=new class extends y_{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 P_;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 x_;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 x_;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}}},N_="foundation";I_.addModule(N_,d_),I_.on("load",((e,t)=>{e===N_&&(k_(),(e=>{g_=new e.CtrDrbg;try{g_.setupDefaults()}catch(e){throw g_.delete(),e}m_=new e.KeyProvider,m_.random=g_;try{m_.setupDefaults()}catch(e){throw g_.delete(),m_.delete(),e}})(t))})),I_.on("remove",(e=>{e===N_&&k_()}));const A_=()=>I_.getModule(N_),C_=I_.loadModules;var T_,F_;e.HashAlgorithm=void 0,(T_=e.HashAlgorithm||(e.HashAlgorithm={})).SHA224="SHA224",T_.SHA256="SHA256",T_.SHA384="SHA384",T_.SHA512="SHA512",e.KeyPairType=void 0,(F_=e.KeyPairType||(e.KeyPairType={})).DEFAULT="DEFAULT",F_.ED25519="ED25519",F_.CURVE25519="CURVE25519",F_.SECP256R1="SECP256R1",F_.RSA_2048="RSA_2048",F_.RSA_3072="RSA_3072",F_.RSA_4096="RSA_4096",F_.RSA_8192="RSA_8192",F_.CURVE25519_ROUND5_ED25519_FALCON="CURVE25519_ROUND5_ED25519_FALCON",F_.CURVE25519_ED25519="CURVE25519_ED25519";const K_=t=>{const{AlgId:_}=I_.getModule("foundation");switch(t){case e.KeyPairType.DEFAULT:return{type:e.KeyPairType.DEFAULT,algId:_.ED25519};case e.KeyPairType.ED25519:return{type:e.KeyPairType.ED25519,algId:_.ED25519};case e.KeyPairType.CURVE25519:return{type:e.KeyPairType.CURVE25519,algId:_.CURVE25519};case e.KeyPairType.SECP256R1:return{type:e.KeyPairType.SECP256R1,algId:_.SECP256R1};case e.KeyPairType.RSA_2048:return{type:e.KeyPairType.RSA_2048,algId:_.RSA,bitlen:2048};case e.KeyPairType.RSA_3072:return{type:e.KeyPairType.RSA_3072,algId:_.RSA,bitlen:3072};case e.KeyPairType.RSA_4096:return{type:e.KeyPairType.RSA_4096,algId:_.RSA,bitlen:4096};case e.KeyPairType.RSA_8192:return{type:e.KeyPairType.RSA_8192,algId:_.RSA,bitlen:8192};case e.KeyPairType.CURVE25519_ROUND5_ED25519_FALCON:return{type:e.KeyPairType.CURVE25519_ROUND5_ED25519_FALCON,cipherAlgIds:[_.CURVE25519,_.ROUND5_ND_1CCA_5D],signerAlgIds:[_.ED25519,_.FALCON]};case e.KeyPairType.CURVE25519_ED25519:return{type:e.KeyPairType.CURVE25519_ED25519,cipherAlgIds:[_.CURVE25519,_.NONE],signerAlgIds:[_.ED25519,_.NONE]};default:throw new TypeError(`Unknown key pair type '${t}'.`)}};for(var S_=function(e){var t=H_(e),_=t[0],r=t[1];return 3*(_+r)/4-r},L_=function(e){var t,_,r=H_(e),s=r[0],n=r[1],c=new U_(function(e,t,_){return 3*(t+_)/4-_}(0,s,n)),i=0,a=n>0?s-4:s;for(_=0;_<a;_+=4)t=B_[e.charCodeAt(_)]<<18|B_[e.charCodeAt(_+1)]<<12|B_[e.charCodeAt(_+2)]<<6|B_[e.charCodeAt(_+3)],c[i++]=t>>16&255,c[i++]=t>>8&255,c[i++]=255&t;2===n&&(t=B_[e.charCodeAt(_)]<<2|B_[e.charCodeAt(_+1)]>>4,c[i++]=255&t);1===n&&(t=B_[e.charCodeAt(_)]<<10|B_[e.charCodeAt(_+1)]<<4|B_[e.charCodeAt(_+2)]>>2,c[i++]=t>>8&255,c[i++]=255&t);return c},R_=function(e){for(var t,_=e.length,r=_%3,s=[],n=16383,c=0,i=_-r;c<i;c+=n)s.push(M_(e,c,c+n>i?i:c+n));1===r?(t=e[_-1],s.push(z_[t>>2]+z_[t<<4&63]+"==")):2===r&&(t=(e[_-2]<<8)+e[_-1],s.push(z_[t>>10]+z_[t>>4&63]+z_[t<<2&63]+"="));return s.join("")},z_=[],B_=[],U_="undefined"!=typeof Uint8Array?Uint8Array:Array,D_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y_=0;Y_<64;++Y_)z_[Y_]=D_[Y_],B_[D_.charCodeAt(Y_)]=Y_;function H_(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 M_(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(z_[(s=r)>>18&63]+z_[s>>12&63]+z_[s>>6&63]+z_[63&s]);return n.join("")}B_["-".charCodeAt(0)]=62,B_["_".charCodeAt(0)]=63;var O_={byteLength:S_,toByteArray:L_,fromByteArray:R_},V_=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)},G_=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_=function(e,t){return e(t={exports:{}},t.exports),t.exports}((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){+e!=e&&(e=0);return 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){"string"==typeof t&&""!==t||(t="utf8");if(!n.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var _=0|u(e,t),r=s(_),c=r.write(e,t);c!==_&&(r=r.slice(0,c));return 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),_}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?s(0):o(e);if("Buffer"===e.type&&Array.isArray(e.data))return o(e.data)}(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?O_.fromByteArray(e):O_.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);var _="",r=0;for(;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),G_(e,t,_,r,23,4),_+4}function S(e,t,_,r,s){return t=+t,_>>>=0,s||F(e,0,_,8),G_(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),V_(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),V_(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),V_(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),V_(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 O_.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_=j_.Buffer;
2/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */j_.SlowBuffer,j_.INSPECT_MAX_BYTES,j_.kMaxLength;const X_=(W_=q_,(e,t)=>{if("string"==typeof e){if("string"==typeof t&&!W_.isEncoding(t))throw new TypeError("Invalid default encoding.");return W_.from(e,t)}if(e instanceof Uint8Array)return e;if("object"==typeof e&&"string"==typeof e.value&&W_.isEncoding(e.encoding))return W_.from(e.value,e.encoding);throw new TypeError("Invalid format of 'Data'.")});var W_;const Z_=(e=>t=>{let _=e.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(_=_.slice(t.byteOffset,t.byteOffset+t.byteLength)),_})(q_),$_=q_.from("VIRGIL-DATA-SIGNATURE","utf8"),J_=q_.from("VIRGIL-DATA-SIGNER-ID","utf8"),Q_=160;class er{get isDisposed(){return this._isDisposed}constructor(e,t){this.identifier=Z_(e),this.lowLevelPrivateKey=t,this._isDisposed=!1}dispose(){this.lowLevelPrivateKey.delete(),this._isDisposed=!0}}class tr{get isDisposed(){return this._isDisposed}get key(){const e=new(A_().KeyAsn1Serializer);try{return e.setupDefaults(),e.serializePublicKey(this.lowLevelPublicKey)}finally{e.delete()}}constructor(e,t){this.identifier=Z_(e),this.lowLevelPublicKey=t,this._isDisposed=!1}dispose(){this.lowLevelPublicKey.delete(),this._isDisposed=!0}}function _r(e){if(!(e instanceof er))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 rr(e){if(!(e instanceof tr))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 sr(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(rr)}function nr(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 cr(e){const t=A_().GroupSessionMessage.deserialize(e),_={epochNumber:t.getEpoch(),sessionId:Z_(t.getSessionId()).toString("hex"),data:Z_(e).toString("base64")};return t.delete(),_}function ir(e){const t=A_().GroupSessionMessage.deserialize(e),_=t.getEpoch();return t.delete(),_}function ar(e){const t=new(A_().GroupSession);t.rng=w_();const _=[];try{for(const r of e){const e=A_().GroupSessionMessage.deserialize(r);_.push(e),t.addEpoch(e)}return t}finally{for(;_.length;){const e=_.pop();e&&e.delete()}}}function or(e){const t=new(A_().Sha512);try{return t.hash(e).subarray(0,32)}finally{t.delete()}}function lr(e){return e=e.slice().sort(((e,t)=>ir(e)-ir(t))),{getSessionId(){const t=ar(e),_=t.getSessionId();return t.delete(),Z_(_).toString("hex")},getCurrentEpochNumber:()=>ir(e[e.length-1]),encrypt(t,_){const r=X_(t,"utf8");let s;_r(_);try{s=ar(e);const t=s.encrypt(r,_.lowLevelPrivateKey),n=t.serialize();return t.delete(),Z_(n)}finally{s&&s.delete()}},decrypt(t,_){const r=X_(t,"base64");let s,n;rr(_);try{return s=ar(e),n=A_().GroupSessionMessage.deserialize(r),Z_(s.decrypt(n,_.lowLevelPublicKey))}finally{n&&n.delete(),s&&s.delete()}},addNewEpoch(){const t=ar(e);try{const _=t.createGroupTicket(),r=_.getTicketMessage(),s=r.serialize();return e.push(s),r.delete(),_.delete(),cr(s)}finally{t.delete()}},export:()=>e.map(Z_),parseMessage:e=>cr(X_(e,"base64"))}}const fr=e=>null==e?[]:Array.isArray(e)?e:[e];var ur;e.VirgilCryptoErrorStatus=void 0,(ur=e.VirgilCryptoErrorStatus||(e.VirgilCryptoErrorStatus={})).STREAM_ILLEGAL_STATE="STREAM_ILLEGAL_STATE",ur.DATA_NOT_SIGNED="DATA_NOT_SIGNED",ur.SIGNER_NOT_FOUND="SIGNER_NOT_FOUND",ur.INVALID_SIGNATURE="INVALID_SIGNATURE";class dr extends Error{constructor(e,t){super(t||dr.DEFAULT_MESSAGE),Object.setPrototypeOf(this,dr.prototype),this.name="VirgilCryptoError",this.status=e}}dr.DEFAULT_MESSAGE="Use the 'status' property and 'VirgilCryptoErrorStatus' enum to check for specific error.";class hr{get isRunning(){return this._isRunning}get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e,t){const _=A_(),r=fr(e);if(sr(r),this.recipientCipher=new _.RecipientCipher,this.aes256Gcm=new _.Aes256Gcm,this.recipientCipher.encryptionCipher=this.aes256Gcm,this.recipientCipher.random=w_(),r.forEach((e=>{this.recipientCipher.addKeyRecipient(e.identifier,e.lowLevelPublicKey)})),t){const e=X_(t,"base64");this.messageInfoCustomParams=this.recipientCipher.customParams(),this.messageInfoCustomParams.addData($_,e)}this._isFinished=!1,this._isRunning=!1,this._isDisposed=!1}start(){return this.ensureLegalState(),this.recipientCipher.startEncryption(),this._isRunning=!0,Z_(this.recipientCipher.packMessageInfo())}update(e){this.ensureLegalState(),this.ensureIsRunning();const t=X_(e,"utf8");return Z_(this.recipientCipher.processEncryption(t))}final(e=!0){this.ensureLegalState(),this.ensureIsRunning();try{return Z_(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 dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}ensureIsRunning(){if(!this._isRunning)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher before the 'start' method.")}}class vr{get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e){this._isFinished=!1,this._isDisposed=!1;const t=A_();_r(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 dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot get signature after the 'dispose' method has been called.");if(!this._isFinished)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot get signature before the 'final' method has been called.");const t=this.recipientCipher.customParams();try{return Z_(t.findData($_))}finally{t.delete()}}update(e){this.ensureLegalState();const t=X_(e,"utf8");return Z_(this.recipientCipher.processDecryption(t))}final(e=!0){this.ensureLegalState();try{return Z_(this.recipientCipher.finishDecryption())}finally{this._isFinished=!0,e&&this.dispose()}}dispose(){this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}}class pr{constructor(){const e=A_();this.paddingParams=e.PaddingParams.newWithConstraints(Q_,Q_),this.recipientCipher=new e.RecipientCipher,this.recipientCipher.random=w_(),this.recipientCipher.paddingParams=this.paddingParams,this._isDisposed=!1,this._isFinished=!1}start(e){this.ensureLegalState(),_r(e),this.recipientCipher.startDecryptionWithKey(e.identifier,e.lowLevelPrivateKey,new Uint8Array)}update(e){this.ensureLegalState();const t=X_(e),_=this.recipientCipher.processDecryption(t);return Z_(_)}final(){this.ensureLegalState();const e=this.recipientCipher.finishDecryption();try{return Z_(e)}finally{this._isFinished=!0}}verify(t,_=!0){const r=fr(t);if(sr(r),this._isDisposed)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot verify signature after the 'dispose' method has been called.");if(!this._isFinished)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot verify signature before the 'final' method has been called.");let s;try{if(!this.recipientCipher.isDataSigned())throw new dr(e.VirgilCryptoErrorStatus.DATA_NOT_SIGNED);if(s=this.recipientCipher.signerInfos(),!s.hasItem())throw new dr(e.VirgilCryptoErrorStatus.DATA_NOT_SIGNED);const t=s.item();let _;for(let s=0;s<r.length;s+=1){if(0===q_.compare(t.signerId(),r[s].identifier)){_=r[s];break}if(s===r.length-1)throw new dr(e.VirgilCryptoErrorStatus.SIGNER_NOT_FOUND)}if(!this.recipientCipher.verifySignerInfo(t,_.lowLevelPublicKey))throw new dr(e.VirgilCryptoErrorStatus.INVALID_SIGNATURE)}finally{s&&s.delete(),_&&this.dispose()}}dispose(){this.paddingParams.delete(),this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}}class yr{get isRunning(){return this._isRunning}get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e,t,_){_r(e);const r=fr(t);sr(r);const s=A_(),n=w_();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(Q_,Q_),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,Z_(t)}update(e){this.ensureLegalState(),this.ensureIsRunning();const t=X_(e),_=this.recipientCipher.processEncryption(t);return Z_(_)}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 dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}ensureIsRunning(){if(!this._isRunning)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher before the 'start' method.")}}class Pr{get isDisposed(){return this._isDisposed}constructor(){this._isDisposed=!1;const e=A_();this.signer=new e.Signer,this.sha512=new e.Sha512,this.signer.hash=this.sha512,this.signer.random=w_(),this.signer.reset()}update(t){if(this._isDisposed)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use signer after the 'dispose' method has been called.");const _=X_(t,"utf8");return this.signer.appendData(_),this}sign(t,_=!0){if(this._isDisposed)throw new dr(e.VirgilCryptoErrorStatus.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.");_r(t);const r=this.signer.sign(t.lowLevelPrivateKey);return _&&this.dispose(),Z_(r)}dispose(){this.sha512.delete(),this.signer.delete(),this._isDisposed=!0}}class xr{get isDisposed(){return this._isDisposed}constructor(e){this._isDisposed=!1;const t=A_(),_=X_(e,"base64");this.verifier=new t.Verifier;try{this.verifier.reset(_)}catch(e){throw this.verifier.delete(),e}}update(t){if(this._isDisposed)throw new dr(e.VirgilCryptoErrorStatus.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use signer after the 'dispose' method has been called.");const _=X_(t,"utf8");return this.verifier.appendData(_),this}verify(t,_=!0){if(this._isDisposed)throw new dr(e.VirgilCryptoErrorStatus.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.");rr(t);const r=this.verifier.verify(t.lowLevelPublicKey);return _&&this.dispose(),r}dispose(){this.verifier.delete(),this._isDisposed=!0}}e.VirgilAccessTokenSigner=class{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,_)}},e.VirgilCardCrypto=class{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)}},e.VirgilCrypto=class{constructor(t={}){this.hashAlgorithm=e.HashAlgorithm,this.keyPairType=e.KeyPairType,this.defaultKeyPairType=t.defaultKeyPairType||e.KeyPairType.DEFAULT,this.useSha256Identifiers=t.useSha256Identifiers||!1}generateKeys(e){const t=e||this.defaultKeyPairType,_=K_(t);return this.generateKeyPair(b_(),_)}generateKeysFromKeyMaterial(e,t){const _=t||this.defaultKeyPairType,r=K_(_),s=X_(e,"base64"),n=A_(),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=b_(),_=X_(e,"base64"),r=t.importPrivateKey(_),s=r.extractPublicKey();try{const e=t.exportPublicKey(s),_=this.calculateKeyPairIdentifier(e);return new er(_,r)}finally{s.delete()}}exportPrivateKey(e){_r(e);const t=b_().exportPrivateKey(e.lowLevelPrivateKey);return Z_(t)}importPublicKey(e){const t=X_(e,"base64"),_=b_().importPublicKey(t),r=this.calculateKeyPairIdentifier(t);return new tr(r,_)}exportPublicKey(e){rr(e);const t=b_().exportPublicKey(e.lowLevelPublicKey);return Z_(t)}encrypt(e,t,_){const r=X_(e,"utf8"),s=fr(t);sr(s);const n=A_(),c=w_(),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(Q_,Q_),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 _=X_(e,"base64");_r(t);const r=A_(),s=new r.RecipientCipher;s.random=w_();const n=r.PaddingParams.newWithConstraints(Q_,Q_);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(t,_=e.HashAlgorithm.SHA512){const r=X_(t,"utf8");let s;switch(_){case e.HashAlgorithm.SHA224:s=this.createHash(r,A_().Sha224);break;case e.HashAlgorithm.SHA256:s=this.createHash(r,A_().Sha256);break;case e.HashAlgorithm.SHA384:s=this.createHash(r,A_().Sha384);break;case e.HashAlgorithm.SHA512:s=this.createHash(r,A_().Sha512);break;default:throw new TypeError("Unknown hash algorithm")}return Z_(s)}extractPublicKey(e){_r(e);const t=e.lowLevelPrivateKey.extractPublicKey();return new tr(e.identifier,t)}calculateSignature(e,t){const _=X_(e,"utf8");_r(t);const r=A_(),s=new r.Signer,n=new r.Sha512;s.random=w_(),s.hash=n,s.reset(),s.appendData(_);try{const e=s.sign(t.lowLevelPrivateKey);return Z_(e)}finally{s.delete(),n.delete()}}verifySignature(e,t,_){const r=X_(e,"utf8"),s=X_(t,"base64");rr(_);const n=new(A_().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=X_(e,"utf8");_r(t);const n=fr(_);sr(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=X_(e,"utf8");_r(t);const n=fr(_);sr(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=X_(e,"base64");_r(t);const s=fr(_);return sr(s),this._decryptAndVerify(r,new Uint8Array,t,s)}decryptThenVerify(e,t,_){const r=X_(e,"base64");_r(t);const s=fr(_);return sr(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=w_().random(e);return Z_(t)}signThenEncryptDetached(e,t,_,r){const s=X_(e,"utf8");_r(t);const n=fr(_);sr(n);const{messageInfo:c,processEncryption:i,finishEncryption:a}=this._signThenEncrypt(s,t,n,r);return{encryptedData:q_.concat([i,a]),metadata:Z_(c)}}decryptThenVerifyDetached(e,t,_,r){const s=X_(e,"base64"),n=X_(t,"base64");_r(_);const c=fr(r);return sr(c),this._decryptThenVerify(s,n,_,c)}createStreamCipher(e,t){return new hr(e,t)}createStreamDecipher(e){return new vr(e)}createStreamSignAndEncrypt(e,t,_){return new yr(e,t,_)}createStreamDecryptAndVerify(){return new pr}createStreamSigner(){return new Pr}createStreamVerifier(e){return new xr(e)}generateGroupSession(e){const t=X_(e,"utf8");nr(t);const _=function(e){const t=new(A_().GroupSessionTicket);t.rng=w_();try{return t.setupTicketAsNew(e),t.getTicketMessage()}finally{t.delete()}}(or(t)),r=_.serialize();return _.delete(),lr([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 lr(e.map((e=>X_(e,"base64"))))}calculateGroupSessionId(e){const t=X_(e,"utf8");return nr(t),Z_(or(t)).toString("hex")}createHash(e,t){const _=new t,r=_.hash(e);return _.delete(),r}calculateKeyPairIdentifier(e){return this.useSha256Identifiers?this.createHash(e,A_().Sha256):this.createHash(e,A_().Sha512).slice(0,8)}generateKeyPair(t,_){let r;if((s=_.type)===e.KeyPairType.CURVE25519_ROUND5_ED25519_FALCON||s===e.KeyPairType.CURVE25519_ED25519){const[e,s]=_.cipherAlgIds,[n,c]=_.signerAlgIds;r=t.generateCompoundHybridPrivateKey(e,s,n,c)}else(t=>t===e.KeyPairType.RSA_2048||t===e.KeyPairType.RSA_3072||t===e.KeyPairType.RSA_4096||t===e.KeyPairType.RSA_8192)(_.type)&&t.setRsaParams(_.bitlen),r=t.generatePrivateKey(_.algId);var s;const n=r.extractPublicKey();let c;try{c=t.exportPublicKey(n)}catch(e){throw r.delete(),n.delete(),e}const i=this.calculateKeyPairIdentifier(c);return{privateKey:new er(i,r),publicKey:new tr(i,n)}}_signAndEncrypt(e,t,_,r){const s=A_(),n=w_(),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(Q_,Q_),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=A_(),n=w_(),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(Q_,Q_),c.paddingParams=o),_.forEach((({identifier:e},t)=>{c.addKeyRecipient(e,_[t].lowLevelPublicKey)}));const l=c.customParams();try{const _=this.calculateSignature(e,t);l.addData($_,_),l.addData(J_,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(t,_,r,s){const n=A_(),c=n.PaddingParams.newWithConstraints(Q_,Q_),i=new n.RecipientCipher;let a;i.random=w_(),i.paddingParams=c;try{i.startDecryptionWithKey(r.identifier,r.lowLevelPrivateKey,_);const e=i.processDecryption(t),s=i.finishDecryption();a=q_.concat([e,s])}catch(e){throw c.delete(),i.delete(),e}if(!i.isDataSigned())throw c.delete(),i.delete(),new dr(e.VirgilCryptoErrorStatus.DATA_NOT_SIGNED);const o=i.signerInfos();if(!o.hasItem())throw c.delete(),o.delete(),i.delete(),new dr(e.VirgilCryptoErrorStatus.DATA_NOT_SIGNED);const l=o.item();let f;for(let t=0;t<s.length;t+=1){if(0===q_.compare(l.signerId(),s[t].identifier)){f=s[t];break}if(t===s.length-1)throw c.delete(),l.delete(),o.delete(),i.delete(),new dr(e.VirgilCryptoErrorStatus.SIGNER_NOT_FOUND)}if(!i.verifySignerInfo(l,f.lowLevelPublicKey))throw c.delete(),l.delete(),o.delete(),i.delete(),new dr(e.VirgilCryptoErrorStatus.INVALID_SIGNATURE);return c.delete(),l.delete(),o.delete(),i.delete(),a}_decryptThenVerify(t,_,r,s){const n=A_(),c=n.PaddingParams.newWithConstraints(Q_,Q_),i=new n.RecipientCipher;let a;i.random=w_(),i.paddingParams=c;try{i.startDecryptionWithKey(r.identifier,r.lowLevelPrivateKey,_);const e=i.processDecryption(t),s=i.finishDecryption();a=q_.concat([e,s])}catch(e){throw c.delete(),i.delete(),e}const o=i.customParams();let l;if(1===s.length)l=s[0];else{let t;try{t=o.findData(J_)}catch(e){throw c.delete(),i.delete(),o.delete(),e}for(let e=0;e<s.length;e+=1)if(0===q_.compare(t,s[e].identifier)){l=s[e];break}if(!l)throw o.delete(),c.delete(),i.delete(),new dr(e.VirgilCryptoErrorStatus.SIGNER_NOT_FOUND)}try{const t=o.findData($_);if(!this.verifySignature(a,t,l))throw new dr(e.VirgilCryptoErrorStatus.INVALID_SIGNATURE);return a}finally{o.delete(),c.delete(),i.delete()}}},e.VirgilCryptoError=dr,e.VirgilPrivateKey=er,e.VirgilPrivateKeyExporter=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)}},e.VirgilPublicKey=tr,e.VirgilStreamCipher=hr,e.VirgilStreamDecipher=vr,e.VirgilStreamSigner=Pr,e.VirgilStreamVerifier=xr,e.getFoundationModules=A_,e.hasFoundationModules=()=>I_.hasModule(N_),e.initCrypto=C_,e.moduleInitializer=I_,e.setFoundationModules=e=>{I_.setModule(N_,e)}}));