@virgilsecurity/virgil-crypto-core 0.18.0-dev.1 → 0.18.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r,_,s,n,c,i,a,o,l,u,f,d,h,P,v,x,y,p,g={exports:{}};function m(){return e||(e=1,function(t){async function e(t={}){var e,r=t;e=self.location.href;var _,s,n="";try{n=new URL(".",e).href}catch{}s=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},_=async t=>{if((t=await fetch(t,{credentials:"same-origin"})).ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)};var c,i,a,o,l,u,f,d,h,P,v=console.log.bind(console),x=console.error.bind(console),y=!1,p=!1;function g(){var t=pt.buffer;r.HEAP8=o=new Int8Array(t),r.HEAP16=u=new Int16Array(t),r.HEAPU8=l=new Uint8Array(t),r.HEAPU16=new Uint16Array(t),r.HEAP32=f=new Int32Array(t),r.HEAPU32=d=new Uint32Array(t),r.HEAPF32=new Float32Array(t),r.HEAPF64=new Float64Array(t),h=new BigInt64Array(t),new BigUint64Array(t)}function m(t){throw r.onAbort?.(t),x(t="Aborted("+t+")"),y=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),a?.(t),t}async function N(t,e){try{var r=await async function(t){if(!c)try{var e=await _(t);return new Uint8Array(e)}catch{}if(t==P&&c)t=new Uint8Array(c);else{if(!s)throw"both async and sync fetching of the wasm failed";t=s(t)}return t}(t);return await WebAssembly.instantiate(r,e)}catch(t){x(`failed to asynchronously prepare wasm: ${t}`),m(t)}}var I=t=>{for(;0<t.length;)t.shift()(r)},E=[],w=[],b=()=>{var t=r.preRun.shift();w.push(t)},k=()=>{var t=f[+yt>>2];return yt+=4,t},A=(t,e)=>{for(var r=0,_=t.length-1;0<=_;_--){var s=t[_];"."===s?t.splice(_,1):".."===s?(t.splice(_,1),r++):r&&(t.splice(_,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},C=t=>{var e="/"===t.charAt(0),r="/"===t.slice(-1);return(t=A(t.split("/").filter(t=>!!t),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},F=t=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1);return t=e[0],e=e[1],t||e?(e&&=e.slice(0,-1),t+e):"."},T=t=>{(T=t=>crypto.getRandomValues(t))(t)},K=globalThis.TextDecoder&&new TextDecoder,S=(t,e=0)=>{for(var r=e,_=r+void 0;t[r]&&!(r>=_);)++r;if(16<r-e&&t.buffer&&K)return K.decode(t.subarray(e,r));for(_="";e<r;){var s=t[e++];if(128&s){var n=63&t[e++];if(192==(224&s))_+=String.fromCharCode((31&s)<<6|n);else{var c=63&t[e++];65536>(s=224==(240&s)?(15&s)<<12|n<<6|c:(7&s)<<18|n<<12|c<<6|63&t[e++])?_+=String.fromCharCode(s):(s-=65536,_+=String.fromCharCode(55296|s>>10,56320|1023&s))}}else _+=String.fromCharCode(s)}return _},z=[],L=[];function R(t,e){L[t]={input:[],output:[],Ft:e},ot(t,B)}var B={open(t){var e=L[t.node.Qt];if(!e)throw new W(43);t.xt=e,t.seekable=!1},close(t){t.xt.Ft.Nt(t.xt)},Nt(t){t.xt.Ft.Nt(t.xt)},read(t,e,r,_){if(!t.xt||!t.xt.Ft.$t)throw new W(60);for(var s=0,n=0;n<_;n++){try{var c=t.xt.Ft.$t(t.xt)}catch(t){throw new W(29)}if(void 0===c&&0===s)throw new W(6);if(null==c)break;s++,e[r+n]=c}return s&&(t.node.Jt=Date.now()),s},write(t,e,r,_){if(!t.xt||!t.xt.Ft.Xt)throw new W(60);try{for(var s=0;s<_;s++)t.xt.Ft.Xt(t.xt,e[r+s])}catch(t){throw new W(29)}return _&&(t.node.At=t.node.zt=Date.now()),s}},Y={$t:()=>z.length?z.shift():null,Xt(t,e){null===e||10===e?(v(S(t.output)),t.output=[]):0!=e&&t.output.push(e)},Nt(t){0<t.output?.length&&(v(S(t.output)),t.output=[])},ju:()=>({tu:25856,vu:5,su:191,uu:35387,ru:[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]}),ku:()=>0,lu:()=>[24,80]},H={Xt(t,e){null===e||10===e?(x(S(t.output)),t.output=[]):0!=e&&t.output.push(e)},Nt(t){0<t.output?.length&&(x(S(t.output)),t.output=[])}},U={Ct:null,Et:()=>U.createNode(null,"/",16895,0),createNode(t,e,r,_){if(24576==(61440&r)||4096==(61440&r))throw new W(63);return U.Ct||(U.Ct={dir:{node:{It:U.wt.It,Dt:U.wt.Dt,Lt:U.wt.Lt,Ot:U.wt.Ot,eu:U.wt.eu,gu:U.wt.gu,fu:U.wt.fu,Yt:U.wt.Yt,Rt:U.wt.Rt},stream:{Bt:U.ut.Bt}},file:{node:{It:U.wt.It,Dt:U.wt.Dt},stream:{Bt:U.ut.Bt,read:U.ut.read,write:U.ut.write,bu:U.ut.bu,du:U.ut.du}},link:{node:{It:U.wt.It,Dt:U.wt.Dt,Mt:U.wt.Mt},stream:{}},Zt:{node:{It:U.wt.It,Dt:U.wt.Dt},stream:at}}),16384==(61440&(r=et(t,e,r,_)).mode)?(r.wt=U.Ct.dir.node,r.ut=U.Ct.dir.stream,r.vt={}):32768==(61440&r.mode)?(r.wt=U.Ct.file.node,r.ut=U.Ct.file.stream,r.yt=0,r.vt=null):40960==(61440&r.mode)?(r.wt=U.Ct.link.node,r.ut=U.Ct.link.stream):8192==(61440&r.mode)&&(r.wt=U.Ct.Zt.node,r.ut=U.Ct.Zt.stream),r.Jt=r.At=r.zt=Date.now(),t&&(t.vt[e]=r,t.Jt=t.At=t.zt=r.Jt),r},zu:t=>t.vt?t.vt.subarray?t.vt.subarray(0,t.yt):new Uint8Array(t.vt):new Uint8Array(0),wt:{It(t){var e={};return e.wu=8192==(61440&t.mode)?t.id:1,e.Bu=t.id,e.mode=t.mode,e.Cu=1,e.uid=0,e.Au=0,e.Qt=t.Qt,16384==(61440&t.mode)?e.size=4096:32768==(61440&t.mode)?e.size=t.yt:40960==(61440&t.mode)?e.size=t.link.length:e.size=0,e.Jt=new Date(t.Jt),e.At=new Date(t.At),e.zt=new Date(t.zt),e.hu=4096,e.qu=Math.ceil(e.size/e.hu),e},Dt(t,e){for(var r of["mode","atime","mtime","ctime"])null!=e[r]&&(t[r]=e[r]);void 0!==e.size&&(e=e.size,t.yt!=e&&(0==e?(t.vt=null,t.yt=0):(r=t.vt,t.vt=new Uint8Array(e),r&&t.vt.set(r.subarray(0,Math.min(e,t.yt))),t.yt=e)))},Lt(){throw U.Tt||(U.Tt=new W(44),U.Tt.stack="<generic error, no stack>"),U.Tt},Ot:(t,e,r,_)=>U.createNode(t,e,r,_),eu(t,e,r){try{var _=tt(e,r)}catch(t){}if(_){if(16384==(61440&t.mode))for(var s in _.vt)throw new W(55);if(s=J(_.parent.id,_.name),V[s]===_)V[s]=_.Kt;else for(s=V[s];s;){if(s.Kt===_){s.Kt=_.Kt;break}s=s.Kt}}delete t.parent.vt[t.name],e.vt[r]=t,t.name=r,e.zt=e.At=t.parent.zt=t.parent.At=Date.now()},gu(t,e){delete t.vt[e],t.zt=t.At=Date.now()},fu(t,e){var r,_=tt(t,e);for(r in _.vt)throw new W(55);delete t.vt[e],t.zt=t.At=Date.now()},Yt:t=>[".","..",...Object.keys(t.vt)],Rt:(t,e,r)=>((t=U.createNode(t,e,41471,0)).link=r,t),Mt(t){if(40960!=(61440&t.mode))throw new W(28);return t.link}},ut:{read(t,e,r,_,s){var n=t.node.vt;if(s>=t.node.yt)return 0;if(8<(t=Math.min(t.node.yt-s,_))&&n.subarray)e.set(n.subarray(s,s+t),r);else for(_=0;_<t;_++)e[r+_]=n[s+_];return t},write(t,e,r,_,s,n){if(e.buffer===o.buffer&&(n=!1),!_)return 0;if((t=t.node).At=t.zt=Date.now(),e.subarray&&(!t.vt||t.vt.subarray)){if(n)return t.vt=e.subarray(r,r+_),t.yt=_;if(0===t.yt&&0===s)return t.vt=e.slice(r,r+_),t.yt=_;if(s+_<=t.yt)return t.vt.set(e.subarray(r,r+_),s),_}n=s+_;var c=t.vt?t.vt.length:0;if(c>=n||(n=Math.max(n,c*(1048576>c?2:1.125)>>>0),0!=c&&(n=Math.max(n,256)),c=t.vt,t.vt=new Uint8Array(n),0<t.yt&&t.vt.set(c.subarray(0,t.yt),0)),t.vt.subarray&&e.subarray)t.vt.set(e.subarray(r,r+_),s);else for(n=0;n<_;n++)t.vt[s+n]=e[r+n];return t.yt=Math.max(t.yt,s+_),_},Bt(t,e,r){if(1===r?e+=t.position:2===r&&32768==(61440&t.node.mode)&&(e+=t.node.yt),0>e)throw new W(28);return e},bu(t,e,r,_,s){if(32768!=(61440&t.node.mode))throw new W(43);if(t=t.node.vt,2&s||!t||t.buffer!==o.buffer){if(_=!0,m(),!(s=void 0))throw new W(48);t&&((0<r||r+e<t.length)&&(t=t.subarray?t.subarray(r,r+e):Array.prototype.slice.call(t,r,r+e)),o.set(t,s))}else _=!1,s=t.byteOffset;return{Eu:s,pu:_}},du:(t,e,r,_)=>(U.ut.write(t,e,0,_,r,!1),0)}},M=null,D={},O=[],G=1,V=null,q=!1,j=!0,X={},W=class{name="ErrnoError";constructor(t){this.Gt=t}},Z=class{St={};node=null;get flags(){return this.St.flags}set flags(t){this.St.flags=t}get position(){return this.St.position}set position(t){this.St.position=t}},$=class{wt={};ut={};Pt=null;constructor(t,e,r,_){t||=this,this.parent=t,this.Et=t.Et,this.id=G++,this.name=e,this.mode=r,this.Qt=_,this.Jt=this.At=this.zt=Date.now()}get read(){return!(365&~this.mode)}set read(t){t?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(t){t?this.mode|=146:this.mode&=-147}};function Q(t,e={}){if(!t)throw new W(44);e.Vt??(e.Vt=!0),"/"===t.charAt(0)||(t="//"+t);var r=0;t:for(;40>r;r++){t=t.split("/").filter(t=>!!t);for(var _=M,s="/",n=0;n<t.length;n++){var c=n===t.length-1;if(c&&e.parent)break;if("."!==t[n])if(".."===t[n]){if(s=F(s),_===_.parent){t=s+"/"+t.slice(n+1).join("/"),r--;continue t}_=_.parent}else{s=C(s+"/"+t[n]);try{_=tt(_,t[n])}catch(t){if(44===t?.Gt&&c&&e.nu)return{path:s};throw t}if(!_.Pt||c&&!e.Vt||(_=_.Pt.root),40960==(61440&_.mode)&&(!c||e.Ut)){if(!_.wt.Mt)throw new W(52);"/"===(_=_.wt.Mt(_)).charAt(0)||(_=F(s)+"/"+_),t=_+"/"+t.slice(n+1).join("/");continue t}}}return{path:s,node:_}}throw new W(32)}function J(t,e){for(var r=0,_=0;_<e.length;_++)r=(r<<5)-r+e.charCodeAt(_)|0;return(t+r>>>0)%V.length}function tt(t,e){var r=16384==(61440&t.mode)?(r=_t(t,"x"))?r:t.wt.Lt?0:2:54;if(r)throw new W(r);for(r=V[J(t.id,e)];r;r=r.Kt){var _=r.name;if(r.parent.id===t.id&&_===e)return r}return t.wt.Lt(t,e)}function et(t,e,r,_){return e=J((t=new $(t,e,r,_)).parent.id,t.name),t.Kt=V[e],V[e]=t}function rt(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e}function _t(t,e){return j?0:!e.includes("r")||292&t.mode?e.includes("w")&&!(146&t.mode)||e.includes("x")&&!(73&t.mode)?2:0:2}function st(t,e){if(16384!=(61440&t.mode))return 54;try{return tt(t,e),20}catch(t){}return _t(t,"wx")}function nt(t){if(!(t=O[t]))throw new W(8);return t}function ct(t,e=-1){if(t=Object.assign(new Z,t),-1==e)t:{for(e=0;4096>=e;e++)if(!O[e])break t;throw new W(33)}return t.Ht=e,O[e]=t}function it(t,e){var r=void 0,_=r?null:t;if(r??=t.wt.Dt,!r)throw new W(63);r(_,e)}var at={open(t){t.ut=D[t.node.Qt].ut,t.ut.open?.(t)},Bt(){throw new W(70)}};function ot(t,e){D[t]={ut:e}}function lt(t,e){var r="/"===e;if(r&&M)throw new W(10);if(!r&&e){var _=Q(e,{Vt:!1});if(e=_.path,(_=_.node).Pt)throw new W(10);if(16384!=(61440&_.mode))throw new W(54)}e={type:t,Du:{},cu:e,mu:[]},(t=t.Et(e)).Et=e,e.root=t,r?M=t:_&&(_.Pt=e,_.Et&&_.Et.mu.push(e))}function ut(t,e,r){var _=Q(t,{parent:!0}).node;if(!(t=t&&t.match(/([^\/]+|\/)\/*$/)[1]))throw new W(28);if("."===t||".."===t)throw new W(20);var s=st(_,t);if(s)throw new W(s);if(!_.wt.Ot)throw new W(63);return _.wt.Ot(_,t,e,r)}function ft(t){return ut(t,16895,0)}function dt(t,e,r){void 0===r&&(r=e,e=438),ut(t,8192|e,r)}function ht(t,e){if(!((...t)=>{for(var e="",r=!1,_=t.length-1;-1<=_&&!r;_--){if("string"!=typeof(r=0<=_?t[_]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,r="/"===r.charAt(0)}return(r?"/":"")+(e=A(e.split("/").filter(t=>!!t),!r).join("/"))||"."})(t))throw new W(44);var r=Q(e,{parent:!0}).node;if(!r)throw new W(44);var _=st(r,e=e&&e.match(/([^\/]+|\/)\/*$/)[1]);if(_)throw new W(_);if(!r.wt.Rt)throw new W(63);r.wt.Rt(r,e,t)}function Pt(t,e,_=438){if(""===t)throw new W(44);if("string"==typeof e){var s={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===s)throw Error(`Unknown file open mode: ${e}`);e=s}if(_=64&e?4095&_|32768:0,"object"==typeof t)s=t;else{var n=t.endsWith("/");s=(t=Q(t,{Ut:!(131072&e),nu:!0})).node,t=t.path}var c=!1;if(64&e)if(s){if(128&e)throw new W(20)}else{if(n)throw new W(31);s=ut(t,511|_,0),c=!0}if(!s)throw new W(44);if(8192==(61440&s.mode)&&(e&=-513),65536&e&&16384!=(61440&s.mode))throw new W(54);if(!c&&(n=s?40960==(61440&s.mode)?32:16384==(61440&s.mode)&&("r"!==rt(e)||576&e)?31:_t(s,rt(e)):44))throw new W(n);if(512&e&&!c){if(16384==(61440&(n="string"==typeof(n=s)?Q(n,{Ut:!0}).node:n).mode))throw new W(31);if(32768!=(61440&n.mode))throw new W(28);var i=_t(n,"w");if(i)throw new W(i);it(n,{size:0,timestamp:Date.now()})}e&=-131713;t:for(n=s;;){if(n===n.parent){n=n.Et.cu;var a=a?"/"!==n[n.length-1]?`${n}/${a}`:n+a:n;break t}a=a?`${n.name}/${a}`:n.name,n=n.parent}return(a=ct({node:s,path:a,flags:e,seekable:!0,position:0,ut:s.ut,ou:[],error:!1})).ut.open&&a.ut.open(a),c&&(_&=511,it(s="string"==typeof s?Q(s,{Ut:!0}).node:s,{mode:4095&_|-4096&s.mode,zt:Date.now(),xu:void 0})),!r.logReadFiles||1&e||t in X||(X[t]=1),a}function vt(t,e,r){if(null===t.Ht)throw new W(8);if(!t.seekable||!t.ut.Bt)throw new W(70);if(0!=r&&1!=r&&2!=r)throw new W(28);t.position=t.ut.Bt(t,e,r),t.ou=[]}function xt(t,e,r){t=C("/dev/"+t);var _=((t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r})(!!e,!!r);xt.au??(xt.au=64);var s=xt.au++<<8;ot(s,{open(t){t.seekable=!1},close(){r?.buffer?.length&&r(10)},read(t,r,_,s){for(var n=0,c=0;c<s;c++){try{var i=e()}catch(t){throw new W(29)}if(void 0===i&&0===n)throw new W(6);if(null==i)break;n++,r[_+c]=i}return n&&(t.node.Jt=Date.now()),n},write(t,e,_,s){for(var n=0;n<s;n++)try{r(e[_+n])}catch(t){throw new W(29)}return s&&(t.node.At=t.node.zt=Date.now()),n}}),dt(t,_,s)}var yt=void 0;if(V=Array(4096),lt(U,"/"),ft("/tmp"),ft("/home"),ft("/home/web_user"),function(){ft("/dev"),ot(259,{read:()=>0,write:(t,e,r,_)=>_,Bt:()=>0}),dt("/dev/null",259),R(1280,Y),R(1536,H),dt("/dev/tty",1280),dt("/dev/tty1",1536);var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(T(t),e=t.byteLength),t[--e]);xt("random",r),xt("urandom",r),ft("/dev/shm"),ft("/dev/shm/tmp")}(),function(){ft("/proc");var t=ft("/proc/self");ft("/proc/self/fd"),lt({Et(){var e=et(t,"fd",16895,73);return e.ut={Bt:U.ut.Bt},e.wt={Lt(t,e){var r=nt(t=+e);return(t={parent:null,Et:{cu:"fake"},wt:{Mt:()=>r.path},id:t+1}).parent=t},Yt:()=>Array.from(O.entries()).filter(([,t])=>t).map(([t])=>t.toString())},e}},"/proc/self/fd")}(),r.print&&(v=r.print),r.printErr&&(x=r.printErr),r.wasmBinary&&(c=r.wasmBinary),r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.shift()();var pt,gt,mt={b:function(t,e,r){yt=r;try{var _=nt(t);switch(e){case 0:var s=k();if(0>s)break;for(;O[s];)s++;return function(t,e=-1){return t=ct(t,e),t.ut?.yu?.(t),t}(_,s).Ht;case 1:case 2:case 13:case 14:return 0;case 3:return _.flags;case 4:return s=k(),_.flags|=s,0;case 12:return s=k(),u[s+0>>1]=2,0}return-28}catch(t){if("ErrnoError"!==t.name)throw t;return-t.Gt}},f:function(t,e,r){yt=r;try{var _=nt(t);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return _.xt?0:-59;case 21505:if(!_.xt)return-59;if(_.xt.Ft.ju){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=k();f[s>>2]=25856,f[s+4>>2]=5,f[s+8>>2]=191,f[s+12>>2]=35387;for(var n=0;32>n;n++)o[s+n+17]=t[n]||0}return 0;case 21506:case 21507:case 21508:if(!_.xt)return-59;if(_.xt.Ft.ku)for(s=k(),t=[],n=0;32>n;n++)t.push(o[s+n+17]);return 0;case 21519:return _.xt?(s=k(),f[s>>2]=0):-59;case 21520:return _.xt?-28:-59;case 21537:case 21531:if(s=k(),!_.ut.iu)throw new W(59);return _.ut.iu(_,e,s);case 21523:return _.xt?(_.xt.Ft.lu&&(n=[24,80],s=k(),u[s>>1]=n[0],u[s+2>>1]=n[1]),0):-59;default:return-28}}catch(t){if("ErrnoError"!==t.name)throw t;return-t.Gt}},g:function(t,e,r,_){yt=_;try{var s=e=e?S(l,e):"";if("/"===s.charAt(0))e=s;else{var n=-100===t?"/":nt(t).path;if(0==s.length)throw new W(44);e=n+"/"+s}return Pt(e,r,_?k():0).Ht}catch(t){if("ErrnoError"!==t.name)throw t;return-t.Gt}},i:()=>m(""),h:t=>{var e=l.length;if(2147483648<(t>>>=0))return!1;for(var r=1;4>=r;r*=2){var _=e*(1+.2/r);_=Math.min(_,t+100663296);t:{_=(Math.min(2147483648,65536*Math.ceil(Math.max(t,_)/65536))-pt.buffer.byteLength+65535)/65536|0;try{pt.grow(_),g();var s=1;break t}catch(t){}s=void 0}if(s)return!0}return!1},a:function(t){try{var e=nt(t);if(null===e.Ht)throw new W(8);e.Wt&&(e.Wt=null);try{e.ut.close&&e.ut.close(e)}catch(t){throw t}finally{O[e.Ht]=null}return e.Ht=null,0}catch(t){if("ErrnoError"!==t.name)throw t;return t.Gt}},d:function(t,e,r,_){try{t:{var s=nt(t);t=e;for(var n,c=e=0;c<r;c++){var i=d[t>>2],a=d[t+4>>2];t+=8;var l=s,u=i,f=a,h=n,P=o;if(0>f||0>h)throw new W(28);if(null===l.Ht)throw new W(8);if(1==(2097155&l.flags))throw new W(8);if(16384==(61440&l.node.mode))throw new W(31);if(!l.ut.read)throw new W(28);var v=void 0!==h;if(v){if(!l.seekable)throw new W(70)}else h=l.position;var x=l.ut.read(l,P,u,f,h);v||(l.position+=x);var y=x;if(0>y){var p=-1;break t}if(e+=y,y<a)break;void 0!==n&&(n+=y)}p=e}return d[_>>2]=p,0}catch(t){if("ErrnoError"!==t.name)throw t;return t.Gt}},e:function(t,e,r,_){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{if(isNaN(e))return 61;var s=nt(t);return vt(s,e,r),h[_>>3]=BigInt(s.position),s.Wt&&0===e&&0===r&&(s.Wt=null),0}catch(t){if("ErrnoError"!==t.name)throw t;return t.Gt}},c:function(t,e,r,_){try{t:{var s=nt(t);t=e;for(var n,c=e=0;c<r;c++){var i=d[t>>2],a=d[t+4>>2];t+=8;var l=s,u=i,f=a,h=n,P=o;if(0>f||0>h)throw new W(28);if(null===l.Ht)throw new W(8);if(!(2097155&l.flags))throw new W(8);if(16384==(61440&l.node.mode))throw new W(31);if(!l.ut.write)throw new W(28);l.seekable&&1024&l.flags&&vt(l,0,2);var v=void 0!==h;if(v){if(!l.seekable)throw new W(70)}else h=l.position;var x=l.ut.write(l,P,u,f,h,void 0);v||(l.position+=x);var y=x;if(0>y){var p=-1;break t}if(e+=y,y<a)break;void 0!==n&&(n+=y)}p=e}return d[_>>2]=p,0}catch(t){if("ErrnoError"!==t.name)throw t;return t.Gt}}};return gt=await async function(){function t(t){return t=gt=t.exports,r._vscf_impl_api=t.l,r._vscf_impl_tag=t.m,r._vscf_impl_shallow_copy=t.n,r._vscf_error_ctx_size=t.o,r._vscf_error_reset=t.p,r._vscf_error_status=t.q,r._vscf_oid_from_alg_id=t.r,r._vscf_oid_to_alg_id=t.s,r._vscf_oid_equal=t.t,r._vscf_oid_from_id=t.u,r._vscf_oid_to_id=t.v,r._vscf_oid_id_to_alg_id=t.w,r._vscf_base64_encoded_len=t.x,r._vscf_base64_encode=t.y,r._vscf_base64_decoded_len=t.z,r._vscf_base64_decode=t.A,r._vscf_pem_wrapped_len=t.B,r._vscf_pem_wrap=t.C,r._vscf_pem_unwrapped_len=t.D,r._vscf_pem_unwrap=t.E,r._vscf_pem_title=t.F,r._vscf_message_info_new=t.G,r._vscf_message_info_delete=t.H,r._vscf_message_info_shallow_copy=t.I,r._vscf_message_info_data_encryption_alg_info=t.J,r._vscf_message_info_key_recipient_info_list=t.K,r._vscf_message_info_password_recipient_info_list=t.L,r._vscf_message_info_has_custom_params=t.M,r._vscf_message_info_custom_params=t.N,r._vscf_message_info_has_cipher_kdf_alg_info=t.O,r._vscf_message_info_cipher_kdf_alg_info=t.P,r._vscf_message_info_has_cipher_padding_alg_info=t.Q,r._vscf_message_info_cipher_padding_alg_info=t.R,r._vscf_message_info_has_footer_info=t.S,r._vscf_message_info_footer_info=t.T,r._vscf_message_info_clear=t.U,r._vscf_key_recipient_info_new=t.V,r._vscf_key_recipient_info_new_with_data=t.W,r._vscf_key_recipient_info_delete=t.X,r._vscf_key_recipient_info_shallow_copy=t.Y,r._vscf_key_recipient_info_recipient_id=t.Z,r._vscf_key_recipient_info_key_encryption_algorithm=t._,r._vscf_key_recipient_info_encrypted_key=t.$,r._vscf_key_recipient_info_list_new=t.aa,r._vscf_key_recipient_info_list_delete=t.ba,r._vscf_key_recipient_info_list_shallow_copy=t.ca,r._vscf_key_recipient_info_list_has_item=t.da,r._vscf_key_recipient_info_list_item=t.ea,r._vscf_key_recipient_info_list_has_next=t.fa,r._vscf_key_recipient_info_list_next=t.ga,r._vscf_key_recipient_info_list_has_prev=t.ha,r._vscf_key_recipient_info_list_prev=t.ia,r._vscf_key_recipient_info_list_clear=t.ja,r._vscf_password_recipient_info_new=t.ka,r._vscf_password_recipient_info_new_with_members=t.la,r._vscf_password_recipient_info_delete=t.ma,r._vscf_password_recipient_info_shallow_copy=t.na,r._vscf_password_recipient_info_key_encryption_algorithm=t.oa,r._vscf_password_recipient_info_encrypted_key=t.pa,r._vscf_password_recipient_info_list_new=t.qa,r._vscf_password_recipient_info_list_delete=t.ra,r._vscf_password_recipient_info_list_shallow_copy=t.sa,r._vscf_password_recipient_info_list_has_item=t.ta,r._vscf_password_recipient_info_list_item=t.ua,r._vscf_password_recipient_info_list_has_next=t.va,r._vscf_password_recipient_info_list_next=t.wa,r._vscf_password_recipient_info_list_has_prev=t.xa,r._vscf_password_recipient_info_list_prev=t.ya,r._vscf_password_recipient_info_list_clear=t.za,r._vscf_alg_factory_create_hash_from_info=t.Aa,r._vscf_alg_factory_create_mac_from_info=t.Ba,r._vscf_alg_factory_create_kdf_from_info=t.Ca,r._vscf_alg_factory_create_salted_kdf_from_info=t.Da,r._vscf_alg_factory_create_cipher_from_info=t.Ea,r._vscf_alg_factory_create_padding_from_info=t.Fa,r._vscf_key_alg_factory_create_from_alg_id=t.Ga,r._vscf_key_alg_factory_create_from_key=t.Ha,r._vscf_key_alg_factory_create_from_raw_public_key=t.Ia,r._vscf_key_alg_factory_create_from_raw_private_key=t.Ja,r._vscf_ecies_release_random=t.Ka,r._vscf_ecies_release_cipher=t.La,r._vscf_ecies_release_mac=t.Ma,r._vscf_ecies_release_kdf=t.Na,r._vscf_ecies_release_ephemeral_key=t.Oa,r._vscf_ecies_new=t.Pa,r._vscf_ecies_delete=t.Qa,r._vscf_ecies_shallow_copy=t.Ra,r._vscf_ecies_use_random=t.Sa,r._vscf_ecies_use_cipher=t.Ta,r._vscf_ecies_use_mac=t.Ua,r._vscf_ecies_use_kdf=t.Va,r._vscf_ecies_use_ephemeral_key=t.Wa,r._vscf_ecies_set_key_alg=t.Xa,r._vscf_ecies_release_key_alg=t.Ya,r._vscf_ecies_setup_defaults=t.Za,r._vscf_ecies_setup_defaults_no_random=t._a,r._vscf_ecies_encrypted_len=t.$a,r._vscf_ecies_encrypt=t.ab,r._vscf_ecies_decrypted_len=t.bb,r._vscf_ecies_decrypt=t.cb,r._vscf_recipient_cipher_release_random=t.db,r._vscf_recipient_cipher_release_encryption_cipher=t.eb,r._vscf_recipient_cipher_release_encryption_padding=t.fb,r._vscf_recipient_cipher_release_padding_params=t.gb,r._vscf_recipient_cipher_release_signer_hash=t.hb,r._vscf_recipient_cipher_new=t.ib,r._vscf_recipient_cipher_delete=t.jb,r._vscf_recipient_cipher_shallow_copy=t.kb,r._vscf_recipient_cipher_use_random=t.lb,r._vscf_recipient_cipher_use_encryption_cipher=t.mb,r._vscf_recipient_cipher_use_encryption_padding=t.nb,r._vscf_recipient_cipher_use_padding_params=t.ob,r._vscf_recipient_cipher_use_signer_hash=t.pb,r._vscf_recipient_cipher_has_key_recipient=t.qb,r._vscf_recipient_cipher_add_key_recipient=t.rb,r._vscf_recipient_cipher_clear_recipients=t.sb,r._vscf_recipient_cipher_add_signer=t.tb,r._vscf_recipient_cipher_clear_signers=t.ub,r._vscf_recipient_cipher_custom_params=t.vb,r._vscf_recipient_cipher_start_encryption=t.wb,r._vscf_recipient_cipher_start_signed_encryption=t.xb,r._vscf_recipient_cipher_message_info_len=t.yb,r._vscf_recipient_cipher_pack_message_info=t.zb,r._vscf_recipient_cipher_encryption_out_len=t.Ab,r._vscf_recipient_cipher_message_info_footer_len=t.Bb,r._vscf_recipient_cipher_process_encryption=t.Cb,r._vscf_recipient_cipher_finish_encryption=t.Db,r._vscf_recipient_cipher_start_decryption_with_key=t.Eb,r._vscf_recipient_cipher_start_verified_decryption_with_key=t.Fb,r._vscf_recipient_cipher_decryption_out_len=t.Gb,r._vscf_recipient_cipher_process_decryption=t.Hb,r._vscf_recipient_cipher_finish_decryption=t.Ib,r._vscf_recipient_cipher_is_data_signed=t.Jb,r._vscf_recipient_cipher_signer_infos=t.Kb,r._vscf_recipient_cipher_verify_signer_info=t.Lb,r._vscf_recipient_cipher_pack_message_info_footer=t.Mb,r._vscf_message_info_custom_params_new=t.Nb,r._vscf_message_info_custom_params_delete=t.Ob,r._vscf_message_info_custom_params_shallow_copy=t.Pb,r._vscf_message_info_custom_params_add_int=t.Qb,r._vscf_message_info_custom_params_add_string=t.Rb,r._vscf_message_info_custom_params_add_data=t.Sb,r._vscf_message_info_custom_params_clear=t.Tb,r._vscf_message_info_custom_params_find_int=t.Ub,r._vscf_message_info_custom_params_find_string=t.Vb,r._vscf_message_info_custom_params_find_data=t.Wb,r._vscf_message_info_custom_params_has_params=t.Xb,r._vscf_key_provider_release_random=t.Yb,r._vscf_key_provider_new=t.Zb,r._vscf_key_provider_delete=t._b,r._vscf_key_provider_shallow_copy=t.$b,r._vscf_key_provider_use_random=t.ac,r._vscf_key_provider_setup_defaults=t.bc,r._vscf_key_provider_set_rsa_params=t.cc,r._vscf_key_provider_generate_private_key=t.dc,r._vscf_key_provider_generate_post_quantum_private_key=t.ec,r._vscf_key_provider_generate_compound_hybrid_private_key=t.fc,r._vscf_key_provider_generate_hybrid_private_key=t.gc,r._vscf_key_provider_generate_compound_private_key=t.hc,r._vscf_key_provider_import_private_key=t.ic,r._vscf_key_provider_import_public_key=t.jc,r._vscf_key_provider_exported_public_key_len=t.kc,r._vscf_key_provider_export_public_key=t.lc,r._vscf_key_provider_exported_private_key_len=t.mc,r._vscf_key_provider_export_private_key=t.nc,r._vscf_signer_release_hash=t.oc,r._vscf_signer_release_random=t.pc,r._vscf_signer_new=t.qc,r._vscf_signer_delete=t.rc,r._vscf_signer_shallow_copy=t.sc,r._vscf_signer_use_hash=t.tc,r._vscf_signer_use_random=t.uc,r._vscf_signer_reset=t.vc,r._vscf_signer_append_data=t.wc,r._vscf_signer_signature_len=t.xc,r._vscf_signer_sign=t.yc,r._vscf_verifier_new=t.zc,r._vscf_verifier_delete=t.Ac,r._vscf_verifier_shallow_copy=t.Bc,r._vscf_verifier_reset=t.Cc,r._vscf_verifier_append_data=t.Dc,r._vscf_verifier_verify=t.Ec,r._vscf_brainkey_client_release_random=t.Fc,r._vscf_brainkey_client_release_operation_random=t.Gc,r._vscf_brainkey_client_new=t.Hc,r._vscf_brainkey_client_delete=t.Ic,r._vscf_brainkey_client_shallow_copy=t.Jc,r._vscf_brainkey_client_use_random=t.Kc,r._vscf_brainkey_client_use_operation_random=t.Lc,r._vscf_brainkey_client_setup_defaults=t.Mc,r._vscf_brainkey_client_blind=t.Nc,r._vscf_brainkey_client_deblind=t.Oc,r._vscf_brainkey_server_release_random=t.Pc,r._vscf_brainkey_server_release_operation_random=t.Qc,r._vscf_brainkey_server_new=t.Rc,r._vscf_brainkey_server_delete=t.Sc,r._vscf_brainkey_server_shallow_copy=t.Tc,r._vscf_brainkey_server_use_random=t.Uc,r._vscf_brainkey_server_use_operation_random=t.Vc,r._vscf_brainkey_server_setup_defaults=t.Wc,r._vscf_brainkey_server_generate_identity_secret=t.Xc,r._vscf_brainkey_server_harden=t.Yc,r._vscf_group_session_message_new=t.Zc,r._vscf_group_session_message_delete=t._c,r._vscf_group_session_message_shallow_copy=t.$c,r._vscf_group_session_message_get_type=t.ad,r._vscf_group_session_message_get_session_id=t.bd,r._vscf_group_session_message_get_epoch=t.cd,r._vscf_group_session_message_serialize_len=t.dd,r._vscf_group_session_message_serialize=t.ed,r._vscf_group_session_message_deserialize=t.fd,r._vscf_group_session_ticket_release_rng=t.gd,r._vscf_group_session_ticket_new=t.hd,r._vscf_group_session_ticket_delete=t.id,r._vscf_group_session_ticket_shallow_copy=t.jd,r._vscf_group_session_ticket_use_rng=t.kd,r._vscf_group_session_ticket_setup_defaults=t.ld,r._vscf_group_session_ticket_setup_ticket_as_new=t.md,r._vscf_group_session_ticket_get_ticket_message=t.nd,r._vscf_group_session_release_rng=t.od,r._vscf_group_session_new=t.pd,r._vscf_group_session_delete=t.qd,r._vscf_group_session_shallow_copy=t.rd,r._vscf_group_session_use_rng=t.sd,r._vscf_group_session_get_current_epoch=t.td,r._vscf_group_session_setup_defaults=t.ud,r._vscf_group_session_get_session_id=t.vd,r._vscf_group_session_add_epoch=t.wd,r._vscf_group_session_encrypt=t.xd,r._vscf_group_session_decrypt_len=t.yd,r._vscf_group_session_decrypt=t.zd,r._vscf_group_session_create_group_ticket=t.Ad,r._vscf_message_info_editor_release_random=t.Bd,r._vscf_message_info_editor_new=t.Cd,r._vscf_message_info_editor_delete=t.Dd,r._vscf_message_info_editor_shallow_copy=t.Ed,r._vscf_message_info_editor_use_random=t.Fd,r._vscf_message_info_editor_setup_defaults=t.Gd,r._vscf_message_info_editor_unpack=t.Hd,r._vscf_message_info_editor_unlock=t.Id,r._vscf_message_info_editor_add_key_recipient=t.Jd,r._vscf_message_info_editor_remove_key_recipient=t.Kd,r._vscf_message_info_editor_remove_all=t.Ld,r._vscf_message_info_editor_packed_len=t.Md,r._vscf_message_info_editor_pack=t.Nd,r._vscf_signer_info_new=t.Od,r._vscf_signer_info_delete=t.Pd,r._vscf_signer_info_shallow_copy=t.Qd,r._vscf_signer_info_signer_id=t.Rd,r._vscf_signer_info_signer_alg_info=t.Sd,r._vscf_signer_info_signature=t.Td,r._vscf_signer_info_list_new=t.Ud,r._vscf_signer_info_list_delete=t.Vd,r._vscf_signer_info_list_shallow_copy=t.Wd,r._vscf_signer_info_list_has_item=t.Xd,r._vscf_signer_info_list_item=t.Yd,r._vscf_signer_info_list_has_next=t.Zd,r._vscf_signer_info_list_next=t._d,r._vscf_signer_info_list_has_prev=t.$d,r._vscf_signer_info_list_prev=t.ae,r._vscf_signer_info_list_clear=t.be,r._vscf_message_info_footer_new=t.ce,r._vscf_message_info_footer_delete=t.de,r._vscf_message_info_footer_shallow_copy=t.ee,r._vscf_message_info_footer_has_signer_infos=t.fe,r._vscf_message_info_footer_signer_infos=t.ge,r._vscf_message_info_footer_signer_hash_alg_info=t.he,r._vscf_message_info_footer_signer_digest=t.ie,r._vscf_signed_data_info_new=t.je,r._vscf_signed_data_info_delete=t.ke,r._vscf_signed_data_info_shallow_copy=t.le,r._vscf_signed_data_info_hash_alg_info=t.me,r._vscf_footer_info_new=t.ne,r._vscf_footer_info_delete=t.oe,r._vscf_footer_info_shallow_copy=t.pe,r._vscf_footer_info_has_signed_data_info=t.qe,r._vscf_footer_info_signed_data_info=t.re,r._vscf_footer_info_set_data_size=t.se,r._vscf_footer_info_data_size=t.te,r._vscf_key_info_new=t.ue,r._vscf_key_info_new_with_alg_info=t.ve,r._vscf_key_info_delete=t.we,r._vscf_key_info_shallow_copy=t.xe,r._vscf_key_info_is_compound=t.ye,r._vscf_key_info_is_hybrid=t.ze,r._vscf_key_info_is_compound_hybrid=t.Ae,r._vscf_key_info_is_compound_hybrid_cipher=t.Be,r._vscf_key_info_is_compound_hybrid_signer=t.Ce,r._vscf_key_info_is_hybrid_post_quantum=t.De,r._vscf_key_info_is_hybrid_post_quantum_cipher=t.Ee,r._vscf_key_info_is_hybrid_post_quantum_signer=t.Fe,r._vscf_key_info_alg_id=t.Ge,r._vscf_key_info_compound_cipher_alg_id=t.He,r._vscf_key_info_compound_signer_alg_id=t.Ie,r._vscf_key_info_hybrid_first_key_alg_id=t.Je,r._vscf_key_info_hybrid_second_key_alg_id=t.Ke,r._vscf_key_info_compound_hybrid_cipher_first_key_alg_id=t.Le,r._vscf_key_info_compound_hybrid_cipher_second_key_alg_id=t.Me,r._vscf_key_info_compound_hybrid_signer_first_key_alg_id=t.Ne,r._vscf_key_info_compound_hybrid_signer_second_key_alg_id=t.Oe,r._vscf_padding_params_new=t.Pe,r._vscf_padding_params_new_with_constraints=t.Qe,r._vscf_padding_params_delete=t.Re,r._vscf_padding_params_shallow_copy=t.Se,r._vscf_padding_params_frame=t.Te,r._vscf_padding_params_frame_max=t.Ue,r._vscf_sha224_alg_id=t.Ve,r._vscf_sha224_produce_alg_info=t.We,r._vscf_sha224_restore_alg_info=t.Xe,r._vscf_sha224_hash=t.Ye,r._vscf_sha224_finish=t.Ze,r._vscf_sha224_start=t._e,r._vscf_sha224_update=t.$e,r._vscf_sha224_new=t.af,r._vscf_sha224_delete=t.bf,r._vscf_sha224_shallow_copy=t.cf,r._vscf_sha256_alg_id=t.df,r._vscf_sha256_produce_alg_info=t.ef,r._vscf_sha256_restore_alg_info=t.ff,r._vscf_sha256_hash=t.gf,r._vscf_sha256_finish=t.hf,r._vscf_sha256_start=t.jf,r._vscf_sha256_update=t.kf,r._vscf_sha256_new=t.lf,r._vscf_sha256_delete=t.mf,r._vscf_sha256_shallow_copy=t.nf,r._vscf_sha384_alg_id=t.of,r._vscf_sha384_produce_alg_info=t.pf,r._vscf_sha384_restore_alg_info=t.qf,r._vscf_sha384_hash=t.rf,r._vscf_sha384_finish=t.sf,r._vscf_sha384_start=t.tf,r._vscf_sha384_update=t.uf,r._vscf_sha384_new=t.vf,r._vscf_sha384_delete=t.wf,r._vscf_sha384_shallow_copy=t.xf,r._vscf_sha512_alg_id=t.yf,r._vscf_sha512_produce_alg_info=t.zf,r._vscf_sha512_restore_alg_info=t.Af,r._vscf_sha512_hash=t.Bf,r._vscf_sha512_finish=t.Cf,r._vscf_sha512_start=t.Df,r._vscf_sha512_update=t.Ef,r._vscf_sha512_new=t.Ff,r._vscf_sha512_delete=t.Gf,r._vscf_sha512_shallow_copy=t.Hf,r._vscf_aes256_gcm_out_len=t.If,r._vscf_aes256_gcm_alg_id=t.Jf,r._vscf_aes256_gcm_produce_alg_info=t.Kf,r._vscf_aes256_gcm_restore_alg_info=t.Lf,r._vscf_aes256_gcm_set_nonce=t.Mf,r._vscf_aes256_gcm_encrypt=t.Nf,r._vscf_aes256_gcm_start_encryption=t.Of,r._vscf_aes256_gcm_update=t.Pf,r._vscf_aes256_gcm_finish_auth_decryption=t.Qf,r._vscf_aes256_gcm_finish_auth_encryption=t.Rf,r._vscf_aes256_gcm_encrypted_len=t.Sf,r._vscf_aes256_gcm_finish=t.Tf,r._vscf_aes256_gcm_precise_encrypted_len=t.Uf,r._vscf_aes256_gcm_decrypt=t.Vf,r._vscf_aes256_gcm_start_decryption=t.Wf,r._vscf_aes256_gcm_decrypted_len=t.Xf,r._vscf_aes256_gcm_set_key=t.Yf,r._vscf_aes256_gcm_state=t.Zf,r._vscf_aes256_gcm_decrypted_out_len=t._f,r._vscf_aes256_gcm_encrypted_out_len=t.$f,r._vscf_aes256_gcm_auth_encrypt=t.ag,r._vscf_aes256_gcm_auth_encrypted_len=t.bg,r._vscf_aes256_gcm_set_auth_data=t.cg,r._vscf_aes256_gcm_auth_decrypt=t.dg,r._vscf_aes256_gcm_auth_decrypted_len=t.eg,r._vscf_aes256_gcm_new=t.fg,r._vscf_aes256_gcm_delete=t.gg,r._vscf_aes256_gcm_shallow_copy=t.hg,r._vscf_aes256_cbc_alg_id=t.ig,r._vscf_aes256_cbc_produce_alg_info=t.jg,r._vscf_aes256_cbc_restore_alg_info=t.kg,r._vscf_aes256_cbc_set_nonce=t.lg,r._vscf_aes256_cbc_encrypt=t.mg,r._vscf_aes256_cbc_start_encryption=t.ng,r._vscf_aes256_cbc_update=t.og,r._vscf_aes256_cbc_finish=t.pg,r._vscf_aes256_cbc_encrypted_len=t.qg,r._vscf_aes256_cbc_precise_encrypted_len=t.rg,r._vscf_aes256_cbc_decrypt=t.sg,r._vscf_aes256_cbc_start_decryption=t.tg,r._vscf_aes256_cbc_decrypted_len=t.ug,r._vscf_aes256_cbc_set_key=t.vg,r._vscf_aes256_cbc_state=t.wg,r._vscf_aes256_cbc_out_len=t.xg,r._vscf_aes256_cbc_decrypted_out_len=t.yg,r._vscf_aes256_cbc_encrypted_out_len=t.zg,r._vscf_aes256_cbc_new=t.Ag,r._vscf_aes256_cbc_delete=t.Bg,r._vscf_aes256_cbc_shallow_copy=t.Cg,r._vscf_asn1rd_reset=t.Dg,r._vscf_asn1rd_left_len=t.Eg,r._vscf_asn1rd_has_error=t.Fg,r._vscf_asn1rd_status=t.Gg,r._vscf_asn1rd_get_tag=t.Hg,r._vscf_asn1rd_get_len=t.Ig,r._vscf_asn1rd_get_data_len=t.Jg,r._vscf_asn1rd_read_tag=t.Kg,r._vscf_asn1rd_read_context_tag=t.Lg,r._vscf_asn1rd_read_int=t.Mg,r._vscf_asn1rd_read_int64=t.Ng,r._vscf_asn1rd_read_int8=t.Og,r._vscf_asn1rd_read_int16=t.Pg,r._vscf_asn1rd_read_int32=t.Qg,r._vscf_asn1rd_read_uint=t.Rg,r._vscf_asn1rd_read_uint64=t.Sg,r._vscf_asn1rd_read_uint8=t.Tg,r._vscf_asn1rd_read_uint16=t.Ug,r._vscf_asn1rd_read_uint32=t.Vg,r._vscf_asn1rd_read_bool=t.Wg,r._vscf_asn1rd_read_null=t.Xg,r._vscf_asn1rd_read_null_optional=t.Yg,r._vscf_asn1rd_read_octet_str=t.Zg,r._vscf_asn1rd_read_bitstring_as_octet_str=t._g,r._vscf_asn1rd_read_utf8_str=t.$g,r._vscf_asn1rd_read_oid=t.ah,r._vscf_asn1rd_read_data=t.bh,r._vscf_asn1rd_read_sequence=t.ch,r._vscf_asn1rd_read_set=t.dh,r._vscf_asn1rd_new=t.eh,r._vscf_asn1rd_delete=t.fh,r._vscf_asn1rd_shallow_copy=t.gh,r._vscf_asn1wr_reset=t.hh,r._vscf_asn1wr_finish=t.ih,r._vscf_asn1wr_bytes=t.jh,r._vscf_asn1wr_len=t.kh,r._vscf_asn1wr_written_len=t.lh,r._vscf_asn1wr_unwritten_len=t.mh,r._vscf_asn1wr_has_error=t.nh,r._vscf_asn1wr_status=t.oh,r._vscf_asn1wr_reserve=t.ph,r._vscf_asn1wr_write_tag=t.qh,r._vscf_asn1wr_write_context_tag=t.rh,r._vscf_asn1wr_write_len=t.sh,r._vscf_asn1wr_write_int=t.th,r._vscf_asn1wr_write_int64=t.uh,r._vscf_asn1wr_write_int8=t.vh,r._vscf_asn1wr_write_int16=t.wh,r._vscf_asn1wr_write_int32=t.xh,r._vscf_asn1wr_write_uint=t.yh,r._vscf_asn1wr_write_uint64=t.zh,r._vscf_asn1wr_write_uint8=t.Ah,r._vscf_asn1wr_write_uint16=t.Bh,r._vscf_asn1wr_write_uint32=t.Ch,r._vscf_asn1wr_write_bool=t.Dh,r._vscf_asn1wr_write_null=t.Eh,r._vscf_asn1wr_write_octet_str=t.Fh,r._vscf_asn1wr_write_octet_str_as_bitstring=t.Gh,r._vscf_asn1wr_write_data=t.Hh,r._vscf_asn1wr_write_utf8_str=t.Ih,r._vscf_asn1wr_write_oid=t.Jh,r._vscf_asn1wr_write_sequence=t.Kh,r._vscf_asn1wr_write_set=t.Lh,r._vscf_asn1wr_new=t.Mh,r._vscf_asn1wr_delete=t.Nh,r._vscf_asn1wr_shallow_copy=t.Oh,r._vscf_rsa_public_key_key_exponent=t.Ph,r._vscf_rsa_public_key_is_valid=t.Qh,r._vscf_rsa_public_key_len=t.Rh,r._vscf_rsa_public_key_alg_id=t.Sh,r._vscf_rsa_public_key_alg_info=t.Th,r._vscf_rsa_public_key_bitlen=t.Uh,r._vscf_rsa_public_key_impl_tag=t.Vh,r._vscf_rsa_public_key_new=t.Wh,r._vscf_rsa_public_key_delete=t.Xh,r._vscf_rsa_public_key_shallow_copy=t.Yh,r._vscf_rsa_private_key_is_valid=t.Zh,r._vscf_rsa_private_key_len=t._h,r._vscf_rsa_private_key_alg_id=t.$h,r._vscf_rsa_private_key_alg_info=t.ai,r._vscf_rsa_private_key_bitlen=t.bi,r._vscf_rsa_private_key_impl_tag=t.ci,r._vscf_rsa_private_key_extract_public_key=t.di,r._vscf_rsa_private_key_new=t.ei,r._vscf_rsa_private_key_delete=t.fi,r._vscf_rsa_private_key_shallow_copy=t.gi,r._vscf_rsa_setup_defaults=t.hi,r._vscf_rsa_generate_key=t.ii,r._vscf_rsa_generate_ephemeral_key=t.ji,r._vscf_rsa_import_public_key=t.ki,r._vscf_rsa_import_public_key_data=t.li,r._vscf_rsa_export_public_key=t.mi,r._vscf_rsa_exported_public_key_data_len=t.ni,r._vscf_rsa_export_public_key_data=t.oi,r._vscf_rsa_import_private_key=t.pi,r._vscf_rsa_import_private_key_data=t.qi,r._vscf_rsa_export_private_key=t.ri,r._vscf_rsa_exported_private_key_data_len=t.si,r._vscf_rsa_export_private_key_data=t.ti,r._vscf_rsa_can_encrypt=t.ui,r._vscf_rsa_encrypted_len=t.vi,r._vscf_rsa_encrypt=t.wi,r._vscf_rsa_can_decrypt=t.xi,r._vscf_rsa_decrypted_len=t.yi,r._vscf_rsa_decrypt=t.zi,r._vscf_rsa_can_sign=t.Ai,r._vscf_rsa_signature_len=t.Bi,r._vscf_rsa_sign_hash=t.Ci,r._vscf_rsa_can_verify=t.Di,r._vscf_rsa_verify_hash=t.Ei,r._vscf_rsa_use_random=t.Fi,r._vscf_rsa_release_random=t.Gi,r._vscf_rsa_new=t.Hi,r._vscf_rsa_delete=t.Ii,r._vscf_rsa_shallow_copy=t.Ji,r._vscf_ecc_public_key_alg_id=t.Ki,r._vscf_ecc_public_key_alg_info=t.Li,r._vscf_ecc_public_key_len=t.Mi,r._vscf_ecc_public_key_bitlen=t.Ni,r._vscf_ecc_public_key_impl_tag=t.Oi,r._vscf_ecc_public_key_is_valid=t.Pi,r._vscf_ecc_public_key_new=t.Qi,r._vscf_ecc_public_key_delete=t.Ri,r._vscf_ecc_public_key_shallow_copy=t.Si,r._vscf_ecc_private_key_alg_id=t.Ti,r._vscf_ecc_private_key_alg_info=t.Ui,r._vscf_ecc_private_key_len=t.Vi,r._vscf_ecc_private_key_bitlen=t.Wi,r._vscf_ecc_private_key_impl_tag=t.Xi,r._vscf_ecc_private_key_is_valid=t.Yi,r._vscf_ecc_private_key_extract_public_key=t.Zi,r._vscf_ecc_private_key_new=t._i,r._vscf_ecc_private_key_delete=t.$i,r._vscf_ecc_private_key_shallow_copy=t.aj,r._vscf_ecc_setup_defaults=t.bj,r._vscf_ecc_generate_key=t.cj,r._vscf_ecc_generate_ephemeral_key=t.dj,r._vscf_ecc_import_public_key=t.ej,r._vscf_ecc_import_public_key_data=t.fj,r._vscf_ecc_export_public_key=t.gj,r._vscf_ecc_exported_public_key_data_len=t.hj,r._vscf_ecc_export_public_key_data=t.ij,r._vscf_ecc_import_private_key=t.jj,r._vscf_ecc_import_private_key_data=t.kj,r._vscf_ecc_export_private_key=t.lj,r._vscf_ecc_exported_private_key_data_len=t.mj,r._vscf_ecc_export_private_key_data=t.nj,r._vscf_ecc_can_encrypt=t.oj,r._vscf_ecc_encrypted_len=t.pj,r._vscf_ecc_encrypt=t.qj,r._vscf_ecc_can_decrypt=t.rj,r._vscf_ecc_decrypted_len=t.sj,r._vscf_ecc_decrypt=t.tj,r._vscf_ecc_can_sign=t.uj,r._vscf_ecc_signature_len=t.vj,r._vscf_ecc_sign_hash=t.wj,r._vscf_ecc_can_verify=t.xj,r._vscf_ecc_verify_hash=t.yj,r._vscf_ecc_compute_shared_key=t.zj,r._vscf_ecc_shared_key_len=t.Aj,r._vscf_ecc_kem_shared_key_len=t.Bj,r._vscf_ecc_kem_encapsulated_key_len=t.Cj,r._vscf_ecc_kem_encapsulate=t.Dj,r._vscf_ecc_kem_decapsulate=t.Ej,r._vscf_ecc_use_random=t.Fj,r._vscf_ecc_release_random=t.Gj,r._vscf_ecc_use_ecies=t.Hj,r._vscf_ecc_release_ecies=t.Ij,r._vscf_ecc_new=t.Jj,r._vscf_ecc_delete=t.Kj,r._vscf_ecc_shallow_copy=t.Lj,r._vscf_entropy_accumulator_setup_defaults=t.Mj,r._vscf_entropy_accumulator_add_source=t.Nj,r._vscf_entropy_accumulator_is_strong=t.Oj,r._vscf_entropy_accumulator_gather=t.Pj,r._vscf_entropy_accumulator_new=t.Qj,r._vscf_entropy_accumulator_delete=t.Rj,r._vscf_entropy_accumulator_shallow_copy=t.Sj,r._vscf_ctr_drbg_setup_defaults=t.Tj,r._vscf_ctr_drbg_enable_prediction_resistance=t.Uj,r._vscf_ctr_drbg_set_reseed_interval=t.Vj,r._vscf_ctr_drbg_set_entropy_len=t.Wj,r._vscf_ctr_drbg_random=t.Xj,r._vscf_ctr_drbg_reseed=t.Yj,r._vscf_ctr_drbg_use_entropy_source=t.Zj,r._vscf_ctr_drbg_release_entropy_source=t._j,r._vscf_ctr_drbg_new=t.$j,r._vscf_ctr_drbg_delete=t.ak,r._vscf_ctr_drbg_shallow_copy=t.bk,r._vscf_hmac_alg_id=t.ck,r._vscf_hmac_produce_alg_info=t.dk,r._vscf_hmac_restore_alg_info=t.ek,r._vscf_hmac_digest_len=t.fk,r._vscf_hmac_mac=t.gk,r._vscf_hmac_start=t.hk,r._vscf_hmac_finish=t.ik,r._vscf_hmac_update=t.jk,r._vscf_hmac_reset=t.kk,r._vscf_hmac_use_hash=t.lk,r._vscf_hmac_release_hash=t.mk,r._vscf_hmac_new=t.nk,r._vscf_hmac_delete=t.ok,r._vscf_hmac_shallow_copy=t.pk,r._vscf_hkdf_alg_id=t.qk,r._vscf_hkdf_produce_alg_info=t.rk,r._vscf_hkdf_restore_alg_info=t.sk,r._vscf_hkdf_derive=t.tk,r._vscf_hkdf_reset=t.uk,r._vscf_hkdf_set_info=t.vk,r._vscf_hkdf_use_hash=t.wk,r._vscf_hkdf_release_hash=t.xk,r._vscf_hkdf_new=t.yk,r._vscf_hkdf_delete=t.zk,r._vscf_hkdf_shallow_copy=t.Ak,r._vscf_kdf1_alg_id=t.Bk,r._vscf_kdf1_produce_alg_info=t.Ck,r._vscf_kdf1_restore_alg_info=t.Dk,r._vscf_kdf1_derive=t.Ek,r._vscf_kdf1_use_hash=t.Fk,r._vscf_kdf1_release_hash=t.Gk,r._vscf_kdf1_new=t.Hk,r._vscf_kdf1_delete=t.Ik,r._vscf_kdf1_shallow_copy=t.Jk,r._vscf_kdf2_alg_id=t.Kk,r._vscf_kdf2_produce_alg_info=t.Lk,r._vscf_kdf2_restore_alg_info=t.Mk,r._vscf_kdf2_derive=t.Nk,r._vscf_kdf2_use_hash=t.Ok,r._vscf_kdf2_release_hash=t.Pk,r._vscf_kdf2_new=t.Qk,r._vscf_kdf2_delete=t.Rk,r._vscf_kdf2_shallow_copy=t.Sk,r._vscf_fake_random_setup_source_byte=t.Tk,r._vscf_fake_random_setup_source_data=t.Uk,r._vscf_fake_random_random=t.Vk,r._vscf_fake_random_reseed=t.Wk,r._vscf_fake_random_is_strong=t.Xk,r._vscf_fake_random_gather=t.Yk,r._vscf_fake_random_new=t.Zk,r._vscf_fake_random_delete=t._k,r._vscf_fake_random_shallow_copy=t.$k,r._vscf_pkcs5_pbkdf2_setup_defaults=t.al,r._vscf_pkcs5_pbkdf2_alg_id=t.bl,r._vscf_pkcs5_pbkdf2_produce_alg_info=t.cl,r._vscf_pkcs5_pbkdf2_restore_alg_info=t.dl,r._vscf_pkcs5_pbkdf2_reset=t.el,r._vscf_pkcs5_pbkdf2_derive=t.fl,r._vscf_pkcs5_pbkdf2_set_info=t.gl,r._vscf_pkcs5_pbkdf2_use_hmac=t.hl,r._vscf_pkcs5_pbkdf2_release_hmac=t.il,r._vscf_pkcs5_pbkdf2_new=t.jl,r._vscf_pkcs5_pbkdf2_delete=t.kl,r._vscf_pkcs5_pbkdf2_shallow_copy=t.ll,r._vscf_pkcs5_pbes2_reset=t.ml,r._vscf_pkcs5_pbes2_alg_id=t.nl,r._vscf_pkcs5_pbes2_produce_alg_info=t.ol,r._vscf_pkcs5_pbes2_restore_alg_info=t.pl,r._vscf_pkcs5_pbes2_encrypt=t.ql,r._vscf_pkcs5_pbes2_encrypted_len=t.rl,r._vscf_pkcs5_pbes2_precise_encrypted_len=t.sl,r._vscf_pkcs5_pbes2_decrypt=t.tl,r._vscf_pkcs5_pbes2_decrypted_len=t.ul,r._vscf_pkcs5_pbes2_use_kdf=t.vl,r._vscf_pkcs5_pbes2_release_kdf=t.wl,r._vscf_pkcs5_pbes2_use_cipher=t.xl,r._vscf_pkcs5_pbes2_release_cipher=t.yl,r._vscf_pkcs5_pbes2_new=t.zl,r._vscf_pkcs5_pbes2_delete=t.Al,r._vscf_pkcs5_pbes2_shallow_copy=t.Bl,r._vscf_seed_entropy_source_reset_seed=t.Cl,r._vscf_seed_entropy_source_is_strong=t.Dl,r._vscf_seed_entropy_source_gather=t.El,r._vscf_seed_entropy_source_new=t.Fl,r._vscf_seed_entropy_source_delete=t.Gl,r._vscf_seed_entropy_source_shallow_copy=t.Hl,r._vscf_key_material_rng_reset_key_material=t.Il,r._vscf_key_material_rng_random=t.Jl,r._vscf_key_material_rng_reseed=t.Kl,r._vscf_key_material_rng_new=t.Ll,r._vscf_key_material_rng_delete=t.Ml,r._vscf_key_material_rng_shallow_copy=t.Nl,r._vscf_raw_public_key_data=t.Ol,r._vscf_raw_public_key_alg_id=t.Pl,r._vscf_raw_public_key_alg_info=t.Ql,r._vscf_raw_public_key_len=t.Rl,r._vscf_raw_public_key_bitlen=t.Sl,r._vscf_raw_public_key_impl_tag=t.Tl,r._vscf_raw_public_key_is_valid=t.Ul,r._vscf_raw_public_key_new=t.Vl,r._vscf_raw_public_key_delete=t.Wl,r._vscf_raw_public_key_shallow_copy=t.Xl,r._vscf_raw_private_key_data=t.Yl,r._vscf_raw_private_key_has_public_key=t.Zl,r._vscf_raw_private_key_set_public_key=t._l,r._vscf_raw_private_key_get_public_key=t.$l,r._vscf_raw_private_key_alg_id=t.am,r._vscf_raw_private_key_alg_info=t.bm,r._vscf_raw_private_key_len=t.cm,r._vscf_raw_private_key_bitlen=t.dm,r._vscf_raw_private_key_impl_tag=t.em,r._vscf_raw_private_key_is_valid=t.fm,r._vscf_raw_private_key_extract_public_key=t.gm,r._vscf_raw_private_key_new=t.hm,r._vscf_raw_private_key_delete=t.im,r._vscf_raw_private_key_shallow_copy=t.jm,r._vscf_pkcs8_serializer_setup_defaults=t.km,r._vscf_pkcs8_serializer_serialize_public_key_inplace=t.lm,r._vscf_pkcs8_serializer_serialized_public_key_len=t.mm,r._vscf_pkcs8_serializer_serialize_private_key_inplace=t.nm,r._vscf_pkcs8_serializer_serialized_private_key_len=t.om,r._vscf_pkcs8_serializer_serialize_public_key=t.pm,r._vscf_pkcs8_serializer_serialize_private_key=t.qm,r._vscf_pkcs8_serializer_use_asn1_writer=t.rm,r._vscf_pkcs8_serializer_release_asn1_writer=t.sm,r._vscf_pkcs8_serializer_new=t.tm,r._vscf_pkcs8_serializer_delete=t.um,r._vscf_pkcs8_serializer_shallow_copy=t.vm,r._vscf_sec1_serializer_setup_defaults=t.wm,r._vscf_sec1_serializer_serialize_public_key_inplace=t.xm,r._vscf_sec1_serializer_serialized_public_key_len=t.ym,r._vscf_sec1_serializer_serialize_private_key_inplace=t.zm,r._vscf_sec1_serializer_serialized_private_key_len=t.Am,r._vscf_sec1_serializer_serialize_public_key=t.Bm,r._vscf_sec1_serializer_serialize_private_key=t.Cm,r._vscf_sec1_serializer_use_asn1_writer=t.Dm,r._vscf_sec1_serializer_release_asn1_writer=t.Em,r._vscf_sec1_serializer_new=t.Fm,r._vscf_sec1_serializer_delete=t.Gm,r._vscf_sec1_serializer_shallow_copy=t.Hm,r._vscf_key_asn1_serializer_setup_defaults=t.Im,r._vscf_key_asn1_serializer_serialize_public_key_inplace=t.Jm,r._vscf_key_asn1_serializer_serialized_public_key_len=t.Km,r._vscf_key_asn1_serializer_serialize_private_key_inplace=t.Lm,r._vscf_key_asn1_serializer_serialized_private_key_len=t.Mm,r._vscf_key_asn1_serializer_serialize_public_key=t.Nm,r._vscf_key_asn1_serializer_serialize_private_key=t.Om,r._vscf_key_asn1_serializer_use_asn1_writer=t.Pm,r._vscf_key_asn1_serializer_release_asn1_writer=t.Qm,r._vscf_key_asn1_serializer_new=t.Rm,r._vscf_key_asn1_serializer_delete=t.Sm,r._vscf_key_asn1_serializer_shallow_copy=t.Tm,r._vscf_key_asn1_deserializer_setup_defaults=t.Um,r._vscf_key_asn1_deserializer_deserialize_public_key_inplace=t.Vm,r._vscf_key_asn1_deserializer_deserialize_private_key_inplace=t.Wm,r._vscf_key_asn1_deserializer_deserialize_public_key=t.Xm,r._vscf_key_asn1_deserializer_deserialize_private_key=t.Ym,r._vscf_key_asn1_deserializer_use_asn1_reader=t.Zm,r._vscf_key_asn1_deserializer_release_asn1_reader=t._m,r._vscf_key_asn1_deserializer_new=t.$m,r._vscf_key_asn1_deserializer_delete=t.an,r._vscf_key_asn1_deserializer_shallow_copy=t.bn,r._vscf_ed25519_setup_defaults=t.cn,r._vscf_ed25519_generate_key=t.dn,r._vscf_ed25519_generate_ephemeral_key=t.en,r._vscf_ed25519_import_public_key=t.fn,r._vscf_ed25519_import_public_key_data=t.gn,r._vscf_ed25519_export_public_key=t.hn,r._vscf_ed25519_exported_public_key_data_len=t.jn,r._vscf_ed25519_export_public_key_data=t.kn,r._vscf_ed25519_import_private_key=t.ln,r._vscf_ed25519_import_private_key_data=t.mn,r._vscf_ed25519_export_private_key=t.nn,r._vscf_ed25519_exported_private_key_data_len=t.on,r._vscf_ed25519_export_private_key_data=t.pn,r._vscf_ed25519_can_encrypt=t.qn,r._vscf_ed25519_encrypted_len=t.rn,r._vscf_ed25519_encrypt=t.sn,r._vscf_ed25519_can_decrypt=t.tn,r._vscf_ed25519_decrypted_len=t.un,r._vscf_ed25519_decrypt=t.vn,r._vscf_ed25519_can_sign=t.wn,r._vscf_ed25519_signature_len=t.xn,r._vscf_ed25519_sign_hash=t.yn,r._vscf_ed25519_can_verify=t.zn,r._vscf_ed25519_verify_hash=t.An,r._vscf_ed25519_compute_shared_key=t.Bn,r._vscf_ed25519_shared_key_len=t.Cn,r._vscf_ed25519_kem_shared_key_len=t.Dn,r._vscf_ed25519_kem_encapsulated_key_len=t.En,r._vscf_ed25519_kem_encapsulate=t.Fn,r._vscf_ed25519_kem_decapsulate=t.Gn,r._vscf_ed25519_use_random=t.Hn,r._vscf_ed25519_release_random=t.In,r._vscf_ed25519_use_ecies=t.Jn,r._vscf_ed25519_release_ecies=t.Kn,r._vscf_ed25519_new=t.Ln,r._vscf_ed25519_delete=t.Mn,r._vscf_ed25519_shallow_copy=t.Nn,r._vscf_curve25519_setup_defaults=t.On,r._vscf_curve25519_generate_key=t.Pn,r._vscf_curve25519_generate_ephemeral_key=t.Qn,r._vscf_curve25519_import_public_key=t.Rn,r._vscf_curve25519_import_public_key_data=t.Sn,r._vscf_curve25519_export_public_key=t.Tn,r._vscf_curve25519_exported_public_key_data_len=t.Un,r._vscf_curve25519_export_public_key_data=t.Vn,r._vscf_curve25519_import_private_key=t.Wn,r._vscf_curve25519_import_private_key_data=t.Xn,r._vscf_curve25519_export_private_key=t.Yn,r._vscf_curve25519_exported_private_key_data_len=t.Zn,r._vscf_curve25519_export_private_key_data=t._n,r._vscf_curve25519_can_encrypt=t.$n,r._vscf_curve25519_encrypted_len=t.ao,r._vscf_curve25519_encrypt=t.bo,r._vscf_curve25519_can_decrypt=t.co,r._vscf_curve25519_decrypted_len=t.eo,r._vscf_curve25519_decrypt=t.fo,r._vscf_curve25519_compute_shared_key=t.go,r._vscf_curve25519_shared_key_len=t.ho,r._vscf_curve25519_kem_shared_key_len=t.io,r._vscf_curve25519_kem_encapsulated_key_len=t.jo,r._vscf_curve25519_kem_encapsulate=t.ko,r._vscf_curve25519_kem_decapsulate=t.lo,r._vscf_curve25519_use_random=t.mo,r._vscf_curve25519_release_random=t.no,r._vscf_curve25519_use_ecies=t.oo,r._vscf_curve25519_release_ecies=t.po,r._vscf_curve25519_new=t.qo,r._vscf_curve25519_delete=t.ro,r._vscf_curve25519_shallow_copy=t.so,r._vscf_falcon_setup_defaults=t.to,r._vscf_falcon_generate_key=t.uo,r._vscf_falcon_produce_alg_info=t.vo,r._vscf_falcon_alg_id=t.wo,r._vscf_falcon_restore_alg_info=t.xo,r._vscf_falcon_generate_ephemeral_key=t.yo,r._vscf_falcon_import_public_key=t.zo,r._vscf_falcon_import_public_key_data=t.Ao,r._vscf_falcon_export_public_key=t.Bo,r._vscf_falcon_exported_public_key_data_len=t.Co,r._vscf_falcon_export_public_key_data=t.Do,r._vscf_falcon_import_private_key=t.Eo,r._vscf_falcon_import_private_key_data=t.Fo,r._vscf_falcon_export_private_key=t.Go,r._vscf_falcon_exported_private_key_data_len=t.Ho,r._vscf_falcon_export_private_key_data=t.Io,r._vscf_falcon_can_sign=t.Jo,r._vscf_falcon_signature_len=t.Ko,r._vscf_falcon_sign_hash=t.Lo,r._vscf_falcon_can_verify=t.Mo,r._vscf_falcon_verify_hash=t.No,r._vscf_falcon_use_random=t.Oo,r._vscf_falcon_release_random=t.Po,r._vscf_falcon_new=t.Qo,r._vscf_falcon_delete=t.Ro,r._vscf_falcon_shallow_copy=t.So,r._vscf_round5_setup_defaults=t.To,r._vscf_round5_generate_key=t.Uo,r._vscf_round5_generate_ephemeral_key=t.Vo,r._vscf_round5_import_public_key=t.Wo,r._vscf_round5_import_public_key_data=t.Xo,r._vscf_round5_export_public_key=t.Yo,r._vscf_round5_exported_public_key_data_len=t.Zo,r._vscf_round5_export_public_key_data=t._o,r._vscf_round5_import_private_key=t.$o,r._vscf_round5_import_private_key_data=t.ap,r._vscf_round5_export_private_key=t.bp,r._vscf_round5_exported_private_key_data_len=t.cp,r._vscf_round5_export_private_key_data=t.dp,r._vscf_round5_kem_shared_key_len=t.ep,r._vscf_round5_kem_encapsulated_key_len=t.fp,r._vscf_round5_kem_encapsulate=t.gp,r._vscf_round5_kem_decapsulate=t.hp,r._vscf_round5_use_random=t.ip,r._vscf_round5_release_random=t.jp,r._vscf_round5_new=t.kp,r._vscf_round5_delete=t.lp,r._vscf_round5_shallow_copy=t.mp,r._vscf_compound_key_alg_info_cipher_alg_info=t.np,r._vscf_compound_key_alg_info_signer_alg_info=t.op,r._vscf_compound_key_alg_info_alg_id=t.pp,r._vscf_compound_key_alg_info_new=t.qp,r._vscf_compound_key_alg_info_delete=t.rp,r._vscf_compound_key_alg_info_shallow_copy=t.sp,r._vscf_compound_public_key_cipher_key=t.tp,r._vscf_compound_public_key_signer_key=t.up,r._vscf_compound_public_key_alg_id=t.vp,r._vscf_compound_public_key_alg_info=t.wp,r._vscf_compound_public_key_len=t.xp,r._vscf_compound_public_key_bitlen=t.yp,r._vscf_compound_public_key_impl_tag=t.zp,r._vscf_compound_public_key_is_valid=t.Ap,r._vscf_compound_public_key_new=t.Bp,r._vscf_compound_public_key_delete=t.Cp,r._vscf_compound_public_key_shallow_copy=t.Dp,r._vscf_compound_private_key_cipher_key=t.Ep,r._vscf_compound_private_key_signer_key=t.Fp,r._vscf_compound_private_key_alg_id=t.Gp,r._vscf_compound_private_key_alg_info=t.Hp,r._vscf_compound_private_key_len=t.Ip,r._vscf_compound_private_key_bitlen=t.Jp,r._vscf_compound_private_key_impl_tag=t.Kp,r._vscf_compound_private_key_is_valid=t.Lp,r._vscf_compound_private_key_extract_public_key=t.Mp,r._vscf_compound_private_key_new=t.Np,r._vscf_compound_private_key_delete=t.Op,r._vscf_compound_private_key_shallow_copy=t.Pp,r._vscf_compound_key_alg_setup_defaults=t.Qp,r._vscf_compound_key_alg_make_key=t.Rp,r._vscf_compound_key_alg_alg_id=t.Sp,r._vscf_compound_key_alg_produce_alg_info=t.Tp,r._vscf_compound_key_alg_restore_alg_info=t.Up,r._vscf_compound_key_alg_generate_ephemeral_key=t.Vp,r._vscf_compound_key_alg_import_public_key=t.Wp,r._vscf_compound_key_alg_import_public_key_data=t.Xp,r._vscf_compound_key_alg_export_public_key=t.Yp,r._vscf_compound_key_alg_exported_public_key_data_len=t.Zp,r._vscf_compound_key_alg_export_public_key_data=t._p,r._vscf_compound_key_alg_import_private_key=t.$p,r._vscf_compound_key_alg_import_private_key_data=t.aq,r._vscf_compound_key_alg_export_private_key=t.bq,r._vscf_compound_key_alg_exported_private_key_data_len=t.cq,r._vscf_compound_key_alg_export_private_key_data=t.dq,r._vscf_compound_key_alg_can_encrypt=t.eq,r._vscf_compound_key_alg_encrypted_len=t.fq,r._vscf_compound_key_alg_encrypt=t.gq,r._vscf_compound_key_alg_can_decrypt=t.hq,r._vscf_compound_key_alg_decrypted_len=t.iq,r._vscf_compound_key_alg_decrypt=t.jq,r._vscf_compound_key_alg_can_sign=t.kq,r._vscf_compound_key_alg_signature_len=t.lq,r._vscf_compound_key_alg_sign_hash=t.mq,r._vscf_compound_key_alg_can_verify=t.nq,r._vscf_compound_key_alg_verify_hash=t.oq,r._vscf_compound_key_alg_use_random=t.pq,r._vscf_compound_key_alg_release_random=t.qq,r._vscf_compound_key_alg_new=t.rq,r._vscf_compound_key_alg_delete=t.sq,r._vscf_compound_key_alg_shallow_copy=t.tq,r._vscf_hybrid_key_alg_info_first_key_alg_info=t.uq,r._vscf_hybrid_key_alg_info_second_key_alg_info=t.vq,r._vscf_hybrid_key_alg_info_alg_id=t.wq,r._vscf_hybrid_key_alg_info_new=t.xq,r._vscf_hybrid_key_alg_info_delete=t.yq,r._vscf_hybrid_key_alg_info_shallow_copy=t.zq,r._vscf_hybrid_public_key_first_key=t.Aq,r._vscf_hybrid_public_key_second_key=t.Bq,r._vscf_hybrid_public_key_alg_id=t.Cq,r._vscf_hybrid_public_key_alg_info=t.Dq,r._vscf_hybrid_public_key_len=t.Eq,r._vscf_hybrid_public_key_bitlen=t.Fq,r._vscf_hybrid_public_key_impl_tag=t.Gq,r._vscf_hybrid_public_key_is_valid=t.Hq,r._vscf_hybrid_public_key_new=t.Iq,r._vscf_hybrid_public_key_delete=t.Jq,r._vscf_hybrid_public_key_shallow_copy=t.Kq,r._vscf_hybrid_private_key_first_key=t.Lq,r._vscf_hybrid_private_key_second_key=t.Mq,r._vscf_hybrid_private_key_alg_id=t.Nq,r._vscf_hybrid_private_key_alg_info=t.Oq,r._vscf_hybrid_private_key_len=t.Pq,r._vscf_hybrid_private_key_bitlen=t.Qq,r._vscf_hybrid_private_key_impl_tag=t.Rq,r._vscf_hybrid_private_key_is_valid=t.Sq,r._vscf_hybrid_private_key_extract_public_key=t.Tq,r._vscf_hybrid_private_key_new=t.Uq,r._vscf_hybrid_private_key_delete=t.Vq,r._vscf_hybrid_private_key_shallow_copy=t.Wq,r._vscf_hybrid_key_alg_setup_defaults=t.Xq,r._vscf_hybrid_key_alg_make_key=t.Yq,r._vscf_hybrid_key_alg_generate_ephemeral_key=t.Zq,r._vscf_hybrid_key_alg_import_public_key=t._q,r._vscf_hybrid_key_alg_import_public_key_data=t.$q,r._vscf_hybrid_key_alg_export_public_key=t.ar,r._vscf_hybrid_key_alg_exported_public_key_data_len=t.br,r._vscf_hybrid_key_alg_export_public_key_data=t.cr,r._vscf_hybrid_key_alg_import_private_key=t.dr,r._vscf_hybrid_key_alg_import_private_key_data=t.er,r._vscf_hybrid_key_alg_export_private_key=t.fr,r._vscf_hybrid_key_alg_exported_private_key_data_len=t.gr,r._vscf_hybrid_key_alg_export_private_key_data=t.hr,r._vscf_hybrid_key_alg_can_encrypt=t.ir,r._vscf_hybrid_key_alg_encrypted_len=t.jr,r._vscf_hybrid_key_alg_encrypt=t.kr,r._vscf_hybrid_key_alg_can_decrypt=t.lr,r._vscf_hybrid_key_alg_decrypted_len=t.mr,r._vscf_hybrid_key_alg_decrypt=t.nr,r._vscf_hybrid_key_alg_can_sign=t.or,r._vscf_hybrid_key_alg_signature_len=t.pr,r._vscf_hybrid_key_alg_sign_hash=t.qr,r._vscf_hybrid_key_alg_can_verify=t.rr,r._vscf_hybrid_key_alg_verify_hash=t.sr,r._vscf_hybrid_key_alg_use_random=t.tr,r._vscf_hybrid_key_alg_release_random=t.ur,r._vscf_hybrid_key_alg_use_cipher=t.vr,r._vscf_hybrid_key_alg_release_cipher=t.wr,r._vscf_hybrid_key_alg_use_hash=t.xr,r._vscf_hybrid_key_alg_release_hash=t.yr,r._vscf_hybrid_key_alg_new=t.zr,r._vscf_hybrid_key_alg_delete=t.Ar,r._vscf_hybrid_key_alg_shallow_copy=t.Br,r._vscf_simple_alg_info_alg_id=t.Cr,r._vscf_simple_alg_info_new=t.Dr,r._vscf_simple_alg_info_delete=t.Er,r._vscf_simple_alg_info_shallow_copy=t.Fr,r._vscf_simple_alg_info_new_with_alg_id=t.Gr,r._vscf_hash_based_alg_info_hash_alg_info=t.Hr,r._vscf_hash_based_alg_info_alg_id=t.Ir,r._vscf_hash_based_alg_info_new=t.Jr,r._vscf_hash_based_alg_info_delete=t.Kr,r._vscf_hash_based_alg_info_shallow_copy=t.Lr,r._vscf_cipher_alg_info_nonce=t.Mr,r._vscf_cipher_alg_info_alg_id=t.Nr,r._vscf_cipher_alg_info_new=t.Or,r._vscf_cipher_alg_info_delete=t.Pr,r._vscf_cipher_alg_info_shallow_copy=t.Qr,r._vscf_cipher_alg_info_new_with_members=t.Rr,r._vscf_salted_kdf_alg_info_hash_alg_info=t.Sr,r._vscf_salted_kdf_alg_info_salt=t.Tr,r._vscf_salted_kdf_alg_info_iteration_count=t.Ur,r._vscf_salted_kdf_alg_info_alg_id=t.Vr,r._vscf_salted_kdf_alg_info_new=t.Wr,r._vscf_salted_kdf_alg_info_delete=t.Xr,r._vscf_salted_kdf_alg_info_shallow_copy=t.Yr,r._vscf_pbe_alg_info_kdf_alg_info=t.Zr,r._vscf_pbe_alg_info_cipher_alg_info=t._r,r._vscf_pbe_alg_info_alg_id=t.$r,r._vscf_pbe_alg_info_new=t.as,r._vscf_pbe_alg_info_delete=t.bs,r._vscf_pbe_alg_info_shallow_copy=t.cs,r._vscf_ecc_alg_info_key_id=t.ds,r._vscf_ecc_alg_info_domain_id=t.es,r._vscf_ecc_alg_info_alg_id=t.fs,r._vscf_ecc_alg_info_new=t.gs,r._vscf_ecc_alg_info_delete=t.hs,r._vscf_ecc_alg_info_shallow_copy=t.is,r._vscf_ecc_alg_info_new_with_members=t.js,r._vscf_alg_info_der_serializer_setup_defaults=t.ks,r._vscf_alg_info_der_serializer_serialize_inplace=t.ls,r._vscf_alg_info_der_serializer_serialized_len=t.ms,r._vscf_alg_info_der_serializer_serialize=t.ns,r._vscf_alg_info_der_serializer_use_asn1_writer=t.os,r._vscf_alg_info_der_serializer_release_asn1_writer=t.ps,r._vscf_alg_info_der_serializer_new=t.qs,r._vscf_alg_info_der_serializer_delete=t.rs,r._vscf_alg_info_der_serializer_shallow_copy=t.ss,r._vscf_alg_info_der_deserializer_setup_defaults=t.ts,r._vscf_alg_info_der_deserializer_deserialize_inplace=t.us,r._vscf_alg_info_der_deserializer_deserialize=t.vs,r._vscf_alg_info_der_deserializer_use_asn1_reader=t.ws,r._vscf_alg_info_der_deserializer_release_asn1_reader=t.xs,r._vscf_alg_info_der_deserializer_new=t.ys,r._vscf_alg_info_der_deserializer_delete=t.zs,r._vscf_alg_info_der_deserializer_shallow_copy=t.As,r._vscf_message_info_der_serializer_setup_defaults=t.Bs,r._vscf_message_info_der_serializer_serialized_len=t.Cs,r._vscf_message_info_der_serializer_serialize=t.Ds,r._vscf_message_info_der_serializer_read_prefix=t.Es,r._vscf_message_info_der_serializer_deserialize=t.Fs,r._vscf_message_info_der_serializer_serialized_footer_len=t.Gs,r._vscf_message_info_der_serializer_serialize_footer=t.Hs,r._vscf_message_info_der_serializer_deserialize_footer=t.Is,r._vscf_message_info_der_serializer_use_asn1_reader=t.Js,r._vscf_message_info_der_serializer_release_asn1_reader=t.Ks,r._vscf_message_info_der_serializer_use_asn1_writer=t.Ls,r._vscf_message_info_der_serializer_release_asn1_writer=t.Ms,r._vscf_message_info_der_serializer_new=t.Ns,r._vscf_message_info_der_serializer_delete=t.Os,r._vscf_message_info_der_serializer_shallow_copy=t.Ps,r._vscf_random_padding_alg_id=t.Qs,r._vscf_random_padding_produce_alg_info=t.Rs,r._vscf_random_padding_restore_alg_info=t.Ss,r._vscf_random_padding_configure=t.Ts,r._vscf_random_padding_padded_data_len=t.Us,r._vscf_random_padding_len=t.Vs,r._vscf_random_padding_len_max=t.Ws,r._vscf_random_padding_start_data_processing=t.Xs,r._vscf_random_padding_process_data=t.Ys,r._vscf_random_padding_finish_data_processing=t.Zs,r._vscf_random_padding_start_padded_data_processing=t._s,r._vscf_random_padding_process_padded_data=t.$s,r._vscf_random_padding_finish_padded_data_processing_out_len=t.at,r._vscf_random_padding_finish_padded_data_processing=t.bt,r._vscf_random_padding_use_random=t.ct,r._vscf_random_padding_release_random=t.dt,r._vscf_random_padding_new=t.et,r._vscf_random_padding_delete=t.ft,r._vscf_random_padding_shallow_copy=t.gt,r._vsc_data_ctx_size=t.ht,r._vsc_data=t.it,r._vsc_data_len=t.jt,r._vsc_data_bytes=t.kt,r._vsc_buffer_new=t.lt,r._vsc_buffer_new_with_capacity=t.mt,r._vsc_buffer_delete=t.nt,r._vsc_buffer_data=t.ot,r._vsc_buffer_make_secure=t.pt,r._vsc_buffer_bytes=t.qt,r._vsc_buffer_len=t.rt,r._malloc=t.st,r._free=t.tt,pt=t.j,g(),gt}var e={a:mt};return r.instantiateWasm?new Promise(_=>{r.instantiateWasm(e,(e,r)=>{_(t(e))})}):(P??=r.locateFile?r.locateFile("libfoundation.worker.wasm",n):n+"libfoundation.worker.wasm",t((await async function(t){var e=P;if(!c)try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,t)}catch(t){x(`wasm streaming compile failed: ${t}`),x("falling back to ArrayBuffer instantiation")}return N(e,t)}(e)).instance))}(),function(){function t(){if(r.calledRun=!0,!y){var t,e;if(p=!0,!r.noFSInit&&!q)q=!0,t??=r.stdin,e??=r.stdout,_??=r.stderr,t?xt("stdin",t):ht("/dev/tty","/dev/stdin"),e?xt("stdout",null,e):ht("/dev/tty","/dev/stdout"),_?xt("stderr",null,_):ht("/dev/tty1","/dev/stderr"),Pt("/dev/stdin",0),Pt("/dev/stdout",1),Pt("/dev/stderr",1);if(gt.k(),j=!1,i?.(r),r.onRuntimeInitialized?.(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;){var _=r.postRun.shift();E.push(_)}I(E)}}if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)b();I(w),r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),t()},1)):t()}(),p?r:new Promise((t,e)=>{i=t,a=e})}t.exports=e,t.exports.default=e}(g)),g.exports}var N,I,E,w,b,k,A,C,F,T,K,S,z,L,R,B,Y,H,U,M,D,O,G,V,q,j,X,W,Z,$,Q,J,tt,et,rt,_t,st,nt,ct,it,at,ot,lt,ut,ft,dt,ht,Pt,vt,xt,yt,pt,gt,mt,Nt,It,Et,wt,bt,kt,At,Ct,Ft,Tt,Kt,St,zt,Lt,Rt,Bt,Yt,Ht,Ut,Mt,Dt,Ot,Gt,Vt,qt,jt,Xt,Wt,Zt,$t,Qt,Jt,te,ee,re,_e,se,ne,ce,ie,ae,oe,le,ue,fe,de,he,Pe,ve,xe,ye,pe,ge,me,Ne,Ie,Ee,we,be,ke,Ae,Ce,Fe,Te,Ke,Se,ze,Le,Re,Be,Ye,He,Ue,Me,De,Oe,Ge,Ve,qe,je,Xe,We,Ze,$e,Qe,Je,tr,er,rr,_r,sr,nr,cr,ir,ar,or,lr,ur,fr,dr,hr,Pr,vr,xr,yr,pr,gr,mr,Nr,Ir,Er,wr,br,kr={};function Ar(){if(N)return kr;function t(t,e){if(!("number"==typeof e||e instanceof Number))throw new TypeError(`'${t}' is not a number`);if(Number.isNaN(e))throw new TypeError(`'${t}' is NaN`);if(e===1/0)throw new TypeError(`'${t}' is Infinity`);if(e===-1/0)throw new TypeError(`'${t}' is -Infinity`)}function e(e,r){if(t(e,r),0==r)throw new TypeError(`'${e}' is NULL`)}return N=1,kr.ensureNumber=t,kr.ensureString=function(t,e){if(!("string"==typeof e||e instanceof String))throw new TypeError(`'${t}' is not a string`)},kr.ensureBoolean=function(t,e){if("boolean"!=typeof e)throw new TypeError(`'${t}' is not a boolean`)},kr.ensureByteArray=function(t,e){if(!(e instanceof Uint8Array))throw new TypeError(`'${t}' is not an Uint8Array`)},kr.ensureClass=function(t,r,_){if(!(r instanceof _))throw new TypeError(`'${t}' is not an instance of the class ${_.name}`);e(t,r.ctxPtr)},kr.ensureNotNull=e,kr.ensureImplementInterface=function(t,r,_,s,n){if(e(t,r.ctxPtr),!n.isImplemented(r.ctxPtr,s))throw new TypeError(`'${t}' does not implement interface '${_}'`)},kr}var Cr=function(){if(br)return wr;br=1;const t=m(),e=_?r:(_=1,r=(t,e)=>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})),g=n?s:(n=1,s=(t,e)=>class{static newAndTakeCContext(r){const _=t._vscf_impl_tag(r);switch(_){case e.FoundationImplTag.AES256_CBC:return e.Aes256Cbc.newAndTakeCContext(r);case e.FoundationImplTag.AES256_GCM:return e.Aes256Gcm.newAndTakeCContext(r);case e.FoundationImplTag.ALG_INFO_DER_DESERIALIZER:return e.AlgInfoDerDeserializer.newAndTakeCContext(r);case e.FoundationImplTag.ALG_INFO_DER_SERIALIZER:return e.AlgInfoDerSerializer.newAndTakeCContext(r);case e.FoundationImplTag.ASN1RD:return e.Asn1rd.newAndTakeCContext(r);case e.FoundationImplTag.ASN1WR:return e.Asn1wr.newAndTakeCContext(r);case e.FoundationImplTag.CIPHER_ALG_INFO:return e.CipherAlgInfo.newAndTakeCContext(r);case e.FoundationImplTag.COMPOUND_KEY_ALG:return e.CompoundKeyAlg.newAndTakeCContext(r);case e.FoundationImplTag.COMPOUND_KEY_ALG_INFO:return e.CompoundKeyAlgInfo.newAndTakeCContext(r);case e.FoundationImplTag.COMPOUND_PRIVATE_KEY:return e.CompoundPrivateKey.newAndTakeCContext(r);case e.FoundationImplTag.COMPOUND_PUBLIC_KEY:return e.CompoundPublicKey.newAndTakeCContext(r);case e.FoundationImplTag.CTR_DRBG:return e.CtrDrbg.newAndTakeCContext(r);case e.FoundationImplTag.CURVE25519:return e.Curve25519.newAndTakeCContext(r);case e.FoundationImplTag.ECC:return e.Ecc.newAndTakeCContext(r);case e.FoundationImplTag.ECC_ALG_INFO:return e.EccAlgInfo.newAndTakeCContext(r);case e.FoundationImplTag.ECC_PRIVATE_KEY:return e.EccPrivateKey.newAndTakeCContext(r);case e.FoundationImplTag.ECC_PUBLIC_KEY:return e.EccPublicKey.newAndTakeCContext(r);case e.FoundationImplTag.ED25519:return e.Ed25519.newAndTakeCContext(r);case e.FoundationImplTag.ENTROPY_ACCUMULATOR:return e.EntropyAccumulator.newAndTakeCContext(r);case e.FoundationImplTag.FAKE_RANDOM:return e.FakeRandom.newAndTakeCContext(r);case e.FoundationImplTag.FALCON:return e.Falcon.newAndTakeCContext(r);case e.FoundationImplTag.HASH_BASED_ALG_INFO:return e.HashBasedAlgInfo.newAndTakeCContext(r);case e.FoundationImplTag.HKDF:return e.Hkdf.newAndTakeCContext(r);case e.FoundationImplTag.HMAC:return e.Hmac.newAndTakeCContext(r);case e.FoundationImplTag.HYBRID_KEY_ALG:return e.HybridKeyAlg.newAndTakeCContext(r);case e.FoundationImplTag.HYBRID_KEY_ALG_INFO:return e.HybridKeyAlgInfo.newAndTakeCContext(r);case e.FoundationImplTag.HYBRID_PRIVATE_KEY:return e.HybridPrivateKey.newAndTakeCContext(r);case e.FoundationImplTag.HYBRID_PUBLIC_KEY:return e.HybridPublicKey.newAndTakeCContext(r);case e.FoundationImplTag.KDF1:return e.Kdf1.newAndTakeCContext(r);case e.FoundationImplTag.KDF2:return e.Kdf2.newAndTakeCContext(r);case e.FoundationImplTag.KEY_ASN1_DESERIALIZER:return e.KeyAsn1Deserializer.newAndTakeCContext(r);case e.FoundationImplTag.KEY_ASN1_SERIALIZER:return e.KeyAsn1Serializer.newAndTakeCContext(r);case e.FoundationImplTag.KEY_MATERIAL_RNG:return e.KeyMaterialRng.newAndTakeCContext(r);case e.FoundationImplTag.MESSAGE_INFO_DER_SERIALIZER:return e.MessageInfoDerSerializer.newAndTakeCContext(r);case e.FoundationImplTag.PBE_ALG_INFO:return e.PbeAlgInfo.newAndTakeCContext(r);case e.FoundationImplTag.PKCS5_PBES2:return e.Pkcs5Pbes2.newAndTakeCContext(r);case e.FoundationImplTag.PKCS5_PBKDF2:return e.Pkcs5Pbkdf2.newAndTakeCContext(r);case e.FoundationImplTag.PKCS8_SERIALIZER:return e.Pkcs8Serializer.newAndTakeCContext(r);case e.FoundationImplTag.RANDOM_PADDING:return e.RandomPadding.newAndTakeCContext(r);case e.FoundationImplTag.RAW_PRIVATE_KEY:return e.RawPrivateKey.newAndTakeCContext(r);case e.FoundationImplTag.RAW_PUBLIC_KEY:return e.RawPublicKey.newAndTakeCContext(r);case e.FoundationImplTag.ROUND5:return e.Round5.newAndTakeCContext(r);case e.FoundationImplTag.RSA:return e.Rsa.newAndTakeCContext(r);case e.FoundationImplTag.RSA_PRIVATE_KEY:return e.RsaPrivateKey.newAndTakeCContext(r);case e.FoundationImplTag.RSA_PUBLIC_KEY:return e.RsaPublicKey.newAndTakeCContext(r);case e.FoundationImplTag.SALTED_KDF_ALG_INFO:return e.SaltedKdfAlgInfo.newAndTakeCContext(r);case e.FoundationImplTag.SEC1_SERIALIZER:return e.Sec1Serializer.newAndTakeCContext(r);case e.FoundationImplTag.SEED_ENTROPY_SOURCE:return e.SeedEntropySource.newAndTakeCContext(r);case e.FoundationImplTag.SHA224:return e.Sha224.newAndTakeCContext(r);case e.FoundationImplTag.SHA256:return e.Sha256.newAndTakeCContext(r);case e.FoundationImplTag.SHA384:return e.Sha384.newAndTakeCContext(r);case e.FoundationImplTag.SHA512:return e.Sha512.newAndTakeCContext(r);case e.FoundationImplTag.SIMPLE_ALG_INFO:return e.SimpleAlgInfo.newAndTakeCContext(r);default:throw new Error("Unexpected implementation tag found: "+_)}}static newAndUseCContext(r){return new e.FoundationInterface.newAndTakeCContext(t._vscf_impl_shallow_copy(r))}static isImplemented(e,r){return 0!=t._vscf_impl_api(e,r)}}),N=i?c:(i=1,c=(t,e)=>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})),kr=o?a:(o=1,a=(t,e)=>{class r extends Error{constructor(t){super(t),this.name="FoundationError",this.message=t}static handleStatusCode(t){if(0!=t){if(-1==t)throw new r("This error should not be returned if assertions is enabled.");if(-2==t)throw new r("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==t)throw new r("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==t)throw new r("Buffer capacity is not enough to hold result.");if(-200==t)throw new r("Unsupported algorithm.");if(-201==t)throw new r("Authentication failed during decryption.");if(-202==t)throw new r("Attempt to read data out of buffer bounds.");if(-203==t)throw new r("ASN.1 encoded data is corrupted.");if(-204==t)throw new r("Attempt to read ASN.1 type that is bigger then requested C type.");if(-205==t)throw new r("ASN.1 representation of PKCS#1 public key is corrupted.");if(-206==t)throw new r("ASN.1 representation of PKCS#1 private key is corrupted.");if(-207==t)throw new r("ASN.1 representation of PKCS#8 public key is corrupted.");if(-208==t)throw new r("ASN.1 representation of PKCS#8 private key is corrupted.");if(-209==t)throw new r("Encrypted data is corrupted.");if(-210==t)throw new r("Underlying random operation returns error.");if(-211==t)throw new r("Generation of the private or secret key failed.");if(-212==t)throw new r("One of the entropy sources failed.");if(-213==t)throw new r("Requested data to be generated is too big.");if(-214==t)throw new r("Base64 encoded string contains invalid characters.");if(-215==t)throw new r("PEM data is corrupted.");if(-216==t)throw new r("Exchange key return zero.");if(-217==t)throw new r("Ed25519 public key is corrupted.");if(-218==t)throw new r("Ed25519 private key is corrupted.");if(-219==t)throw new r("CURVE25519 public key is corrupted.");if(-220==t)throw new r("CURVE25519 private key is corrupted.");if(-221==t)throw new r("Elliptic curve public key format is corrupted see RFC 5480.");if(-222==t)throw new r("Elliptic curve public key format is corrupted see RFC 5915.");if(-223==t)throw new r("ASN.1 representation of a public key is corrupted.");if(-224==t)throw new r("ASN.1 representation of a private key is corrupted.");if(-225==t)throw new r("Key algorithm does not accept given type of public key.");if(-226==t)throw new r("Key algorithm does not accept given type of private key.");if(-227==t)throw new r("Post-quantum Falcon-Sign public key is corrupted.");if(-228==t)throw new r("Post-quantum Falcon-Sign private key is corrupted.");if(-229==t)throw new r("Generic Round5 library error.");if(-230==t)throw new r("Post-quantum NIST Round5 public key is corrupted.");if(-231==t)throw new r("Post-quantum NIST Round5 private key is corrupted.");if(-232==t)throw new r("Compound public key is corrupted.");if(-233==t)throw new r("Compound private key is corrupted.");if(-234==t)throw new r("Compound public hybrid key is corrupted.");if(-235==t)throw new r("Compound private hybrid key is corrupted.");if(-236==t)throw new r("ASN.1 AlgorithmIdentifer is corrupted.");if(-237==t)throw new r("ASN.1 AlgorithmIdentifer with ECParameters is corrupted.");if(-238==t)throw new r("ASN.1 AlgorithmIdentifer with CompoundKeyParams is corrupted.");if(-239==t)throw new r("ASN.1 AlgorithmIdentifer with HybridKeyParams is corrupted.");if(-301==t)throw new r("Decryption failed, because message info was not given explicitly, and was not part of an encrypted message.");if(-302==t)throw new r("Message Info is corrupted.");if(-303==t)throw new r("Recipient defined with id is not found within message info during data decryption.");if(-304==t)throw new r("Content encryption key can not be decrypted with a given private key.");if(-305==t)throw new r("Content encryption key can not be decrypted with a given password.");if(-306==t)throw new r("Custom parameter with a given key is not found within message info.");if(-307==t)throw new r("A custom parameter with a given key is found, but the requested value type does not correspond to the actual type.");if(-308==t)throw new r("Signature format is corrupted.");if(-309==t)throw new r("Message Info footer is corrupted.");if(-401==t)throw new r("Brainkey password length is out of range.");if(-402==t)throw new r("Brainkey number length should be 32 byte.");if(-403==t)throw new r("Brainkey point length should be 65 bytes.");if(-404==t)throw new r("Brainkey name is out of range.");if(-405==t)throw new r("Brainkey internal error.");if(-406==t)throw new r("Brainkey point is invalid.");if(-407==t)throw new r("Brainkey number buffer length capacity should be >= 32 byte.");if(-408==t)throw new r("Brainkey point buffer length capacity should be >= 32 byte.");if(-409==t)throw new r("Brainkey seed buffer length capacity should be >= 32 byte.");if(-410==t)throw new r("Brainkey identity secret is invalid.");if(-411==t)throw new r("KEM encapsulated key is invalid or does not correspond to the private key.");if(-501==t)throw new r("Invalid padding.");if(-601==t)throw new r("Protobuf error.");if(-701==t)throw new r("Session id doesnt match.");if(-702==t)throw new r("Epoch not found.");if(-703==t)throw new r("Wrong key type.");if(-704==t)throw new r("Invalid signature.");if(-705==t)throw new r("Ed25519 error.");if(-706==t)throw new r("Duplicate epoch.");if(-707==t)throw new r("Plain text too long.");throw new r("Unexpected status code:"+t)}}}return r}),Cr=u?l:(u=1,l=(t,e)=>Object.freeze({BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,NULL:5,OID:6,UTF8_STRING:12,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,T61_STRING:20,IA5_STRING:22,UTC_TIME:23,GENERALIZED_TIME:24,UNIVERSAL_STRING:28,BMP_STRING:30,PRIMITIVE:0,CONSTRUCTED:32,CONTEXT_SPECIFIC:128})),Fr=d?f:(d=1,f=(t,e)=>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})),Tr=P?h:(P=1,h=(t,e)=>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})),Kr=x?v:(x=1,v=(t,e)=>Object.freeze({GROUP_INFO:1,REGULAR:2})),Sr=p?y:(p=1,y=(t,e)=>Object.freeze({INITIAL:0,ENCRYPTION:1,DECRYPTION:2})),zr=function(){if(E)return I;E=1;const t=Ar();return I=(e,r)=>class{static fromAlgId(t){e._vscf_oid_from_alg_id(t)}static toAlgId(r){t.ensureByteArray("oid",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_oid_to_alg_id(c)}finally{e._free(s),e._free(c)}}static fromId(t){e._vscf_oid_from_id(t)}static toId(r){t.ensureByteArray("oid",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_oid_to_id(c)}finally{e._free(s),e._free(c)}}static idToAlgId(t){let r;return r=e._vscf_oid_id_to_alg_id(t),r}static equal(r,_){t.ensureByteArray("lhs",r),t.ensureByteArray("rhs",_);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=_.length*_.BYTES_PER_ELEMENT,o=e._malloc(a);e.HEAP8.set(_,o);const l=e._vsc_data_ctx_size(),u=e._malloc(l);e._vsc_data(u,o,a);try{return!!e._vscf_oid_equal(i,u)}finally{e._free(n),e._free(i),e._free(o),e._free(u)}}}}(),Lr=function(){if(b)return w;b=1;const t=Ar();return w=(e,r)=>class{static encodedLen(r){let _;return t.ensureNumber("dataLen",r),_=e._vscf_base64_encoded_len(r),_}static encode(_){t.ensureByteArray("data",_);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.Base64.encodedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{e._vscf_base64_encode(i,o);const t=e._vsc_buffer_bytes(o),r=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}static decodedLen(r){let _;return t.ensureNumber("strLen",r),_=e._vscf_base64_decoded_len(r),_}static decode(_){t.ensureByteArray("str",_);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.Base64.decodedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_base64_decode(i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}}}(),Rr=function(){if(A)return k;A=1;const t=Ar();return k=(e,r)=>class{static wrappedLen(r,_){let s;return t.ensureString("title",r),t.ensureNumber("dataLen",_),s=e._vscf_pem_wrapped_len(r,_),s}static wrap(_,s){t.ensureString("title",_),t.ensureByteArray("data",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=r.Pem.wrappedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{e._vscf_pem_wrap(_,a,l);const t=e._vsc_buffer_bytes(l),r=e._vsc_buffer_len(l);return e.HEAPU8.slice(t,t+r)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}static unwrappedLen(r){let _;return t.ensureNumber("pemLen",r),_=e._vscf_pem_unwrapped_len(r),_}static unwrap(_){t.ensureByteArray("pem",_);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.Pem.unwrappedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_pem_unwrap(i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}static title(r){t.ensureByteArray("pem",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_pem_title(c)}finally{e._free(s),e._free(c)}}}}(),Br=function(){if(F)return C;F=1;const t=Ar();return C=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_delete(this.ctxPtr),this.ctxPtr=null)}dataEncryptionAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_data_encryption_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}keyRecipientInfoList(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_key_recipient_info_list(this.ctxPtr),r.KeyRecipientInfoList.newAndUseCContext(_)}passwordRecipientInfoList(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_password_recipient_info_list(this.ctxPtr),r.PasswordRecipientInfoList.newAndUseCContext(_)}hasCustomParams(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_message_info_has_custom_params(this.ctxPtr),!!r}customParams(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_custom_params(this.ctxPtr),r.MessageInfoCustomParams.newAndUseCContext(_)}hasCipherKdfAlgInfo(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_message_info_has_cipher_kdf_alg_info(this.ctxPtr),!!r}cipherKdfAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_kdf_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}hasCipherPaddingAlgInfo(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_message_info_has_cipher_padding_alg_info(this.ctxPtr),!!r}cipherPaddingAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_padding_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}hasFooterInfo(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_message_info_has_footer_info(this.ctxPtr),!!r}footerInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_info(this.ctxPtr),r.FooterInfo.newAndUseCContext(_)}clear(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_clear(this.ctxPtr)}}return _}}(),Yr=function(){if(K)return T;K=1;const t=Ar();return T=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}recipientId(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_recipient_info_recipient_id(this.ctxPtr)}keyEncryptionAlgorithm(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_key_encryption_algorithm(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}encryptedKey(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_recipient_info_encrypted_key(this.ctxPtr)}}return _}}(),Hr=function(){if(z)return S;z=1;const t=Ar();return S=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_recipient_info_list_has_item(this.ctxPtr),!!r}item(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_list_item(this.ctxPtr),r.KeyRecipientInfo.newAndUseCContext(_)}hasNext(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_recipient_info_list_has_next(this.ctxPtr),!!r}next(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_list_next(this.ctxPtr),r.Self.newAndUseCContext(_)}hasPrev(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_recipient_info_list_has_prev(this.ctxPtr),!!r}prev(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_list_prev(this.ctxPtr),r.Self.newAndUseCContext(_)}clear(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_recipient_info_list_clear(this.ctxPtr)}}return _}}(),Ur=function(){if(R)return L;R=1;const t=Ar();return L=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_password_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}keyEncryptionAlgorithm(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_key_encryption_algorithm(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}encryptedKey(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_password_recipient_info_encrypted_key(this.ctxPtr)}}return _}}(),Mr=function(){if(Y)return B;Y=1;const t=Ar();return B=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_password_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_password_recipient_info_list_has_item(this.ctxPtr),!!r}item(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_list_item(this.ctxPtr),r.PasswordRecipientInfo.newAndUseCContext(_)}hasNext(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_password_recipient_info_list_has_next(this.ctxPtr),!!r}next(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_list_next(this.ctxPtr),r.Self.newAndUseCContext(_)}hasPrev(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_password_recipient_info_list_has_prev(this.ctxPtr),!!r}prev(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_list_prev(this.ctxPtr),r.Self.newAndUseCContext(_)}clear(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_password_recipient_info_list_clear(this.ctxPtr)}}return _}}(),Dr=function(){if(U)return H;U=1;const t=Ar();return H=(e,r)=>class{static createHashFromInfo(_){let s;return t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_factory_create_hash_from_info(_.ctxPtr),r.FoundationInterface.newAndTakeCContext(s)}static createMacFromInfo(_){let s;return t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_factory_create_mac_from_info(_.ctxPtr),r.FoundationInterface.newAndTakeCContext(s)}static createKdfFromInfo(_){let s;return t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_factory_create_kdf_from_info(_.ctxPtr),r.FoundationInterface.newAndTakeCContext(s)}static createSaltedKdfFromInfo(_){let s;return t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_factory_create_salted_kdf_from_info(_.ctxPtr),r.FoundationInterface.newAndTakeCContext(s)}static createCipherFromInfo(_){let s;return t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_factory_create_cipher_from_info(_.ctxPtr),r.FoundationInterface.newAndTakeCContext(s)}static createPaddingFromInfo(_,s){let n;return t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),t.ensureImplementInterface("random",s,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),n=e._vscf_alg_factory_create_padding_from_info(_.ctxPtr,s.ctxPtr),r.FoundationInterface.newAndTakeCContext(n)}}}(),Or=function(){if(D)return M;D=1;const t=Ar();return M=(e,r)=>class{static createFromAlgId(_,s){t.ensureImplementInterface("random",s,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_key_alg_factory_create_from_alg_id(_,s.ctxPtr,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}static createFromKey(_,s){t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),t.ensureImplementInterface("random",s,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_key_alg_factory_create_from_key(_.ctxPtr,s.ctxPtr,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}static createFromRawPublicKey(_,s){t.ensureClass("publicKey",_,r.RawPublicKey),t.ensureImplementInterface("random",s,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_key_alg_factory_create_from_raw_public_key(_.ctxPtr,s.ctxPtr,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}static createFromRawPrivateKey(_,s){t.ensureClass("privateKey",_,r.RawPrivateKey),t.ensureImplementInterface("random",s,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_key_alg_factory_create_from_raw_private_key(_.ctxPtr,s.ctxPtr,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}}}(),Gr=function(){if(G)return O;G=1;const t=Ar();return O=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecies_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_ecies_release_random(this.ctxPtr),e._vscf_ecies_use_random(this.ctxPtr,_.ctxPtr)}set cipher(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("cipher",_,"Foundation.Cipher",r.FoundationInterfaceTag.CIPHER,r.FoundationInterface),e._vscf_ecies_release_cipher(this.ctxPtr),e._vscf_ecies_use_cipher(this.ctxPtr,_.ctxPtr)}set mac(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("mac",_,"Foundation.Mac",r.FoundationInterfaceTag.MAC,r.FoundationInterface),e._vscf_ecies_release_mac(this.ctxPtr),e._vscf_ecies_use_mac(this.ctxPtr,_.ctxPtr)}set kdf(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("kdf",_,"Foundation.Kdf",r.FoundationInterfaceTag.KDF,r.FoundationInterface),e._vscf_ecies_release_kdf(this.ctxPtr),e._vscf_ecies_use_kdf(this.ctxPtr,_.ctxPtr)}set ephemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("ephemeralKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),e._vscf_ecies_release_ephemeral_key(this.ctxPtr),e._vscf_ecies_use_ephemeral_key(this.ctxPtr,_.ctxPtr)}setKeyAlg(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("keyAlg",_,"Foundation.KeyAlg",r.FoundationInterfaceTag.KEY_ALG,r.FoundationInterface),e._vscf_ecies_set_key_alg(this.ctxPtr,_.ctxPtr)}releaseKeyAlg(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ecies_release_key_alg(this.ctxPtr)}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ecies_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}setupDefaultsNoRandom(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ecies_setup_defaults_no_random(this.ctxPtr)}encryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ecies_encrypted_len(this.ctxPtr,_.ctxPtr,s),n}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("data",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.encryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ecies_encrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}decryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ecies_decrypted_len(this.ctxPtr,_.ctxPtr,s),n}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("data",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.decryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ecies_decrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}}return _}}(),Vr=function(){if(q)return V;q=1;const t=Ar();return V=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_recipient_cipher_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_recipient_cipher_release_random(this.ctxPtr),e._vscf_recipient_cipher_use_random(this.ctxPtr,_.ctxPtr)}set encryptionCipher(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("encryptionCipher",_,"Foundation.Cipher",r.FoundationInterfaceTag.CIPHER,r.FoundationInterface),e._vscf_recipient_cipher_release_encryption_cipher(this.ctxPtr),e._vscf_recipient_cipher_use_encryption_cipher(this.ctxPtr,_.ctxPtr)}set encryptionPadding(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("encryptionPadding",_,"Foundation.Padding",r.FoundationInterfaceTag.PADDING,r.FoundationInterface),e._vscf_recipient_cipher_release_encryption_padding(this.ctxPtr),e._vscf_recipient_cipher_use_encryption_padding(this.ctxPtr,_.ctxPtr)}set paddingParams(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("paddingParams",_,r.PaddingParams),e._vscf_recipient_cipher_release_padding_params(this.ctxPtr),e._vscf_recipient_cipher_use_padding_params(this.ctxPtr,_.ctxPtr)}set signerHash(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("signerHash",_,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),e._vscf_recipient_cipher_release_signer_hash(this.ctxPtr),e._vscf_recipient_cipher_use_signer_hash(this.ctxPtr,_.ctxPtr)}hasKeyRecipient(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("recipientId",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{return!!e._vscf_recipient_cipher_has_key_recipient(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}addKeyRecipient(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("recipientId",_),t.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);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);try{e._vscf_recipient_cipher_add_key_recipient(this.ctxPtr,a,s.ctxPtr)}finally{e._free(c),e._free(a)}}clearRecipients(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_recipients(this.ctxPtr)}addSigner(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("signerId",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);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);try{const t=e._vscf_recipient_cipher_add_signer(this.ctxPtr,a,s.ctxPtr);r.FoundationError.handleStatusCode(t)}finally{e._free(c),e._free(a)}}clearSigners(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_signers(this.ctxPtr)}customParams(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_custom_params(this.ctxPtr),r.MessageInfoCustomParams.newAndUseCContext(_)}startEncryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_recipient_cipher_start_encryption(this.ctxPtr);r.FoundationError.handleStatusCode(_)}startSignedEncryption(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataSize",_);const s=e._vscf_recipient_cipher_start_signed_encryption(this.ctxPtr,_);r.FoundationError.handleStatusCode(s)}messageInfoLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_recipient_cipher_message_info_len(this.ctxPtr),r}packMessageInfo(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.messageInfoLen(),_=e._vsc_buffer_new_with_capacity(r);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(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_recipient_cipher_encryption_out_len(this.ctxPtr,r),_}processEncryption(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.encryptionOutLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_recipient_cipher_process_encryption(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}finishEncryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.encryptionOutLen(0),s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_recipient_cipher_finish_encryption(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}startDecryptionWithKey(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("recipientId",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("messageInfo",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=n.length*n.BYTES_PER_ELEMENT,u=e._malloc(l);e.HEAP8.set(n,u);const f=e._vsc_data_ctx_size(),d=e._malloc(f);e._vsc_data(d,u,l);try{const t=e._vscf_recipient_cipher_start_decryption_with_key(this.ctxPtr,o,s.ctxPtr,d);r.FoundationError.handleStatusCode(t)}finally{e._free(i),e._free(o),e._free(u),e._free(d)}}startVerifiedDecryptionWithKey(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("recipientId",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("messageInfo",n),t.ensureByteArray("messageInfoFooter",c);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 u=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);const P=c.length*c.BYTES_PER_ELEMENT,v=e._malloc(P);e.HEAP8.set(c,v);const x=e._vsc_data_ctx_size(),y=e._malloc(x);e._vsc_data(y,v,P);try{const t=e._vscf_recipient_cipher_start_verified_decryption_with_key(this.ctxPtr,l,s.ctxPtr,h,y);r.FoundationError.handleStatusCode(t)}finally{e._free(a),e._free(l),e._free(f),e._free(h),e._free(v),e._free(y)}}decryptionOutLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_recipient_cipher_decryption_out_len(this.ctxPtr,r),_}processDecryption(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.decryptionOutLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_recipient_cipher_process_decryption(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}finishDecryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.decryptionOutLen(0),s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_recipient_cipher_finish_decryption(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}isDataSigned(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_recipient_cipher_is_data_signed(this.ctxPtr),!!r}signerInfos(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_signer_infos(this.ctxPtr),r.SignerInfoList.newAndUseCContext(_)}verifySignerInfo(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("signerInfo",_,r.SignerInfo),t.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),n=e._vscf_recipient_cipher_verify_signer_info(this.ctxPtr,_.ctxPtr,s.ctxPtr),!!n}messageInfoFooterLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_recipient_cipher_message_info_footer_len(this.ctxPtr),r}packMessageInfoFooter(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.messageInfoFooterLen(),s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_recipient_cipher_pack_message_info_footer(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}}return _}}(),qr=function(){if(X)return j;X=1;const t=Ar();return j=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_custom_params_delete(this.ctxPtr),this.ctxPtr=null)}static get OF_INT_TYPE(){return 1}get OF_INT_TYPE(){return 1}static get OF_STRING_TYPE(){return 2}get OF_STRING_TYPE(){return 2}static get OF_DATA_TYPE(){return 3}get OF_DATA_TYPE(){return 3}addInt(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",r),t.ensureNumber("value",_);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);try{e._vscf_message_info_custom_params_add_int(this.ctxPtr,i,_)}finally{e._free(n),e._free(i)}}addString(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",r),t.ensureByteArray("value",_);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=_.length*_.BYTES_PER_ELEMENT,o=e._malloc(a);e.HEAP8.set(_,o);const l=e._vsc_data_ctx_size(),u=e._malloc(l);e._vsc_data(u,o,a);try{e._vscf_message_info_custom_params_add_string(this.ctxPtr,i,u)}finally{e._free(n),e._free(i),e._free(o),e._free(u)}}addData(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",r),t.ensureByteArray("value",_);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=_.length*_.BYTES_PER_ELEMENT,o=e._malloc(a);e.HEAP8.set(_,o);const l=e._vsc_data_ctx_size(),u=e._malloc(l);e._vsc_data(u,o,a);try{e._vscf_message_info_custom_params_add_data(this.ctxPtr,i,u)}finally{e._free(n),e._free(i),e._free(o),e._free(u)}}clear(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_custom_params_clear(this.ctxPtr)}findInt(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",_);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_message_info_custom_params_find_int(this.ctxPtr,i,o);const t=e._vscf_error_status(o);r.FoundationError.handleStatusCode(t)}finally{e._free(n),e._free(i),e._free(o)}}findString(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",_);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_message_info_custom_params_find_string(this.ctxPtr,i,o);const t=e._vscf_error_status(o);r.FoundationError.handleStatusCode(t)}finally{e._free(n),e._free(i),e._free(o)}}findData(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",_);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_message_info_custom_params_find_data(this.ctxPtr,i,o);const t=e._vscf_error_status(o);r.FoundationError.handleStatusCode(t)}finally{e._free(n),e._free(i),e._free(o)}}hasParams(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_message_info_custom_params_has_params(this.ctxPtr),!!r}}return _}}(),jr=function(){if(Z)return W;Z=1;const t=Ar();return W=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_provider_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_key_provider_release_random(this.ctxPtr),e._vscf_key_provider_use_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_provider_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}setRsaParams(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("bitlen",r),e._vscf_key_provider_set_rsa_params(this.ctxPtr,r)}generatePrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);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_private_key(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}generatePostQuantumPrivateKey(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_key_provider_generate_post_quantum_private_key(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}generateCompoundPrivateKey(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_key_provider_generate_compound_private_key(this.ctxPtr,_,s,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}generateHybridPrivateKey(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_key_provider_generate_hybrid_private_key(this.ctxPtr,_,s,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}generateCompoundHybridPrivateKey(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const i=e._vscf_error_ctx_size(),a=e._malloc(i);let o;e._vscf_error_reset(a);try{o=e._vscf_key_provider_generate_compound_hybrid_private_key(this.ctxPtr,_,s,n,c,a);const t=e._vscf_error_status(a);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(o)}finally{e._free(a)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("keyData",_);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_key_provider_import_private_key(this.ctxPtr,i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("keyData",_);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_key_provider_import_public_key(this.ctxPtr,i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}exportedPublicKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_key_provider_exported_public_key_len(this.ctxPtr,_.ctxPtr),s}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=this.exportedPublicKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_key_provider_export_public_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}exportedPrivateKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_key_provider_exported_private_key_len(this.ctxPtr,_.ctxPtr),s}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=this.exportedPrivateKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_key_provider_export_private_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}}return _}}(),Xr=function(){if(Q)return $;Q=1;const t=Ar();return $=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("hash",_,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),e._vscf_signer_release_hash(this.ctxPtr),e._vscf_signer_use_hash(this.ctxPtr,_.ctxPtr)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_signer_release_random(this.ctxPtr),e._vscf_signer_use_random(this.ctxPtr,_.ctxPtr)}reset(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_reset(this.ctxPtr)}appendData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_signer_append_data(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}signatureLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_signer_signature_len(this.ctxPtr,_.ctxPtr),s}sign(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=this.signatureLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_signer_sign(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}}return _}}(),Wr=function(){if(tt)return J;tt=1;const t=Ar();return J=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_verifier_delete(this.ctxPtr),this.ctxPtr=null)}reset(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("signature",_);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 t=e._vscf_verifier_reset(this.ctxPtr,i);r.FoundationError.handleStatusCode(t)}finally{e._free(n),e._free(i)}}appendData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_verifier_append_data(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}verify(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_verifier_verify(this.ctxPtr,_.ctxPtr),!!s}}return _}}(),Zr=function(){if(rt)return et;rt=1;const t=Ar();return et=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_brainkey_client_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_brainkey_client_release_random(this.ctxPtr),e._vscf_brainkey_client_use_random(this.ctxPtr,_.ctxPtr)}set operationRandom(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("operationRandom",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_brainkey_client_release_operation_random(this.ctxPtr),e._vscf_brainkey_client_use_operation_random(this.ctxPtr,_.ctxPtr)}static get POINT_LEN(){return 65}get POINT_LEN(){return 65}static get MPI_LEN(){return 32}get MPI_LEN(){return 32}static get SEED_LEN(){return 32}get SEED_LEN(){return 32}static get MAX_PASSWORD_LEN(){return 128}get MAX_PASSWORD_LEN(){return 128}static get MAX_KEY_NAME_LEN(){return 128}get MAX_KEY_NAME_LEN(){return 128}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_client_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}blind(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("password",_);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.MPI_LEN,o=e._vsc_buffer_new_with_capacity(a),l=this.POINT_LEN,u=e._vsc_buffer_new_with_capacity(l);try{const t=e._vscf_brainkey_client_blind(this.ctxPtr,i,o,u);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o),n=e.HEAPU8.slice(_,_+s),c=e._vsc_buffer_bytes(u),a=e._vsc_buffer_len(u);return{deblindFactor:n,blindedPoint:e.HEAPU8.slice(c,c+a)}}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o),e._vsc_buffer_delete(u)}}deblind(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("password",_),t.ensureByteArray("hardenedPoint",s),t.ensureByteArray("deblindFactor",n),t.ensureByteArray("keyName",c);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 u=s.length*s.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(s,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);const P=n.length*n.BYTES_PER_ELEMENT,v=e._malloc(P);e.HEAP8.set(n,v);const x=e._vsc_data_ctx_size(),y=e._malloc(x);e._vsc_data(y,v,P);const p=c.length*c.BYTES_PER_ELEMENT,g=e._malloc(p);e.HEAP8.set(c,g);const m=e._vsc_data_ctx_size(),N=e._malloc(m);e._vsc_data(N,g,p);const I=this.POINT_LEN,E=e._vsc_buffer_new_with_capacity(I);try{const t=e._vscf_brainkey_client_deblind(this.ctxPtr,l,h,y,N,E);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(E),s=e._vsc_buffer_len(E);return e.HEAPU8.slice(_,_+s)}finally{e._free(a),e._free(l),e._free(f),e._free(h),e._free(v),e._free(y),e._free(g),e._free(N),e._vsc_buffer_delete(E)}}}return _}}(),$r=function(){if(st)return _t;st=1;const t=Ar();return _t=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_brainkey_server_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_brainkey_server_release_random(this.ctxPtr),e._vscf_brainkey_server_use_random(this.ctxPtr,_.ctxPtr)}set operationRandom(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("operationRandom",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_brainkey_server_release_operation_random(this.ctxPtr),e._vscf_brainkey_server_use_operation_random(this.ctxPtr,_.ctxPtr)}static get POINT_LEN(){return 65}get POINT_LEN(){return 65}static get MPI_LEN(){return 32}get MPI_LEN(){return 32}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_server_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}generateIdentitySecret(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.MPI_LEN,s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_brainkey_server_generate_identity_secret(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}harden(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("identitySecret",_),t.ensureByteArray("blindedPoint",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 u=e._vsc_data_ctx_size(),f=e._malloc(u);e._vsc_data(f,l,o);const d=this.POINT_LEN,h=e._vsc_buffer_new_with_capacity(d);try{const t=e._vscf_brainkey_server_harden(this.ctxPtr,a,f,h);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(h),s=e._vsc_buffer_len(h);return e.HEAPU8.slice(_,_+s)}finally{e._free(c),e._free(a),e._free(l),e._free(f),e._vsc_buffer_delete(h)}}}return _}}(),Qr=function(){if(ct)return nt;ct=1;const t=Ar();return nt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_message_delete(this.ctxPtr),this.ctxPtr=null)}static get MAX_MESSAGE_LEN(){return 30188}get MAX_MESSAGE_LEN(){return 30188}static get MESSAGE_VERSION(){return 1}get MESSAGE_VERSION(){return 1}getType(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_group_session_message_get_type(this.ctxPtr),r}getSessionId(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_group_session_message_get_session_id(this.ctxPtr)}getEpoch(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_group_session_message_get_epoch(this.ctxPtr),r}serializeLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_group_session_message_serialize_len(this.ctxPtr),r}serialize(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.serializeLen(),_=e._vsc_buffer_new_with_capacity(r);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(_){t.ensureByteArray("input",_);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_message_deserialize(i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.Self.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}deserialize(t){return _.deserialize(t)}}return _}}(),Jr=function(){if(at)return it;at=1;const t=Ar();return it=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_ticket_delete(this.ctxPtr),this.ctxPtr=null)}set rng(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("rng",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_group_session_ticket_release_rng(this.ctxPtr),e._vscf_group_session_ticket_use_rng(this.ctxPtr,_.ctxPtr)}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_ticket_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}setupTicketAsNew(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("sessionId",_);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 t=e._vscf_group_session_ticket_setup_ticket_as_new(this.ctxPtr,i);r.FoundationError.handleStatusCode(t)}finally{e._free(n),e._free(i)}}getTicketMessage(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_group_session_ticket_get_ticket_message(this.ctxPtr),r.GroupSessionMessage.newAndUseCContext(_)}}return _}}(),t_=function(){if(lt)return ot;lt=1;const t=Ar();return ot=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_delete(this.ctxPtr),this.ctxPtr=null)}set rng(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("rng",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_group_session_release_rng(this.ctxPtr),e._vscf_group_session_use_rng(this.ctxPtr,_.ctxPtr)}static get SENDER_ID_LEN(){return 32}get SENDER_ID_LEN(){return 32}static get MAX_PLAIN_TEXT_LEN(){return 3e4}get MAX_PLAIN_TEXT_LEN(){return 3e4}static get MAX_EPOCHS_COUNT(){return 50}get MAX_EPOCHS_COUNT(){return 50}static get SALT_SIZE(){return 32}get SALT_SIZE(){return 32}getCurrentEpoch(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_group_session_get_current_epoch(this.ctxPtr),r}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}getSessionId(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_group_session_get_session_id(this.ctxPtr)}addEpoch(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("message",_,r.GroupSessionMessage);const s=e._vscf_group_session_add_epoch(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("plainText",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);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=e._vscf_error_ctx_size(),l=e._malloc(o);let u;e._vscf_error_reset(l);try{u=e._vscf_group_session_encrypt(this.ctxPtr,a,s.ctxPtr,l);const t=e._vscf_error_status(l);return r.FoundationError.handleStatusCode(t),r.GroupSessionMessage.newAndTakeCContext(u)}finally{e._free(c),e._free(a),e._free(l)}}decryptLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("message",_,r.GroupSessionMessage),s=e._vscf_group_session_decrypt_len(this.ctxPtr,_.ctxPtr),s}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("message",_,r.GroupSessionMessage),t.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const n=this.decryptLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const t=e._vscf_group_session_decrypt(this.ctxPtr,_.ctxPtr,s.ctxPtr,c);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(c),i=e._vsc_buffer_len(c);return e.HEAPU8.slice(n,n+i)}finally{e._vsc_buffer_delete(c)}}createGroupTicket(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_group_session_create_group_ticket(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.GroupSessionTicket.newAndTakeCContext(n)}finally{e._free(s)}}}return _}}(),e_=function(){if(ft)return ut;ft=1;const t=Ar();return ut=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_editor_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_message_info_editor_release_random(this.ctxPtr),e._vscf_message_info_editor_use_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_message_info_editor_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}unpack(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("messageInfoData",_);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 t=e._vscf_message_info_editor_unpack(this.ctxPtr,i);r.FoundationError.handleStatusCode(t)}finally{e._free(n),e._free(i)}}unlock(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("ownerRecipientId",_),t.ensureImplementInterface("ownerPrivateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);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);try{const t=e._vscf_message_info_editor_unlock(this.ctxPtr,a,s.ctxPtr);r.FoundationError.handleStatusCode(t)}finally{e._free(c),e._free(a)}}addKeyRecipient(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("recipientId",_),t.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);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);try{const t=e._vscf_message_info_editor_add_key_recipient(this.ctxPtr,a,s.ctxPtr);r.FoundationError.handleStatusCode(t)}finally{e._free(c),e._free(a)}}removeKeyRecipient(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("recipientId",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{return!!e._vscf_message_info_editor_remove_key_recipient(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}removeAll(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_editor_remove_all(this.ctxPtr)}packedLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_message_info_editor_packed_len(this.ctxPtr),r}pack(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.packedLen(),_=e._vsc_buffer_new_with_capacity(r);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 _}}(),r_=function(){if(ht)return dt;ht=1;const t=Ar();return dt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_info_delete(this.ctxPtr),this.ctxPtr=null)}signerId(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_info_signer_id(this.ctxPtr)}signerAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_signer_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}signature(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_info_signature(this.ctxPtr)}}return _}}(),__=function(){if(vt)return Pt;vt=1;const t=Ar();return Pt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_signer_info_list_has_item(this.ctxPtr),!!r}item(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_list_item(this.ctxPtr),r.SignerInfo.newAndUseCContext(_)}hasNext(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_signer_info_list_has_next(this.ctxPtr),!!r}next(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_list_next(this.ctxPtr),r.Self.newAndUseCContext(_)}hasPrev(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_signer_info_list_has_prev(this.ctxPtr),!!r}prev(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_list_prev(this.ctxPtr),r.Self.newAndUseCContext(_)}clear(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_info_list_clear(this.ctxPtr)}}return _}}(),s_=function(){if(yt)return xt;yt=1;const t=Ar();return xt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_footer_delete(this.ctxPtr),this.ctxPtr=null)}hasSignerInfos(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_message_info_footer_has_signer_infos(this.ctxPtr),!!r}signerInfos(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_infos(this.ctxPtr),r.SignerInfoList.newAndUseCContext(_)}signerHashAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_hash_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}signerDigest(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_footer_signer_digest(this.ctxPtr)}}return _}}(),n_=function(){if(gt)return pt;gt=1;const t=Ar();return pt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signed_data_info_delete(this.ctxPtr),this.ctxPtr=null)}hashAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signed_data_info_hash_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),c_=function(){if(Nt)return mt;Nt=1;const t=Ar();return mt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_footer_info_delete(this.ctxPtr),this.ctxPtr=null)}hasSignedDataInfo(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_footer_info_has_signed_data_info(this.ctxPtr),!!r}signedDataInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_footer_info_signed_data_info(this.ctxPtr),r.SignedDataInfo.newAndUseCContext(_)}setDataSize(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataSize",r),e._vscf_footer_info_set_data_size(this.ctxPtr,r)}dataSize(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_footer_info_data_size(this.ctxPtr),r}}return _}}(),i_=function(){if(Et)return It;Et=1;const t=Ar();return It=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_info_delete(this.ctxPtr),this.ctxPtr=null)}isCompound(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_compound(this.ctxPtr),!!r}isHybrid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_hybrid(this.ctxPtr),!!r}isCompoundHybrid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_compound_hybrid(this.ctxPtr),!!r}isCompoundHybridCipher(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_compound_hybrid_cipher(this.ctxPtr),!!r}isCompoundHybridSigner(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_compound_hybrid_signer(this.ctxPtr),!!r}isHybridPostQuantum(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_hybrid_post_quantum(this.ctxPtr),!!r}isHybridPostQuantumCipher(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_hybrid_post_quantum_cipher(this.ctxPtr),!!r}isHybridPostQuantumSigner(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_is_hybrid_post_quantum_signer(this.ctxPtr),!!r}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_alg_id(this.ctxPtr),r}compoundCipherAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_compound_cipher_alg_id(this.ctxPtr),r}compoundSignerAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_compound_signer_alg_id(this.ctxPtr),r}hybridFirstKeyAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_hybrid_first_key_alg_id(this.ctxPtr),r}hybridSecondKeyAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_hybrid_second_key_alg_id(this.ctxPtr),r}compoundHybridCipherFirstKeyAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_compound_hybrid_cipher_first_key_alg_id(this.ctxPtr),r}compoundHybridCipherSecondKeyAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_compound_hybrid_cipher_second_key_alg_id(this.ctxPtr),r}compoundHybridSignerFirstKeyAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_compound_hybrid_signer_first_key_alg_id(this.ctxPtr),r}compoundHybridSignerSecondKeyAlgId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_key_info_compound_hybrid_signer_second_key_alg_id(this.ctxPtr),r}}return _}}(),a_=function(){if(bt)return wt;bt=1;const t=Ar();return wt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_padding_params_delete(this.ctxPtr),this.ctxPtr=null)}static get DEFAULT_FRAME_MIN(){return 32}get DEFAULT_FRAME_MIN(){return 32}static get DEFAULT_FRAME(){return 160}get DEFAULT_FRAME(){return 160}static get DEFAULT_FRAME_MAX(){return 256}get DEFAULT_FRAME_MAX(){return 256}frame(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_padding_params_frame(this.ctxPtr),r}frameMax(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_padding_params_frame_max(this.ctxPtr),r}}return _}}(),o_=function(){if(At)return kt;At=1;const t=Ar();return kt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha224_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 28}get DIGEST_LEN(){return 28}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return 64}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_sha224_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha224_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_sha224_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}static hash(r){t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);const i=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_sha224_hash(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)}}hash(t){return _.hash(t)}start(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha224_start(this.ctxPtr)}update(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_sha224_update(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}finish(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(r);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 _}}(),l_=function(){if(Ft)return Ct;Ft=1;const t=Ar();return Ct=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha256_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 32}get DIGEST_LEN(){return 32}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return 64}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_sha256_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha256_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_sha256_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}static hash(r){t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);const i=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_sha256_hash(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)}}hash(t){return _.hash(t)}start(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha256_start(this.ctxPtr)}update(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_sha256_update(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}finish(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(r);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 _}}(),u_=function(){if(Kt)return Tt;Kt=1;const t=Ar();return Tt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha384_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 48}get DIGEST_LEN(){return 48}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return 128}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_sha384_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha384_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_sha384_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}static hash(r){t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);const i=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_sha384_hash(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)}}hash(t){return _.hash(t)}start(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha384_start(this.ctxPtr)}update(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_sha384_update(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}finish(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(r);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 _}}(),f_=function(){if(zt)return St;zt=1;const t=Ar();return St=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha512_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 64}get DIGEST_LEN(){return 64}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return 128}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_sha512_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha512_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_sha512_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}static hash(r){t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);const i=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_sha512_hash(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)}}hash(t){return _.hash(t)}start(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha512_start(this.ctxPtr)}update(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_sha512_update(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}finish(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(r);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 _}}(),d_=function(){if(Rt)return Lt;Rt=1;const t=Ar();return Lt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_aes256_gcm_delete(this.ctxPtr),this.ctxPtr=null)}static get NONCE_LEN(){return 12}get NONCE_LEN(){return 12}static get KEY_LEN(){return 32}get KEY_LEN(){return 32}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return 256}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return 16}static get AUTH_TAG_LEN(){return 16}get AUTH_TAG_LEN(){return 16}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_aes256_gcm_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_gcm_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_aes256_gcm_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}encrypt(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.encryptedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_aes256_gcm_encrypt(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}encryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_encrypted_len(this.ctxPtr,r),_}preciseEncryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_precise_encrypted_len(this.ctxPtr,r),_}decrypt(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.decryptedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_aes256_gcm_decrypt(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}decryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_decrypted_len(this.ctxPtr,r),_}setNonce(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("nonce",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_aes256_gcm_set_nonce(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}setKey(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_aes256_gcm_set_key(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}startEncryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_encryption(this.ctxPtr)}startDecryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_decryption(this.ctxPtr)}update(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);const i=this.outLen(r.length),a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_aes256_gcm_update(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)}}outLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_out_len(this.ctxPtr,r),_}encryptedOutLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_encrypted_out_len(this.ctxPtr,r),_}decryptedOutLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_decrypted_out_len(this.ctxPtr,r),_}finish(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_aes256_gcm_finish(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}authEncrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_),t.ensureByteArray("authData",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 u=e._vsc_data_ctx_size(),f=e._malloc(u);e._vsc_data(f,l,o);const d=this.authEncryptedLen(_.length),h=e._vsc_buffer_new_with_capacity(d),P=this.AUTH_TAG_LEN,v=e._vsc_buffer_new_with_capacity(P);try{const t=e._vscf_aes256_gcm_auth_encrypt(this.ctxPtr,a,f,h,v);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(h),s=e._vsc_buffer_len(h),n=e.HEAPU8.slice(_,_+s),c=e._vsc_buffer_bytes(v),i=e._vsc_buffer_len(v);return{out:n,tag:e.HEAPU8.slice(c,c+i)}}finally{e._free(c),e._free(a),e._free(l),e._free(f),e._vsc_buffer_delete(h),e._vsc_buffer_delete(v)}}authEncryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_auth_encrypted_len(this.ctxPtr,r),_}authDecrypt(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_),t.ensureByteArray("authData",s),t.ensureByteArray("tag",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,u=e._malloc(l);e.HEAP8.set(s,u);const f=e._vsc_data_ctx_size(),d=e._malloc(f);e._vsc_data(d,u,l);const h=n.length*n.BYTES_PER_ELEMENT,P=e._malloc(h);e.HEAP8.set(n,P);const v=e._vsc_data_ctx_size(),x=e._malloc(v);e._vsc_data(x,P,h);const y=this.authDecryptedLen(_.length),p=e._vsc_buffer_new_with_capacity(y);try{const t=e._vscf_aes256_gcm_auth_decrypt(this.ctxPtr,o,d,x,p);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(p),s=e._vsc_buffer_len(p);return e.HEAPU8.slice(_,_+s)}finally{e._free(i),e._free(o),e._free(u),e._free(d),e._free(P),e._free(x),e._vsc_buffer_delete(p)}}authDecryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_gcm_auth_decrypted_len(this.ctxPtr,r),_}setAuthData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("authData",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_aes256_gcm_set_auth_data(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}finishAuthEncryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),s=e._vsc_buffer_new_with_capacity(_),n=this.AUTH_TAG_LEN,c=e._vsc_buffer_new_with_capacity(n);try{const t=e._vscf_aes256_gcm_finish_auth_encryption(this.ctxPtr,s,c);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s),i=e.HEAPU8.slice(_,_+n),a=e._vsc_buffer_bytes(c),o=e._vsc_buffer_len(c);return{out:i,tag:e.HEAPU8.slice(a,a+o)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}finishAuthDecryption(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("tag",_);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.outLen(0),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_aes256_gcm_finish_auth_decryption(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}}return _}}(),h_=function(){if(Yt)return Bt;Yt=1;const t=Ar();return Bt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_aes256_cbc_delete(this.ctxPtr),this.ctxPtr=null)}static get NONCE_LEN(){return 16}get NONCE_LEN(){return 16}static get KEY_LEN(){return 32}get KEY_LEN(){return 32}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return 256}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return 16}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_aes256_cbc_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_cbc_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_aes256_cbc_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}encrypt(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.encryptedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_aes256_cbc_encrypt(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}encryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_cbc_encrypted_len(this.ctxPtr,r),_}preciseEncryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_cbc_precise_encrypted_len(this.ctxPtr,r),_}decrypt(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.decryptedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_aes256_cbc_decrypt(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}decryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_cbc_decrypted_len(this.ctxPtr,r),_}setNonce(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("nonce",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_aes256_cbc_set_nonce(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}setKey(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_aes256_cbc_set_key(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}startEncryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_encryption(this.ctxPtr)}startDecryption(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_decryption(this.ctxPtr)}update(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);const i=this.outLen(r.length),a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_aes256_cbc_update(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)}}outLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_cbc_out_len(this.ctxPtr,r),_}encryptedOutLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_cbc_encrypted_out_len(this.ctxPtr,r),_}decryptedOutLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_aes256_cbc_decrypted_out_len(this.ctxPtr,r),_}finish(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_aes256_cbc_finish(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}}return _}}(),P_=function(){if(Ut)return Ht;Ut=1;const t=Ar();return Ht=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_asn1rd_delete(this.ctxPtr),this.ctxPtr=null)}reset(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_asn1rd_reset(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}leftLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_left_len(this.ctxPtr),r}hasError(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_has_error(this.ctxPtr),!!r}status(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1rd_status(this.ctxPtr);r.FoundationError.handleStatusCode(_)}getTag(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_get_tag(this.ctxPtr),r}getLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_get_len(this.ctxPtr),r}getDataLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_get_data_len(this.ctxPtr),r}readTag(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("tag",r),_=e._vscf_asn1rd_read_tag(this.ctxPtr,r),_}readContextTag(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("tag",r),_=e._vscf_asn1rd_read_context_tag(this.ctxPtr,r),_}readInt(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_int(this.ctxPtr),r}readInt8(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_int8(this.ctxPtr),r}readInt16(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_int16(this.ctxPtr),r}readInt32(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_int32(this.ctxPtr),r}readInt64(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_int64(this.ctxPtr),r}readUint(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_uint(this.ctxPtr),r}readUint8(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_uint8(this.ctxPtr),r}readUint16(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_uint16(this.ctxPtr),r}readUint32(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_uint32(this.ctxPtr),r}readUint64(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_uint64(this.ctxPtr),r}readBool(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_bool(this.ctxPtr),!!r}readNull(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null(this.ctxPtr)}readNullOptional(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null_optional(this.ctxPtr)}readOctetStr(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_octet_str(this.ctxPtr)}readBitstringAsOctetStr(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_bitstring_as_octet_str(this.ctxPtr)}readUtf8Str(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_utf8_str(this.ctxPtr)}readOid(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_oid(this.ctxPtr)}readData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",r),e._vscf_asn1rd_read_data(this.ctxPtr,r)}readSequence(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_sequence(this.ctxPtr),r}readSet(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1rd_read_set(this.ctxPtr),r}mbedtlsHasError(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("code",r),_=e._vscf_asn1rd_mbedtls_has_error(this.ctxPtr,r),!!_}readTagData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("tag",r),e._vscf_asn1rd_read_tag_data(this.ctxPtr,r)}}return _}}(),v_=function(){if(Dt)return Mt;Dt=1;const t=Ar();return Mt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_asn1wr_delete(this.ctxPtr),this.ctxPtr=null)}reset(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("outLen",_),e._vscf_asn1wr_reset(this.ctxPtr,r,_)}finish(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureBoolean("doNotAdjust",r),_=e._vscf_asn1wr_finish(this.ctxPtr,r),_}bytes(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1wr_bytes(this.ctxPtr),r}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1wr_len(this.ctxPtr),r}writtenLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1wr_written_len(this.ctxPtr),r}unwrittenLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1wr_unwritten_len(this.ctxPtr),r}hasError(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1wr_has_error(this.ctxPtr),!!r}status(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1wr_status(this.ctxPtr);r.FoundationError.handleStatusCode(_)}reserve(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",r),_=e._vscf_asn1wr_reserve(this.ctxPtr,r),_}writeTag(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("tag",r),_=e._vscf_asn1wr_write_tag(this.ctxPtr,r),_}writeContextTag(r,_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("tag",r),t.ensureNumber("len",_),s=e._vscf_asn1wr_write_context_tag(this.ctxPtr,r,_),s}writeLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",r),_=e._vscf_asn1wr_write_len(this.ctxPtr,r),_}writeInt(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_int(this.ctxPtr,r),_}writeInt8(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_int8(this.ctxPtr,r),_}writeInt16(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_int16(this.ctxPtr,r),_}writeInt32(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_int32(this.ctxPtr,r),_}writeInt64(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_int64(this.ctxPtr,r),_}writeUint(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_uint(this.ctxPtr,r),_}writeUint8(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_uint8(this.ctxPtr,r),_}writeUint16(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_uint16(this.ctxPtr,r),_}writeUint32(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_uint32(this.ctxPtr,r),_}writeUint64(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("value",r),_=e._vscf_asn1wr_write_uint64(this.ctxPtr,r),_}writeBool(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureBoolean("value",r),_=e._vscf_asn1wr_write_bool(this.ctxPtr,r),_}writeNull(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_asn1wr_write_null(this.ctxPtr),r}writeOctetStr(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("value",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_asn1wr_write_octet_str(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}writeOctetStrAsBitstring(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("value",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_asn1wr_write_octet_str_as_bitstring(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}writeData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_asn1wr_write_data(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}writeUtf8Str(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("value",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_asn1wr_write_utf8_str(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}writeOid(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("value",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_asn1wr_write_oid(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}writeSequence(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",r),_=e._vscf_asn1wr_write_sequence(this.ctxPtr,r),_}writeSet(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",r),_=e._vscf_asn1wr_write_set(this.ctxPtr,r),_}mbedtlsHasError(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("code",r),_=e._vscf_asn1wr_mbedtls_has_error(this.ctxPtr,r),!!_}writeTagData(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r),t.ensureNumber("tag",_);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{a=e._vscf_asn1wr_write_tag_data(this.ctxPtr,i,_)}finally{e._free(n),e._free(i)}}static getCurrentElementLen(t,r){let _;return _=e._vscf_asn1wr_get_current_element_len(t,r),_}getCurrentElementLen(t,e){return _.getCurrentElementLen(t,e)}static swapElementsOfSet(r,_,s,n){t.ensureNumber("toLen",_),t.ensureNumber("fromLen",n),e._vscf_asn1wr_swap_elements_of_set(r,_,s,n)}swapElementsOfSet(t,e,r,s){return _.swapElementsOfSet(t,e,r,s)}static secondElementOfSetIsLess(r,_,s,n){let c;return t.ensureNumber("firstLen",_),t.ensureNumber("secondLen",n),c=e._vscf_asn1wr_second_element_of_set_is_less(r,_,s,n),!!c}secondElementOfSetIsLess(t,e,r,s){return _.secondElementOfSetIsLess(t,e,r,s)}sortElementsOfSet(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",r),e._vscf_asn1wr_sort_elements_of_set(this.ctxPtr,r)}}return _}}(),x_=function(){if(Gt)return Ot;Gt=1;const t=Ar();return Ot=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_public_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_public_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_public_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_public_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_public_key_is_valid(this.ctxPtr),!!r}keyExponent(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_public_key_key_exponent(this.ctxPtr),r}}return _}}(),y_=function(){if(qt)return Vt;qt=1;const t=Ar();return Vt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_private_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_private_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_private_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_rsa_private_key_is_valid(this.ctxPtr),!!r}extractPublicKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_extract_public_key(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}}return _}}(),p_=function(){if(Xt)return jt;Xt=1;const t=Ar();return jt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_rsa_release_random(this.ctxPtr),e._vscf_rsa_use_random(this.ctxPtr,_.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_rsa_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_rsa_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_rsa_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_rsa_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_rsa_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}canEncrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_rsa_can_encrypt(this.ctxPtr,_.ctxPtr,s),!!n}encryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_rsa_encrypted_len(this.ctxPtr,_.ctxPtr,s),n}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("data",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.encryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_rsa_encrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canDecrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_rsa_can_decrypt(this.ctxPtr,_.ctxPtr,s),!!n}decryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_rsa_decrypted_len(this.ctxPtr,_.ctxPtr,s),n}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("data",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.decryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_rsa_decrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canSign(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_rsa_can_sign(this.ctxPtr,_.ctxPtr),!!s}signatureLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_rsa_signature_len(this.ctxPtr,_.ctxPtr),s}signHash(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(n,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=this.signatureLen(_),u=e._vsc_buffer_new_with_capacity(l);try{const t=e._vscf_rsa_sign_hash(this.ctxPtr,_.ctxPtr,s,o,u);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(u),c=e._vsc_buffer_len(u);return e.HEAPU8.slice(n,n+c)}finally{e._free(i),e._free(o),e._vsc_buffer_delete(u)}}canVerify(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_rsa_can_verify(this.ctxPtr,_.ctxPtr),!!s}verifyHash(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("digest",n),t.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(n,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);const u=c.length*c.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(c,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);try{return!!e._vscf_rsa_verify_hash(this.ctxPtr,_.ctxPtr,s,l,h)}finally{e._free(a),e._free(l),e._free(f),e._free(h)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_rsa_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}generateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("bitlen",_);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_rsa_generate_key(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}}return _}}(),g_=function(){if(Zt)return Wt;Zt=1;const t=Ar();return Wt=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_public_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_public_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_public_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_public_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_public_key_is_valid(this.ctxPtr),!!r}}return _}}(),m_=function(){if(Qt)return $t;Qt=1;const t=Ar();return $t=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_private_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_private_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_private_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_private_key_is_valid(this.ctxPtr),!!r}extractPublicKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_extract_public_key(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}}return _}}(),N_=function(){if(te)return Jt;te=1;const t=Ar();return Jt=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_ecc_release_random(this.ctxPtr),e._vscf_ecc_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("ecies",_,r.Ecies),e._vscf_ecc_release_ecies(this.ctxPtr),e._vscf_ecc_use_ecies(this.ctxPtr,_.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ecc_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ecc_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ecc_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ecc_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ecc_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}canEncrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ecc_can_encrypt(this.ctxPtr,_.ctxPtr,s),!!n}encryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ecc_encrypted_len(this.ctxPtr,_.ctxPtr,s),n}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("data",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.encryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ecc_encrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canDecrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ecc_can_decrypt(this.ctxPtr,_.ctxPtr,s),!!n}decryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ecc_decrypted_len(this.ctxPtr,_.ctxPtr,s),n}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("data",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.decryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ecc_decrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canSign(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_ecc_can_sign(this.ctxPtr,_.ctxPtr),!!s}signatureLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_ecc_signature_len(this.ctxPtr,_.ctxPtr),s}signHash(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(n,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=this.signatureLen(_),u=e._vsc_buffer_new_with_capacity(l);try{const t=e._vscf_ecc_sign_hash(this.ctxPtr,_.ctxPtr,s,o,u);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(u),c=e._vsc_buffer_len(u);return e.HEAPU8.slice(n,n+c)}finally{e._free(i),e._free(o),e._vsc_buffer_delete(u)}}canVerify(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_ecc_can_verify(this.ctxPtr,_.ctxPtr),!!s}verifyHash(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("digest",n),t.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(n,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);const u=c.length*c.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(c,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);try{return!!e._vscf_ecc_verify_hash(this.ctxPtr,_.ctxPtr,s,l,h)}finally{e._free(a),e._free(l),e._free(f),e._free(h)}}computeSharedKey(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const n=this.sharedKeyLen(s),c=e._vsc_buffer_new_with_capacity(n);try{const t=e._vscf_ecc_compute_shared_key(this.ctxPtr,_.ctxPtr,s.ctxPtr,c);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(c),i=e._vsc_buffer_len(c);return e.HEAPU8.slice(n,n+i)}finally{e._vsc_buffer_delete(c)}}sharedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_ecc_shared_key_len(this.ctxPtr,_.ctxPtr),s}kemSharedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_ecc_kem_shared_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulatedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_ecc_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulate(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=this.kemSharedKeyLen(_),n=e._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(_),i=e._vsc_buffer_new_with_capacity(c);try{const t=e._vscf_ecc_kem_encapsulate(this.ctxPtr,_.ctxPtr,n,i);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n),a=e.HEAPU8.slice(s,s+c),o=e._vsc_buffer_bytes(i),l=e._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(n),e._vsc_buffer_delete(i)}}kemDecapsulate(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("encapsulatedKey",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);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=this.kemSharedKeyLen(s),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ecc_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(_,_+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ecc_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}static writeSignature(_,s){t.ensureClass("r",_,r.MbedtlsMpi),t.ensureClass("s",s,r.MbedtlsMpi);const n=e._vsc_buffer_new_with_capacity(0);try{e._vscf_ecc_write_signature(_.ctxPtr,s.ctxPtr,n);const t=e._vsc_buffer_bytes(n),r=e._vsc_buffer_len(n);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(n)}}writeSignature(t,e){return _.writeSignature(t,e)}static readSignature(_,s,n){t.ensureByteArray("signature",_),t.ensureClass("r",s,r.MbedtlsMpi),t.ensureClass("s",n,r.MbedtlsMpi);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);try{const t=e._vscf_ecc_read_signature(o,s.ctxPtr,n.ctxPtr);r.FoundationError.handleStatusCode(t)}finally{e._free(i),e._free(o)}}readSignature(t,e,r){return _.readSignature(t,e,r)}generateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ecc_generate_key(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}produceAlgInfoForKey(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_ecc_produce_alg_info_for_key(this.ctxPtr,_.ctxPtr),r.FoundationInterface.newAndTakeCContext(s)}}return _}}(),I_=function(){if(re)return ee;re=1;const t=Ar();return ee=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_entropy_accumulator_delete(this.ctxPtr),this.ctxPtr=null)}static get SOURCES_MAX(){return 15}get SOURCES_MAX(){return 15}isStrong(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_entropy_accumulator_is_strong(this.ctxPtr),!!r}gather(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",_);const s=_,n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_entropy_accumulator_gather(this.ctxPtr,_,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_entropy_accumulator_setup_defaults(this.ctxPtr)}addSource(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("source",_,"Foundation.EntropySource",r.FoundationInterfaceTag.ENTROPY_SOURCE,r.FoundationInterface),t.ensureNumber("threshold",s),e._vscf_entropy_accumulator_add_source(this.ctxPtr,_.ctxPtr,s)}}return _}}(),E_=function(){if(se)return _e;se=1;const t=Ar();return _e=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ctr_drbg_delete(this.ctxPtr),this.ctxPtr=null)}set entropySource(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("entropySource",_,"Foundation.EntropySource",r.FoundationInterfaceTag.ENTROPY_SOURCE,r.FoundationInterface),e._vscf_ctr_drbg_release_entropy_source(this.ctxPtr),e._vscf_ctr_drbg_use_entropy_source(this.ctxPtr,_.ctxPtr)}static get RESEED_INTERVAL(){return 1e4}get RESEED_INTERVAL(){return 1e4}static get ENTROPY_LEN(){return 48}get ENTROPY_LEN(){return 48}random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",_);const s=_,n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_ctr_drbg_random(this.ctxPtr,_,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}reseed(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_reseed(this.ctxPtr);r.FoundationError.handleStatusCode(_)}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}enablePredictionResistance(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ctr_drbg_enable_prediction_resistance(this.ctxPtr)}setReseedInterval(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("interval",r),e._vscf_ctr_drbg_set_reseed_interval(this.ctxPtr,r)}setEntropyLen(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",r),e._vscf_ctr_drbg_set_entropy_len(this.ctxPtr,r)}}return _}}(),w_=function(){if(ce)return ne;ce=1;const t=Ar();return ne=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hmac_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("hash",_,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),e._vscf_hmac_release_hash(this.ctxPtr),e._vscf_hmac_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hmac_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hmac_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_hmac_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}digestLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hmac_digest_len(this.ctxPtr),r}mac(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",r),t.ensureByteArray("data",_);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=_.length*_.BYTES_PER_ELEMENT,o=e._malloc(a);e.HEAP8.set(_,o);const l=e._vsc_data_ctx_size(),u=e._malloc(l);e._vsc_data(u,o,a);const f=this.digestLen(),d=e._vsc_buffer_new_with_capacity(f);try{e._vscf_hmac_mac(this.ctxPtr,i,u,d);const t=e._vsc_buffer_bytes(d),r=e._vsc_buffer_len(d);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._free(o),e._free(u),e._vsc_buffer_delete(d)}}start(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("key",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_hmac_start(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}update(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_hmac_update(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}finish(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.digestLen(),_=e._vsc_buffer_new_with_capacity(r);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(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_hmac_reset(this.ctxPtr)}}return _}}(),b_=function(){if(ae)return ie;ae=1;const t=Ar();return ie=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hkdf_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("hash",_,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),e._vscf_hkdf_release_hash(this.ctxPtr),e._vscf_hkdf_use_hash(this.ctxPtr,_.ctxPtr)}static get HASH_COUNTER_MAX(){return 255}get HASH_COUNTER_MAX(){return 255}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hkdf_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hkdf_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_hkdf_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}derive(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r),t.ensureNumber("keyLen",_);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=_,o=e._vsc_buffer_new_with_capacity(a);try{e._vscf_hkdf_derive(this.ctxPtr,i,_,o);const t=e._vsc_buffer_bytes(o),r=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}reset(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("salt",r),t.ensureNumber("iterationCount",_);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);try{e._vscf_hkdf_reset(this.ctxPtr,i,_)}finally{e._free(n),e._free(i)}}setInfo(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("info",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_hkdf_set_info(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}}return _}}(),k_=function(){if(le)return oe;le=1;const t=Ar();return oe=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_kdf1_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("hash",_,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),e._vscf_kdf1_release_hash(this.ctxPtr),e._vscf_kdf1_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_kdf1_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf1_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_kdf1_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}derive(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r),t.ensureNumber("keyLen",_);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=_,o=e._vsc_buffer_new_with_capacity(a);try{e._vscf_kdf1_derive(this.ctxPtr,i,_,o);const t=e._vsc_buffer_bytes(o),r=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}}return _}}(),A_=function(){if(fe)return ue;fe=1;const t=Ar();return ue=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_kdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("hash",_,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),e._vscf_kdf2_release_hash(this.ctxPtr),e._vscf_kdf2_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_kdf2_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf2_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_kdf2_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}derive(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r),t.ensureNumber("keyLen",_);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=_,o=e._vsc_buffer_new_with_capacity(a);try{e._vscf_kdf2_derive(this.ctxPtr,i,_,o);const t=e._vsc_buffer_bytes(o),r=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}}return _}}(),C_=function(){if(he)return de;he=1;const t=Ar();return de=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_fake_random_delete(this.ctxPtr),this.ctxPtr=null)}random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",_);const s=_,n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_fake_random_random(this.ctxPtr,_,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}reseed(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_fake_random_reseed(this.ctxPtr);r.FoundationError.handleStatusCode(_)}isStrong(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_fake_random_is_strong(this.ctxPtr),!!r}gather(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",_);const s=_,n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_fake_random_gather(this.ctxPtr,_,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}setupSourceByte(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_fake_random_setup_source_byte(this.ctxPtr,r)}setupSourceData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("dataSource",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_fake_random_setup_source_data(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}}return _}}(),F_=function(){if(ve)return Pe;ve=1;const t=Ar();return Pe=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs5_pbkdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hmac(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("hmac",_,"Foundation.Mac",r.FoundationInterfaceTag.MAC,r.FoundationInterface),e._vscf_pkcs5_pbkdf2_release_hmac(this.ctxPtr),e._vscf_pkcs5_pbkdf2_use_hmac(this.ctxPtr,_.ctxPtr)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_pkcs5_pbkdf2_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbkdf2_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_pkcs5_pbkdf2_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}derive(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r),t.ensureNumber("keyLen",_);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=_,o=e._vsc_buffer_new_with_capacity(a);try{e._vscf_pkcs5_pbkdf2_derive(this.ctxPtr,i,_,o);const t=e._vsc_buffer_bytes(o),r=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}reset(r,_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("salt",r),t.ensureNumber("iterationCount",_);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);try{e._vscf_pkcs5_pbkdf2_reset(this.ctxPtr,i,_)}finally{e._free(n),e._free(i)}}setInfo(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("info",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_pkcs5_pbkdf2_set_info(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs5_pbkdf2_setup_defaults(this.ctxPtr)}}return _}}(),T_=function(){if(ye)return xe;ye=1;const t=Ar();return xe=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs5_pbes2_delete(this.ctxPtr),this.ctxPtr=null)}set kdf(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("kdf",_,"Foundation.SaltedKdf",r.FoundationInterfaceTag.SALTED_KDF,r.FoundationInterface),e._vscf_pkcs5_pbes2_release_kdf(this.ctxPtr),e._vscf_pkcs5_pbes2_use_kdf(this.ctxPtr,_.ctxPtr)}set cipher(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("cipher",_,"Foundation.Cipher",r.FoundationInterfaceTag.CIPHER,r.FoundationInterface),e._vscf_pkcs5_pbes2_release_cipher(this.ctxPtr),e._vscf_pkcs5_pbes2_use_cipher(this.ctxPtr,_.ctxPtr)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_pkcs5_pbes2_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbes2_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_pkcs5_pbes2_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}encrypt(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.encryptedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_pkcs5_pbes2_encrypt(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}encryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_pkcs5_pbes2_encrypted_len(this.ctxPtr,r),_}preciseEncryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_pkcs5_pbes2_precise_encrypted_len(this.ctxPtr,r),_}decrypt(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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.decryptedLen(_.length),o=e._vsc_buffer_new_with_capacity(a);try{const t=e._vscf_pkcs5_pbes2_decrypt(this.ctxPtr,i,o);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(o),s=e._vsc_buffer_len(o);return e.HEAPU8.slice(_,_+s)}finally{e._free(n),e._free(i),e._vsc_buffer_delete(o)}}decryptedLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_pkcs5_pbes2_decrypted_len(this.ctxPtr,r),_}reset(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("pwd",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_pkcs5_pbes2_reset(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}}return _}}(),K_=function(){if(ge)return pe;ge=1;const t=Ar();return pe=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_seed_entropy_source_delete(this.ctxPtr),this.ctxPtr=null)}static get GATHER_LEN_MAX(){return 48}get GATHER_LEN_MAX(){return 48}isStrong(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_seed_entropy_source_is_strong(this.ctxPtr),!!r}gather(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("len",_);const s=_,n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_seed_entropy_source_gather(this.ctxPtr,_,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}resetSeed(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("seed",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_seed_entropy_source_reset_seed(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}moveForward(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_seed_entropy_source_move_forward(this.ctxPtr)}}return _}}(),S_=function(){if(Ne)return me;Ne=1;const t=Ar();return me=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_material_rng_delete(this.ctxPtr),this.ctxPtr=null)}static get KEY_MATERIAL_LEN_MIN(){return 32}get KEY_MATERIAL_LEN_MIN(){return 32}static get KEY_MATERIAL_LEN_MAX(){return 512}get KEY_MATERIAL_LEN_MAX(){return 512}random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",_);const s=_,n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_key_material_rng_random(this.ctxPtr,_,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}reseed(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_material_rng_reseed(this.ctxPtr);r.FoundationError.handleStatusCode(_)}resetKeyMaterial(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("keyMaterial",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_key_material_rng_reset_key_material(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}}return _}}(),z_=function(){if(Ee)return Ie;Ee=1;const t=Ar();return Ie=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_raw_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_public_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_public_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_public_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_public_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_public_key_is_valid(this.ctxPtr),!!r}data(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_raw_public_key_data(this.ctxPtr)}}return _}}(),L_=function(){if(be)return we;be=1;const t=Ar();return we=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_raw_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_private_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_private_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_private_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_private_key_is_valid(this.ctxPtr),!!r}extractPublicKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_extract_public_key(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}data(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_raw_private_key_data(this.ctxPtr)}hasPublicKey(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_raw_private_key_has_public_key(this.ctxPtr),!!r}setPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawPublicKey",_,r.RawPublicKey),e._vscf_raw_private_key_set_public_key(this.ctxPtr,_.ctxPtr)}getPublicKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_get_public_key(this.ctxPtr),r.RawPublicKey.newAndUseCContext(_)}}return _}}(),R_=function(){if(Ae)return ke;Ae=1;const t=Ar();return ke=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs8_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",r.FoundationInterfaceTag.ASN1_WRITER,r.FoundationInterface),e._vscf_pkcs8_serializer_release_asn1_writer(this.ctxPtr),e._vscf_pkcs8_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey),s=e._vscf_pkcs8_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),s}serializePublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey);const s=this.serializedPublicKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_pkcs8_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}serializedPrivateKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey),s=e._vscf_pkcs8_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),s}serializePrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey);const s=this.serializedPrivateKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_pkcs8_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs8_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_pkcs8_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}serializePrivateKeyInplace(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_pkcs8_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}}return _}}(),B_=function(){if(Fe)return Ce;Fe=1;const t=Ar();return Ce=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sec1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",r.FoundationInterfaceTag.ASN1_WRITER,r.FoundationInterface),e._vscf_sec1_serializer_release_asn1_writer(this.ctxPtr),e._vscf_sec1_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey),s=e._vscf_sec1_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),s}serializePublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey);const s=this.serializedPublicKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_sec1_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}serializedPrivateKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey),s=e._vscf_sec1_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),s}serializePrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey);const s=this.serializedPrivateKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_sec1_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sec1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_sec1_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}serializePrivateKeyInplace(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_sec1_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}static isEcKey(_){let s;return t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_sec1_serializer_is_ec_key(_.ctxPtr),!!s}isEcKey(t){return _.isEcKey(t)}}return _}}(),Y_=function(){if(Ke)return Te;Ke=1;const t=Ar();return Te=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_asn1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",r.FoundationInterfaceTag.ASN1_WRITER,r.FoundationInterface),e._vscf_key_asn1_serializer_release_asn1_writer(this.ctxPtr),e._vscf_key_asn1_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey),s=e._vscf_key_asn1_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),s}serializePublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey);const s=this.serializedPublicKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_key_asn1_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}serializedPrivateKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey),s=e._vscf_key_asn1_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),s}serializePrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey);const s=this.serializedPrivateKeyLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const t=e._vscf_key_asn1_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,n);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n);return e.HEAPU8.slice(s,s+c)}finally{e._vsc_buffer_delete(n)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("publicKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_asn1_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}serializePrivateKeyInplace(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("privateKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_asn1_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}}return _}}(),H_=function(){if(ze)return Se;ze=1;const t=Ar();return Se=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_asn1_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",r.FoundationInterfaceTag.ASN1_READER,r.FoundationInterface),e._vscf_key_asn1_deserializer_release_asn1_reader(this.ctxPtr),e._vscf_key_asn1_deserializer_use_asn1_reader(this.ctxPtr,_.ctxPtr)}deserializePublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("publicKeyData",_);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_key_asn1_deserializer_deserialize_public_key(this.ctxPtr,i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}deserializePrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("privateKeyData",_);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_key_asn1_deserializer_deserialize_private_key(this.ctxPtr,i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_deserializer_setup_defaults(this.ctxPtr)}deserializePublicKeyInplace(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_key_asn1_deserializer_deserialize_public_key_inplace(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}deserializePrivateKeyInplace(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_key_asn1_deserializer_deserialize_private_key_inplace(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}deserializePkcs8PrivateKeyInplace(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("seqLeftLen",_),t.ensureNumber("version",s);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_key_asn1_deserializer_deserialize_pkcs8_private_key_inplace(this.ctxPtr,_,s,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(i)}finally{e._free(c)}}deserializeSec1PrivateKeyInplace(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("seqLeftLen",_),t.ensureNumber("version",s),t.ensureImplementInterface("algInfo",n,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const c=e._vscf_error_ctx_size(),i=e._malloc(c);let a;e._vscf_error_reset(i);try{a=e._vscf_key_asn1_deserializer_deserialize_sec1_private_key_inplace(this.ctxPtr,_,s,n.ctxPtr,i);const t=e._vscf_error_status(i);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(a)}finally{e._free(i)}}}return _}}(),U_=function(){if(Re)return Le;Re=1;const t=Ar();return Le=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ed25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_ed25519_release_random(this.ctxPtr),e._vscf_ed25519_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("ecies",_,r.Ecies),e._vscf_ed25519_release_ecies(this.ctxPtr),e._vscf_ed25519_use_ecies(this.ctxPtr,_.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ed25519_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ed25519_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ed25519_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ed25519_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_ed25519_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}canEncrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ed25519_can_encrypt(this.ctxPtr,_.ctxPtr,s),!!n}encryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ed25519_encrypted_len(this.ctxPtr,_.ctxPtr,s),n}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("data",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.encryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ed25519_encrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canDecrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ed25519_can_decrypt(this.ctxPtr,_.ctxPtr,s),!!n}decryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_ed25519_decrypted_len(this.ctxPtr,_.ctxPtr,s),n}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("data",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.decryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ed25519_decrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canSign(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_ed25519_can_sign(this.ctxPtr,_.ctxPtr),!!s}signatureLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_ed25519_signature_len(this.ctxPtr,_.ctxPtr),s}signHash(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(n,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=this.signatureLen(_),u=e._vsc_buffer_new_with_capacity(l);try{const t=e._vscf_ed25519_sign_hash(this.ctxPtr,_.ctxPtr,s,o,u);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(u),c=e._vsc_buffer_len(u);return e.HEAPU8.slice(n,n+c)}finally{e._free(i),e._free(o),e._vsc_buffer_delete(u)}}canVerify(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_ed25519_can_verify(this.ctxPtr,_.ctxPtr),!!s}verifyHash(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("digest",n),t.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(n,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);const u=c.length*c.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(c,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);try{return!!e._vscf_ed25519_verify_hash(this.ctxPtr,_.ctxPtr,s,l,h)}finally{e._free(a),e._free(l),e._free(f),e._free(h)}}computeSharedKey(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const n=this.sharedKeyLen(s),c=e._vsc_buffer_new_with_capacity(n);try{const t=e._vscf_ed25519_compute_shared_key(this.ctxPtr,_.ctxPtr,s.ctxPtr,c);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(c),i=e._vsc_buffer_len(c);return e.HEAPU8.slice(n,n+i)}finally{e._vsc_buffer_delete(c)}}sharedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_ed25519_shared_key_len(this.ctxPtr,_.ctxPtr),s}kemSharedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_ed25519_kem_shared_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulatedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_ed25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulate(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=this.kemSharedKeyLen(_),n=e._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(_),i=e._vsc_buffer_new_with_capacity(c);try{const t=e._vscf_ed25519_kem_encapsulate(this.ctxPtr,_.ctxPtr,n,i);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n),a=e.HEAPU8.slice(s,s+c),o=e._vsc_buffer_bytes(i),l=e._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(n),e._vsc_buffer_delete(i)}}kemDecapsulate(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("encapsulatedKey",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);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=this.kemSharedKeyLen(s),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_ed25519_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(_,_+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ed25519_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}generateKey(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_generate_key(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _}}(),M_=function(){if(Ye)return Be;Ye=1;const t=Ar();return Be=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_curve25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_curve25519_release_random(this.ctxPtr),e._vscf_curve25519_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("ecies",_,r.Ecies),e._vscf_curve25519_release_ecies(this.ctxPtr),e._vscf_curve25519_use_ecies(this.ctxPtr,_.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_curve25519_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_curve25519_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_curve25519_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_curve25519_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_curve25519_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}canEncrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_curve25519_can_encrypt(this.ctxPtr,_.ctxPtr,s),!!n}encryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_curve25519_encrypted_len(this.ctxPtr,_.ctxPtr,s),n}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("data",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.encryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_curve25519_encrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canDecrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_curve25519_can_decrypt(this.ctxPtr,_.ctxPtr,s),!!n}decryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_curve25519_decrypted_len(this.ctxPtr,_.ctxPtr,s),n}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("data",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.decryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_curve25519_decrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}computeSharedKey(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const n=this.sharedKeyLen(s),c=e._vsc_buffer_new_with_capacity(n);try{const t=e._vscf_curve25519_compute_shared_key(this.ctxPtr,_.ctxPtr,s.ctxPtr,c);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(c),i=e._vsc_buffer_len(c);return e.HEAPU8.slice(n,n+i)}finally{e._vsc_buffer_delete(c)}}sharedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_curve25519_shared_key_len(this.ctxPtr,_.ctxPtr),s}kemSharedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_curve25519_kem_shared_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulatedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_curve25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulate(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=this.kemSharedKeyLen(_),n=e._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(_),i=e._vsc_buffer_new_with_capacity(c);try{const t=e._vscf_curve25519_kem_encapsulate(this.ctxPtr,_.ctxPtr,n,i);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n),a=e.HEAPU8.slice(s,s+c),o=e._vsc_buffer_bytes(i),l=e._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(n),e._vsc_buffer_delete(i)}}kemDecapsulate(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("encapsulatedKey",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);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=this.kemSharedKeyLen(s),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_curve25519_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(_,_+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_curve25519_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}generateKey(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_generate_key(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _}}(),D_=function(){if(Ue)return He;Ue=1;const t=Ar();return He=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_falcon_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_falcon_release_random(this.ctxPtr),e._vscf_falcon_use_random(this.ctxPtr,_.ctxPtr)}static get SEED_LEN(){return 48}get SEED_LEN(){return 48}static get LOGN_512(){return 9}get LOGN_512(){return 9}static get LOGN_1024(){return 10}get LOGN_1024(){return 10}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_falcon_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_falcon_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_falcon_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_falcon_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_falcon_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_falcon_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_falcon_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_falcon_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}canSign(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_falcon_can_sign(this.ctxPtr,_.ctxPtr),!!s}signatureLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_falcon_signature_len(this.ctxPtr,_.ctxPtr),s}signHash(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(n,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=this.signatureLen(_),u=e._vsc_buffer_new_with_capacity(l);try{const t=e._vscf_falcon_sign_hash(this.ctxPtr,_.ctxPtr,s,o,u);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(u),c=e._vsc_buffer_len(u);return e.HEAPU8.slice(n,n+c)}finally{e._free(i),e._free(o),e._vsc_buffer_delete(u)}}canVerify(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_falcon_can_verify(this.ctxPtr,_.ctxPtr),!!s}verifyHash(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("digest",n),t.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(n,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);const u=c.length*c.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(c,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);try{return!!e._vscf_falcon_verify_hash(this.ctxPtr,_.ctxPtr,s,l,h)}finally{e._free(a),e._free(l),e._free(f),e._free(h)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_falcon_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}generateKey(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_generate_key(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _}}(),O_=function(){if(De)return Me;De=1;const t=Ar();return Me=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_round5_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_round5_release_random(this.ctxPtr),e._vscf_round5_use_random(this.ctxPtr,_.ctxPtr)}static get SEED_LEN(){return 48}get SEED_LEN(){return 48}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_round5_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_round5_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_round5_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_round5_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_round5_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}kemSharedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.FoundationInterface),s=e._vscf_round5_kem_shared_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulatedKeyLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_round5_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),s}kemEncapsulate(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface);const s=this.kemSharedKeyLen(_),n=e._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(_),i=e._vsc_buffer_new_with_capacity(c);try{const t=e._vscf_round5_kem_encapsulate(this.ctxPtr,_.ctxPtr,n,i);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(n),c=e._vsc_buffer_len(n),a=e.HEAPU8.slice(s,s+c),o=e._vsc_buffer_bytes(i),l=e._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(n),e._vsc_buffer_delete(i)}}kemDecapsulate(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("encapsulatedKey",_),t.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);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=this.kemSharedKeyLen(s),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_round5_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(_,_+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_round5_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}generateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_round5_generate_key(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}}return _}}(),G_=function(){if(Ge)return Oe;Ge=1;const t=Ar();return Oe=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_key_alg_info_alg_id(this.ctxPtr),r}cipherAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_info_cipher_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}signerAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_info_signer_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),V_=function(){if(qe)return Ve;qe=1;const t=Ar();return Ve=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_public_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_public_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_public_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_public_key_is_valid(this.ctxPtr),!!r}cipherKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_cipher_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_signer_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),q_=function(){if(Xe)return je;Xe=1;const t=Ar();return je=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_private_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_private_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_private_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_private_key_is_valid(this.ctxPtr),!!r}extractPublicKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_extract_public_key(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}cipherKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_cipher_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_signer_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),j_=function(){if(Ze)return We;Ze=1;const t=Ar();return We=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_compound_key_alg_release_random(this.ctxPtr),e._vscf_compound_key_alg_use_random(this.ctxPtr,_.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_compound_key_alg_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_compound_key_alg_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.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_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);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_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.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_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);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_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.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_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}canEncrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_compound_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,s),!!n}encryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_compound_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,s),n}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("data",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.encryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_compound_key_alg_encrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canDecrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_compound_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,s),!!n}decryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_compound_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,s),n}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("data",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.decryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_compound_key_alg_decrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canSign(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_compound_key_alg_can_sign(this.ctxPtr,_.ctxPtr),!!s}signatureLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_compound_key_alg_signature_len(this.ctxPtr,_.ctxPtr),s}signHash(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(n,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=this.signatureLen(_),u=e._vsc_buffer_new_with_capacity(l);try{const t=e._vscf_compound_key_alg_sign_hash(this.ctxPtr,_.ctxPtr,s,o,u);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(u),c=e._vsc_buffer_len(u);return e.HEAPU8.slice(n,n+c)}finally{e._free(i),e._free(o),e._vsc_buffer_delete(u)}}canVerify(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_compound_key_alg_can_verify(this.ctxPtr,_.ctxPtr),!!s}verifyHash(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("digest",n),t.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(n,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);const u=c.length*c.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(c,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);try{return!!e._vscf_compound_key_alg_verify_hash(this.ctxPtr,_.ctxPtr,s,l,h)}finally{e._free(a),e._free(l),e._free(f),e._free(h)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_compound_key_alg_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}makeKey(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("cipherKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureImplementInterface("signerKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_compound_key_alg_make_key(this.ctxPtr,_.ctxPtr,s.ctxPtr,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}}return _}}(),X_=function(){if(Qe)return $e;Qe=1;const t=Ar();return $e=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_key_alg_info_alg_id(this.ctxPtr),r}firstKeyAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_first_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}secondKeyAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_second_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),W_=function(){if(tr)return Je;tr=1;const t=Ar();return Je=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_public_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_public_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_public_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_public_key_is_valid(this.ctxPtr),!!r}firstKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_first_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_second_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),Z_=function(){if(rr)return er;rr=1;const t=Ar();return er=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_private_key_alg_id(this.ctxPtr),r}algInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_private_key_len(this.ctxPtr),r}bitlen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_private_key_bitlen(this.ctxPtr),r}isValid(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hybrid_private_key_is_valid(this.ctxPtr),!!r}extractPublicKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_extract_public_key(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}firstKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_first_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_second_key(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),$_=function(){if(sr)return _r;sr=1;const t=Ar();return _r=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_hybrid_key_alg_release_random(this.ctxPtr),e._vscf_hybrid_key_alg_use_random(this.ctxPtr,_.ctxPtr)}set cipher(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("cipher",_,"Foundation.CipherAuth",r.FoundationInterfaceTag.CIPHER_AUTH,r.FoundationInterface),e._vscf_hybrid_key_alg_release_cipher(this.ctxPtr),e._vscf_hybrid_key_alg_use_cipher(this.ctxPtr,_.ctxPtr)}set hash(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("hash",_,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),e._vscf_hybrid_key_alg_release_hash(this.ctxPtr),e._vscf_hybrid_key_alg_use_hash(this.ctxPtr,_.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("key",_,"Foundation.Key",r.FoundationInterfaceTag.KEY,r.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_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}importPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPublicKey);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_import_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPublicKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.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_export_public_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPublicKey.newAndTakeCContext(c)}finally{e._free(n)}}importPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("rawKey",_,r.RawPrivateKey);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_import_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}exportPrivateKey(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.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_export_private_key(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.RawPrivateKey.newAndTakeCContext(c)}finally{e._free(n)}}canEncrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_hybrid_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,s),!!n}encryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_hybrid_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,s),n}encrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("data",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.encryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_hybrid_key_alg_encrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canDecrypt(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_hybrid_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,s),!!n}decryptedLen(_,s){let n;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureNumber("dataLen",s),n=e._vscf_hybrid_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,s),n}decrypt(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("data",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.decryptedLen(_,s.length),l=e._vsc_buffer_new_with_capacity(o);try{const t=e._vscf_hybrid_key_alg_decrypt(this.ctxPtr,_.ctxPtr,a,l);r.FoundationError.handleStatusCode(t);const s=e._vsc_buffer_bytes(l),n=e._vsc_buffer_len(l);return e.HEAPU8.slice(s,s+n)}finally{e._free(c),e._free(a),e._vsc_buffer_delete(l)}}canSign(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_hybrid_key_alg_can_sign(this.ctxPtr,_.ctxPtr),!!s}signatureLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),s=e._vscf_hybrid_key_alg_signature_len(this.ctxPtr,_.ctxPtr),s}signHash(_,s,n){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(n,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);const l=this.signatureLen(_),u=e._vsc_buffer_new_with_capacity(l);try{const t=e._vscf_hybrid_key_alg_sign_hash(this.ctxPtr,_.ctxPtr,s,o,u);r.FoundationError.handleStatusCode(t);const n=e._vsc_buffer_bytes(u),c=e._vsc_buffer_len(u);return e.HEAPU8.slice(n,n+c)}finally{e._free(i),e._free(o),e._vsc_buffer_delete(u)}}canVerify(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),s=e._vscf_hybrid_key_alg_can_verify(this.ctxPtr,_.ctxPtr),!!s}verifyHash(_,s,n,c){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",r.FoundationInterfaceTag.PUBLIC_KEY,r.FoundationInterface),t.ensureByteArray("digest",n),t.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=e._malloc(i);e.HEAP8.set(n,a);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,a,i);const u=c.length*c.BYTES_PER_ELEMENT,f=e._malloc(u);e.HEAP8.set(c,f);const d=e._vsc_data_ctx_size(),h=e._malloc(d);e._vsc_data(h,f,u);try{return!!e._vscf_hybrid_key_alg_verify_hash(this.ctxPtr,_.ctxPtr,s,l,h)}finally{e._free(a),e._free(l),e._free(f),e._free(h)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_hybrid_key_alg_setup_defaults(this.ctxPtr);r.FoundationError.handleStatusCode(_)}makeKey(_,s){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("firstKey",_,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface),t.ensureImplementInterface("secondKey",s,"Foundation.PrivateKey",r.FoundationInterfaceTag.PRIVATE_KEY,r.FoundationInterface);const n=e._vscf_error_ctx_size(),c=e._malloc(n);let i;e._vscf_error_reset(c);try{i=e._vscf_hybrid_key_alg_make_key(this.ctxPtr,_.ctxPtr,s.ctxPtr,c);const t=e._vscf_error_status(c);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(i)}finally{e._free(c)}}static configCipher(_,s,n){t.ensureImplementInterface("cipher",_,"Foundation.Cipher",r.FoundationInterfaceTag.CIPHER,r.FoundationInterface),t.ensureImplementInterface("hash",s,"Foundation.Hash",r.FoundationInterfaceTag.HASH,r.FoundationInterface),t.ensureByteArray("sharedKey",n);const c=n.length*n.BYTES_PER_ELEMENT,i=e._malloc(c);e.HEAP8.set(n,i);const a=e._vsc_data_ctx_size(),o=e._malloc(a);e._vsc_data(o,i,c);try{e._vscf_hybrid_key_alg_config_cipher(_.ctxPtr,s.ctxPtr,o)}finally{e._free(i),e._free(o)}}configCipher(t,e,r){return _.configCipher(t,e,r)}}return _}}(),Q_=function(){if(cr)return nr;cr=1;const t=Ar();return nr=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_simple_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_simple_alg_info_alg_id(this.ctxPtr),r}}return _}}(),J_=function(){if(ar)return ir;ar=1;const t=Ar();return ir=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hash_based_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_hash_based_alg_info_alg_id(this.ctxPtr),r}hashAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hash_based_alg_info_hash_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),ts=function(){if(lr)return or;lr=1;const t=Ar();return or=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_cipher_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_cipher_alg_info_alg_id(this.ctxPtr),r}nonce(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_cipher_alg_info_nonce(this.ctxPtr)}}return _}}(),es=function(){if(fr)return ur;fr=1;const t=Ar();return ur=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_salted_kdf_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_salted_kdf_alg_info_alg_id(this.ctxPtr),r}hashAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_salted_kdf_alg_info_hash_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}salt(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_salted_kdf_alg_info_salt(this.ctxPtr)}iterationCount(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_salted_kdf_alg_info_iteration_count(this.ctxPtr),r}}return _}}(),rs=function(){if(hr)return dr;hr=1;const t=Ar();return dr=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pbe_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_pbe_alg_info_alg_id(this.ctxPtr),r}kdfAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_kdf_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}cipherAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_cipher_alg_info(this.ctxPtr),r.FoundationInterface.newAndUseCContext(_)}}return _}}(),_s=function(){if(vr)return Pr;vr=1;const t=Ar();return Pr=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_alg_info_alg_id(this.ctxPtr),r}keyId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_alg_info_key_id(this.ctxPtr),r}domainId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_ecc_alg_info_domain_id(this.ctxPtr),r}}return _}}(),ss=function(){if(yr)return xr;yr=1;const t=Ar();return xr=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_alg_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",r.FoundationInterfaceTag.ASN1_WRITER,r.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 s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),s}serialize(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=this.serializedLen(_),n=e._vsc_buffer_new_with_capacity(s);try{e._vscf_alg_info_der_serializer_serialize(this.ctxPtr,_.ctxPtr,n);const t=e._vsc_buffer_bytes(n),r=e._vsc_buffer_len(n);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(n)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_serializer_setup_defaults(this.ctxPtr)}static isAlgRequireNullParams(t){let r;return r=e._vscf_alg_info_der_serializer_is_alg_require_null_params(t),!!r}isAlgRequireNullParams(t){return _.isAlgRequireNullParams(t)}serializedSimpleAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_simple_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeSimpleAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_simple_alg_info(this.ctxPtr,_.ctxPtr),s}serializedKdfAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_kdf_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeKdfAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_kdf_alg_info(this.ctxPtr,_.ctxPtr),s}serializedHkdfAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_hkdf_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeHkdfAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_hkdf_alg_info(this.ctxPtr,_.ctxPtr),s}serializedHmacAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_hmac_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeHmacAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_hmac_alg_info(this.ctxPtr,_.ctxPtr),s}serializedCipherAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_cipher_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeCipherAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_cipher_alg_info(this.ctxPtr,_.ctxPtr),s}serializedPbkdf2AlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_pbkdf2_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializePbkdf2AlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_pbkdf2_alg_info(this.ctxPtr,_.ctxPtr),s}serializedPbes2AlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_pbes2_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializePbes2AlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_pbes2_alg_info(this.ctxPtr,_.ctxPtr),s}serializedEccAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_ecc_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeEccAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_ecc_alg_info(this.ctxPtr,_.ctxPtr),s}serializedCompoundKeyAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_compound_key_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeCompoundKeyAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_compound_key_alg_info(this.ctxPtr,_.ctxPtr),s}serializedHybridKeyAlgInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialized_hybrid_key_alg_info_len(this.ctxPtr,_.ctxPtr),s}serializeHybridKeyAlgInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_hybrid_key_alg_info(this.ctxPtr,_.ctxPtr),s}serializeInplace(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface),s=e._vscf_alg_info_der_serializer_serialize_inplace(this.ctxPtr,_.ctxPtr),s}}return _}}(),ns=function(){if(gr)return pr;gr=1;const t=Ar();return pr=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_alg_info_der_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",r.FoundationInterfaceTag.ASN1_READER,r.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(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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_alg_info_der_deserializer_deserialize(this.ctxPtr,i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_deserializer_setup_defaults(this.ctxPtr)}deserializeSimpleAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_simple_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeKdfAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_kdf_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeHkdfAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_hkdf_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeHmacAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_hmac_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeCipherAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_cipher_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializePbkdf2AlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_pbkdf2_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializePbes2AlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_pbes2_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeEccAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_ecc_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeCompoundKeyAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_compound_key_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeHybridKeyAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_alg_info_der_deserializer_deserialize_hybrid_key_alg_info(this.ctxPtr,_,n);const t=e._vscf_error_status(n);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}deserializeInplace(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),s=e._malloc(_);let n;e._vscf_error_reset(s);try{n=e._vscf_alg_info_der_deserializer_deserialize_inplace(this.ctxPtr,s);const t=e._vscf_error_status(s);return r.FoundationError.handleStatusCode(t),r.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _}}(),cs=function(){if(Nr)return mr;Nr=1;const t=Ar();return mr=(e,r)=>{class _{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",r.FoundationInterfaceTag.ASN1_READER,r.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(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",r.FoundationInterfaceTag.ASN1_WRITER,r.FoundationInterface),e._vscf_message_info_der_serializer_release_asn1_writer(this.ctxPtr),e._vscf_message_info_der_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}static get PREFIX_LEN(){return 32}get PREFIX_LEN(){return 32}serializedLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),s}serialize(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=this.serializedLen(_),n=e._vsc_buffer_new_with_capacity(s);try{e._vscf_message_info_der_serializer_serialize(this.ctxPtr,_.ctxPtr,n);const t=e._vsc_buffer_bytes(n),r=e._vsc_buffer_len(n);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(n)}}readPrefix(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);let i;e._vsc_data(c,s,_);try{i=e._vscf_message_info_der_serializer_read_prefix(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}deserialize(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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_message_info_der_serializer_deserialize(this.ctxPtr,i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.MessageInfo.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}serializedFooterLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfoFooter",_,r.MessageInfoFooter),s=e._vscf_message_info_der_serializer_serialized_footer_len(this.ctxPtr,_.ctxPtr),s}serializeFooter(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfoFooter",_,r.MessageInfoFooter);const s=this.serializedFooterLen(_),n=e._vsc_buffer_new_with_capacity(s);try{e._vscf_message_info_der_serializer_serialize_footer(this.ctxPtr,_.ctxPtr,n);const t=e._vsc_buffer_bytes(n),r=e._vsc_buffer_len(n);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(n)}}deserializeFooter(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",_);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_message_info_der_serializer_deserialize_footer(this.ctxPtr,i,o);const t=e._vscf_error_status(o);return r.FoundationError.handleStatusCode(t),r.MessageInfoFooter.newAndTakeCContext(l)}finally{e._free(n),e._free(i),e._free(o)}}setupDefaults(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_der_serializer_setup_defaults(this.ctxPtr)}serializedCustomParamsLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("customParams",_,r.MessageInfoCustomParams),s=e._vscf_message_info_der_serializer_serialized_custom_params_len(this.ctxPtr,_.ctxPtr),s}serializeCustomParams(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("customParams",_,r.MessageInfoCustomParams),s=e._vscf_message_info_der_serializer_serialize_custom_params(this.ctxPtr,_.ctxPtr),s}serializedFooterInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("footerInfo",_,r.FooterInfo),s=e._vscf_message_info_der_serializer_serialized_footer_info_len(this.ctxPtr,_.ctxPtr),s}serializeFooterInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("footerInfo",_,r.FooterInfo),s=e._vscf_message_info_der_serializer_serialize_footer_info(this.ctxPtr,_.ctxPtr),s}serializeSignedDataInfoInternal(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("signedDataInfo",_,r.SignedDataInfo),s=e._vscf_message_info_der_serializer_serialize_signed_data_info_internal(this.ctxPtr,_.ctxPtr),s}serializedKeyRecipientInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("keyRecipientInfo",_,r.KeyRecipientInfo),s=e._vscf_message_info_der_serializer_serialized_key_recipient_info_len(this.ctxPtr,_.ctxPtr),s}serializeKeyRecipientInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("keyRecipientInfo",_,r.KeyRecipientInfo),s=e._vscf_message_info_der_serializer_serialize_key_recipient_info(this.ctxPtr,_.ctxPtr),s}serializedPasswordRecipientInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("passwordRecipientInfo",_,r.PasswordRecipientInfo),s=e._vscf_message_info_der_serializer_serialized_password_recipient_info_len(this.ctxPtr,_.ctxPtr),s}serializePasswordRecipientInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("passwordRecipientInfo",_,r.PasswordRecipientInfo),s=e._vscf_message_info_der_serializer_serialize_password_recipient_info(this.ctxPtr,_.ctxPtr),s}serializedRecipientInfosLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialized_recipient_infos_len(this.ctxPtr,_.ctxPtr),s}serializeRecipientInfos(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialize_recipient_infos(this.ctxPtr,_.ctxPtr),s}serializedEncryptedContentInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialized_encrypted_content_info_len(this.ctxPtr,_.ctxPtr),s}serializeEncryptedContentInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialize_encrypted_content_info(this.ctxPtr,_.ctxPtr),s}serializedEnvelopedDataLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialized_enveloped_data_len(this.ctxPtr,_.ctxPtr),s}serializeEnvelopedData(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialize_enveloped_data(this.ctxPtr,_.ctxPtr),s}serializedCmsContentInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialized_cms_content_info_len(this.ctxPtr,_.ctxPtr),s}serializeCmsContentInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo),s=e._vscf_message_info_der_serializer_serialize_cms_content_info_(this.ctxPtr,_.ctxPtr),s}serializedSignerInfosLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfoFooter",_,r.MessageInfoFooter),s=e._vscf_message_info_der_serializer_serialized_signer_infos_len(this.ctxPtr,_.ctxPtr),s}serializeSignerInfos(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfoFooter",_,r.MessageInfoFooter),s=e._vscf_message_info_der_serializer_serialize_signer_infos(this.ctxPtr,_.ctxPtr),s}serializedSignerInfoLen(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("signerInfo",_,r.SignerInfo),s=e._vscf_message_info_der_serializer_serialized_signer_info_len(this.ctxPtr,_.ctxPtr),s}serializeSignerInfo(_){let s;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("signerInfo",_,r.SignerInfo),s=e._vscf_message_info_der_serializer_serialize_signer_info(this.ctxPtr,_.ctxPtr),s}deserializeCustomParams(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("customParams",_,r.MessageInfoCustomParams);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_custom_params(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeCipherKdf(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_cipher_kdf(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeCipherPadding(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_cipher_padding(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeFooterInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_footer_info(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeSignedDataInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_signed_data_info(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeKeyRecipientInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_key_recipient_info(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializePasswordRecipientInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_password_recipient_info(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeRecipientInfos(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_recipient_infos(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeEncryptedContentInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_encrypted_content_info(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeEnvelopedData(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_enveloped_data(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeCmsContentInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfo",_,r.MessageInfo);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_cms_content_info(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeSignerInfos(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfoFooter",_,r.MessageInfoFooter);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_signer_infos(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}deserializeSignerInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("messageInfoFooter",_,r.MessageInfoFooter);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_message_info_der_serializer_deserialize_signer_info(this.ctxPtr,_.ctxPtr,n);const t=e._vscf_error_status(n);r.FoundationError.handleStatusCode(t)}finally{e._free(n)}}}return _}}(),is=function(){if(Er)return Ir;Er=1;const t=Ar();return Ir=(e,r)=>{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(t){return new _(t)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_random_padding_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("random",_,"Foundation.Random",r.FoundationInterfaceTag.RANDOM,r.FoundationInterface),e._vscf_random_padding_release_random(this.ctxPtr),e._vscf_random_padding_use_random(this.ctxPtr,_.ctxPtr)}static get PADDING_SIZE_LEN(){return 4}get PADDING_SIZE_LEN(){return 4}static get PADDING_LEN_MIN(){return 5}get PADDING_LEN_MIN(){return 5}algId(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_random_padding_alg_id(this.ctxPtr),r}produceAlgInfo(){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_random_padding_produce_alg_info(this.ctxPtr),r.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",r.FoundationInterfaceTag.ALG_INFO,r.FoundationInterface);const s=e._vscf_random_padding_restore_alg_info(this.ctxPtr,_.ctxPtr);r.FoundationError.handleStatusCode(s)}configure(_){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureClass("params",_,r.PaddingParams),e._vscf_random_padding_configure(this.ctxPtr,_.ctxPtr)}paddedDataLen(r){let _;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureNumber("dataLen",r),_=e._vscf_random_padding_padded_data_len(this.ctxPtr,r),_}len(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_random_padding_len(this.ctxPtr),r}lenMax(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_random_padding_len_max(this.ctxPtr),r}startDataProcessing(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_data_processing(this.ctxPtr)}processData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);try{e._vscf_random_padding_process_data(this.ctxPtr,c)}finally{e._free(s),e._free(c)}}finishDataProcessing(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.len(),s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_random_padding_finish_data_processing(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}startPaddedDataProcessing(){t.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_padded_data_processing(this.ctxPtr)}processPaddedData(r){t.ensureNotNull("this.ctxPtr",this.ctxPtr),t.ensureByteArray("data",r);const _=r.length*r.BYTES_PER_ELEMENT,s=e._malloc(_);e.HEAP8.set(r,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,_);const i=r.length,a=e._vsc_buffer_new_with_capacity(i);try{e._vscf_random_padding_process_padded_data(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)}}finishPaddedDataProcessingOutLen(){let r;return t.ensureNotNull("this.ctxPtr",this.ctxPtr),r=e._vscf_random_padding_finish_padded_data_processing_out_len(this.ctxPtr),r}finishPaddedDataProcessing(){t.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.finishPaddedDataProcessingOutLen(),s=e._vsc_buffer_new_with_capacity(_);try{const t=e._vscf_random_padding_finish_padded_data_processing(this.ctxPtr,s);r.FoundationError.handleStatusCode(t);const _=e._vsc_buffer_bytes(s),n=e._vsc_buffer_len(s);return e.HEAPU8.slice(_,_+n)}finally{e._vsc_buffer_delete(s)}}}return _}}();return wr=r=>new Promise((_,s)=>{t(r).then(t=>{const r={};r.FoundationInterfaceTag=e(t,r),r.FoundationInterface=g(t,r),r.FoundationImplTag=N(t,r),r.FoundationError=kr(t,r),r.Asn1Tag=Cr(t,r),r.AlgId=Fr(t,r),r.OidId=Tr(t,r),r.GroupMsgType=Kr(t,r),r.CipherState=Sr(t,r),r.Oid=zr(t,r),r.Base64=Lr(t,r),r.Pem=Rr(t,r),r.MessageInfo=Br(t,r),r.KeyRecipientInfo=Yr(t,r),r.KeyRecipientInfoList=Hr(t,r),r.PasswordRecipientInfo=Ur(t,r),r.PasswordRecipientInfoList=Mr(t,r),r.AlgFactory=Dr(t,r),r.KeyAlgFactory=Or(t,r),r.Ecies=Gr(t,r),r.RecipientCipher=Vr(t,r),r.MessageInfoCustomParams=qr(t,r),r.KeyProvider=jr(t,r),r.Signer=Xr(t,r),r.Verifier=Wr(t,r),r.BrainkeyClient=Zr(t,r),r.BrainkeyServer=$r(t,r),r.GroupSessionMessage=Qr(t,r),r.GroupSessionTicket=Jr(t,r),r.GroupSession=t_(t,r),r.MessageInfoEditor=e_(t,r),r.SignerInfo=r_(t,r),r.SignerInfoList=__(t,r),r.MessageInfoFooter=s_(t,r),r.SignedDataInfo=n_(t,r),r.FooterInfo=c_(t,r),r.KeyInfo=i_(t,r),r.PaddingParams=a_(t,r),r.Sha224=o_(t,r),r.Sha256=l_(t,r),r.Sha384=u_(t,r),r.Sha512=f_(t,r),r.Aes256Gcm=d_(t,r),r.Aes256Cbc=h_(t,r),r.Asn1rd=P_(t,r),r.Asn1wr=v_(t,r),r.RsaPublicKey=x_(t,r),r.RsaPrivateKey=y_(t,r),r.Rsa=p_(t,r),r.EccPublicKey=g_(t,r),r.EccPrivateKey=m_(t,r),r.Ecc=N_(t,r),r.EntropyAccumulator=I_(t,r),r.CtrDrbg=E_(t,r),r.Hmac=w_(t,r),r.Hkdf=b_(t,r),r.Kdf1=k_(t,r),r.Kdf2=A_(t,r),r.FakeRandom=C_(t,r),r.Pkcs5Pbkdf2=F_(t,r),r.Pkcs5Pbes2=T_(t,r),r.SeedEntropySource=K_(t,r),r.KeyMaterialRng=S_(t,r),r.RawPublicKey=z_(t,r),r.RawPrivateKey=L_(t,r),r.Pkcs8Serializer=R_(t,r),r.Sec1Serializer=B_(t,r),r.KeyAsn1Serializer=Y_(t,r),r.KeyAsn1Deserializer=H_(t,r),r.Ed25519=U_(t,r),r.Curve25519=M_(t,r),r.Falcon=D_(t,r),r.Round5=O_(t,r),r.CompoundKeyAlgInfo=G_(t,r),r.CompoundPublicKey=V_(t,r),r.CompoundPrivateKey=q_(t,r),r.CompoundKeyAlg=j_(t,r),r.HybridKeyAlgInfo=X_(t,r),r.HybridPublicKey=W_(t,r),r.HybridPrivateKey=Z_(t,r),r.HybridKeyAlg=$_(t,r),r.SimpleAlgInfo=Q_(t,r),r.HashBasedAlgInfo=J_(t,r),r.CipherAlgInfo=ts(t,r),r.SaltedKdfAlgInfo=es(t,r),r.PbeAlgInfo=rs(t,r),r.EccAlgInfo=_s(t,r),r.AlgInfoDerSerializer=ss(t,r),r.AlgInfoDerDeserializer=ns(t,r),r.MessageInfoDerSerializer=cs(t,r),r.RandomPadding=is(t,r),_(r)}).catch(t=>{s(t)})})}(),Fr=t(Cr);export{Fr as default};
1
+ function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,_,r,s,n,c,i,a,o,l,f,u,d,v,h,p,y,P,x,g={exports:{}};function m(){return t||(t=1,e=g,_="undefined"!=typeof document?document.currentScript?.src:void 0,r=async function(e={}){var t,r,s,n,c=e,i=new Promise((e,_)=>{t=e,r=_}),a=Object.assign({},c),o="";o=self.location.href,_&&(o=_),o=o.startsWith("blob:")?"":o.slice(0,o.replace(/[?#].*/,"").lastIndexOf("/")+1),n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},s=async e=>{if((e=await fetch(e,{credentials:"same-origin"})).ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)};var l=c.print||console.log.bind(console),f=c.printErr||console.error.bind(console);Object.assign(c,a),a=null;var u,d,v,h,p,y,P,x=c.wasmBinary,g=!1;function m(){var e=u.buffer;c.HEAP8=d=new Int8Array(e),c.HEAP16=h=new Int16Array(e),c.HEAPU8=v=new Uint8Array(e),c.HEAPU16=new Uint16Array(e),c.HEAP32=p=new Int32Array(e),c.HEAPU32=y=new Uint32Array(e),c.HEAPF32=new Float32Array(e),c.HEAPF64=new Float64Array(e),c.HEAP64=P=new BigInt64Array(e),c.HEAPU64=new BigUint64Array(e)}var k,N=0,w=null;function I(e){throw c.onAbort?.(e),f(e="Aborted("+e+")"),g=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),r(e),e}async function E(e,t){try{var _=await async function(e){if(!x)try{var t=await s(e);return new Uint8Array(t)}catch{}if(e==k&&x)e=new Uint8Array(x);else{if(!n)throw"both async and sync fetching of the wasm failed";e=n(e)}return e}(e);return await WebAssembly.instantiate(_,t)}catch(e){f(`failed to asynchronously prepare wasm: ${e}`),I(e)}}var b=e=>{for(;0<e.length;)e.shift()(c)},A=[],C=[],F=()=>{var e=c.preRun.shift();C.unshift(e)},T=()=>{var e=p[+Ne>>2];return Ne+=4,e},K=(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},z=e=>{var t="/"===e.charAt(0),_="/"===e.slice(-1);return(e=K(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&_&&(e+="/"),(t?"/":"")+e},S=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&=t.slice(0,-1),e+t):"."},L=e=>{(L=e=>crypto.getRandomValues(e))(e)},R="undefined"!=typeof TextDecoder?new TextDecoder:void 0,B=(e,t=0)=>{for(var _=t+NaN,r=t;e[r]&&!(r>=_);)++r;if(16<r-t&&e.buffer&&R)return R.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 _},Y=[],H=[];function U(e,t){H[e]={input:[],At:[],Gt:t},ve(e,M)}var M={open(e){var t=H[e.node.Rt];if(!t)throw new ee(43);e.xt=t,e.seekable=!1},close(e){e.xt.Gt.Ot(e.xt)},Ot(e){e.xt.Gt.Ot(e.xt)},read(e,t,_,r){if(!e.xt||!e.xt.Gt.bu)throw new ee(60);for(var s=0,n=0;n<r;n++){try{var c=e.xt.Gt.bu(e.xt)}catch(e){throw new ee(29)}if(void 0===c&&0===s)throw new ee(6);if(null==c)break;s++,t[_+n]=c}return s&&(e.node.Kt=Date.now()),s},write(e,t,_,r){if(!e.xt||!e.xt.Gt.Xt)throw new ee(60);try{for(var s=0;s<r;s++)e.xt.Gt.Xt(e.xt,t[_+s])}catch(e){throw new ee(29)}return r&&(e.node.Bt=e.node.zt=Date.now()),s}},D={bu:()=>Y.length?Y.shift():null,Xt(e,t){null===t||10===t?(l(B(e.At)),e.At=[]):0!=t&&e.At.push(t)},Ot(e){0<e.At?.length&&(l(B(e.At)),e.At=[])},lu:()=>({vu:25856,xu:5,uu:191,wu:35387,tu:[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]}),mu:()=>0,nu:()=>[24,80]},O={Xt(e,t){null===t||10===t?(f(B(e.At)),e.At=[]):0!=t&&e.At.push(t)},Ot(e){0<e.At?.length&&(f(B(e.At)),e.At=[])}};function G(e,t){var _=e.vt?e.vt.length:0;_>=t||(t=Math.max(t,_*(1048576>_?2:1.125)>>>0),0!=_&&(t=Math.max(t,256)),_=e.vt,e.vt=new Uint8Array(t),0<e.yt&&e.vt.set(_.subarray(0,e.yt),0))}var V={Dt:null,Ft:()=>V.createNode(null,"/",16895,0),createNode(e,t,_,r){if(24576==(61440&_)||4096==(61440&_))throw new ee(63);return V.Dt||(V.Dt={dir:{node:{Jt:V.wt.Jt,Et:V.wt.Et,Mt:V.wt.Mt,Pt:V.wt.Pt,gu:V.wt.gu,iu:V.wt.iu,hu:V.wt.hu,Yt:V.wt.Yt,St:V.wt.St},stream:{Ct:V.ut.Ct}},file:{node:{Jt:V.wt.Jt,Et:V.wt.Et},stream:{Ct:V.ut.Ct,read:V.ut.read,write:V.ut.write,Zt:V.ut.Zt,du:V.ut.du,fu:V.ut.fu}},link:{node:{Jt:V.wt.Jt,Et:V.wt.Et,Nt:V.wt.Nt},stream:{}},$t:{node:{Jt:V.wt.Jt,Et:V.wt.Et},stream:de}}),16384==(61440&(_=ce(e,t,_,r)).mode)?(_.wt=V.Dt.dir.node,_.ut=V.Dt.dir.stream,_.vt={}):32768==(61440&_.mode)?(_.wt=V.Dt.file.node,_.ut=V.Dt.file.stream,_.yt=0,_.vt=null):40960==(61440&_.mode)?(_.wt=V.Dt.link.node,_.ut=V.Dt.link.stream):8192==(61440&_.mode)&&(_.wt=V.Dt.$t.node,_.ut=V.Dt.$t.stream),_.Kt=_.Bt=_.zt=Date.now(),e&&(e.vt[t]=_,e.Kt=e.Bt=e.zt=_.Kt),_},Bu:e=>e.vt?e.vt.subarray?e.vt.subarray(0,e.yt):new Uint8Array(e.vt):new Uint8Array(0),wt:{Jt(e){var t={};return t.yu=8192==(61440&e.mode)?e.id:1,t.Du=e.id,t.mode=e.mode,t.Eu=1,t.uid=0,t.Cu=0,t.Rt=e.Rt,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.yt:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.Kt=new Date(e.Kt),t.Bt=new Date(e.Bt),t.zt=new Date(e.zt),t.ju=4096,t.su=Math.ceil(t.size/t.ju),t},Et(e,t){for(var _ of["mode","atime","mtime","ctime"])null!=t[_]&&(e[_]=t[_]);void 0!==t.size&&(t=t.size,e.yt!=t&&(0==t?(e.vt=null,e.yt=0):(_=e.vt,e.vt=new Uint8Array(t),_&&e.vt.set(_.subarray(0,Math.min(t,e.yt))),e.yt=t)))},Mt(){throw V.au},Pt:(e,t,_,r)=>V.createNode(e,t,_,r),gu(e,t,_){try{var r=ne(t,_)}catch(e){}if(r){if(16384==(61440&e.mode))for(var s in r.vt)throw new ee(55);if(s=se(r.parent.id,r.name),Z[s]===r)Z[s]=r.Lt;else for(s=Z[s];s;){if(s.Lt===r){s.Lt=r.Lt;break}s=s.Lt}}delete e.parent.vt[e.name],t.vt[_]=e,e.name=_,t.zt=t.Bt=e.parent.zt=e.parent.Bt=Date.now()},iu(e,t){delete e.vt[t],e.zt=e.Bt=Date.now()},hu(e,t){var _,r=ne(e,t);for(_ in r.vt)throw new ee(55);delete e.vt[t],e.zt=e.Bt=Date.now()},Yt:e=>[".","..",...Object.keys(e.vt)],St:(e,t,_)=>((e=V.createNode(e,t,41471,0)).link=_,e),Nt(e){if(40960!=(61440&e.mode))throw new ee(28);return e.link}},ut:{read(e,t,_,r,s){var n=e.node.vt;if(s>=e.node.yt)return 0;if(8<(e=Math.min(e.node.yt-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).Bt=e.zt=Date.now(),t.subarray&&(!e.vt||e.vt.subarray)){if(n)return e.vt=t.subarray(_,_+r),e.yt=r;if(0===e.yt&&0===s)return e.vt=t.slice(_,_+r),e.yt=r;if(s+r<=e.yt)return e.vt.set(t.subarray(_,_+r),s),r}if(G(e,s+r),e.vt.subarray&&t.subarray)e.vt.set(t.subarray(_,_+r),s);else for(n=0;n<r;n++)e.vt[s+n]=t[_+n];return e.yt=Math.max(e.yt,s+r),r},Ct(e,t,_){if(1===_?t+=e.position:2===_&&32768==(61440&e.node.mode)&&(t+=e.node.yt),0>t)throw new ee(28);return t},Zt(e,t,_){G(e.node,t+_),e.node.yt=Math.max(e.node.yt,t+_)},du(e,t,_,r,s){if(32768!=(61440&e.node.mode))throw new ee(43);if(e=e.node.vt,2&s||!e||e.buffer!==d.buffer){if(r=!0,I(),!(s=void 0))throw new ee(48);e&&((0<_||_+t<e.length)&&(e=e.subarray?e.subarray(_,_+t):Array.prototype.slice.call(e,_,_+t)),d.set(e,s))}else r=!1,s=e.byteOffset;return{Gu:s,ru:r}},fu:(e,t,_,r)=>(V.ut.write(e,t,0,r,_,!1),0)}},q=null,j={},X=[],W=1,Z=null,$=!1,Q=!0,J={},ee=class{name="ErrnoError";constructor(e){this.Ht=e}},te=class{Tt={};node=null;get flags(){return this.Tt.flags}set flags(e){this.Tt.flags=e}get position(){return this.Tt.position}set position(e){this.Tt.position=e}},_e=class{wt={};ut={};Qt=null;constructor(e,t,_,r){e||=this,this.parent=e,this.Ft=e.Ft,this.id=W++,this.name=t,this.mode=_,this.Rt=r,this.Kt=this.Bt=this.zt=Date.now()}get read(){return!(365&~this.mode)}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(e){e?this.mode|=146:this.mode&=-147}};function re(e,t={}){if(!e)throw new ee(44);t.Vt??(t.Vt=!0),"/"===e.charAt(0)||(e="//"+e);var _=0;e:for(;40>_;_++){e=e.split("/").filter(e=>!!e);for(var r=q,s="/",n=0;n<e.length;n++){var c=n===e.length-1;if(c&&t.parent)break;if("."!==e[n])if(".."===e[n])s=S(s),r=r.parent;else{s=z(s+"/"+e[n]);try{r=ne(r,e[n])}catch(e){if(44===e?.Ht&&c&&t.pu)return{path:s};throw e}if(!r.Qt||c&&!t.Vt||(r=r.Qt.root),40960==(61440&r.mode)&&(!c||t.Ut)){if(!r.wt.Nt)throw new ee(52);"/"===(r=r.wt.Nt(r)).charAt(0)||(r=S(s)+"/"+r),e=r+"/"+e.slice(n+1).join("/");continue e}}}return{path:s,node:r}}throw new ee(32)}function se(e,t){for(var _=0,r=0;r<t.length;r++)_=(_<<5)-_+t.charCodeAt(r)|0;return(e+_>>>0)%Z.length}function ne(e,t){var _=16384==(61440&e.mode)?(_=ae(e,"x"))?_:e.wt.Mt?0:2:54;if(_)throw new ee(_);for(_=Z[se(e.id,t)];_;_=_.Lt){var r=_.name;if(_.parent.id===e.id&&r===t)return _}return e.wt.Mt(e,t)}function ce(e,t,_,r){return t=se((e=new _e(e,t,_,r)).parent.id,e.name),e.Lt=Z[t],Z[t]=e}function ie(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function ae(e,t){return Q?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function oe(e,t){if(16384!=(61440&e.mode))return 54;try{return ne(e,t),20}catch(e){}return ae(e,"wx")}function le(e){if(!(e=X[e]))throw new ee(8);return e}function fe(e,t=-1){if(e=Object.assign(new te,e),-1==t)e:{for(t=0;4096>=t;t++)if(!X[t])break e;throw new ee(33)}return e.It=t,X[t]=e}function ue(e,t){var _=void 0,r=_?null:e;if(_??=e.wt.Et,!_)throw new ee(63);_(r,t)}var de={open(e){e.ut=j[e.node.Rt].ut,e.ut.open?.(e)},Ct(){throw new ee(70)}};function ve(e,t){j[e]={ut:t}}function he(e,t){var _="/"===t;if(_&&q)throw new ee(10);if(!_&&t){var r=re(t,{Vt:!1});if(t=r.path,(r=r.node).Qt)throw new ee(10);if(16384!=(61440&r.mode))throw new ee(54)}t={type:e,Fu:{},eu:t,ou:[]},(e=e.Ft(t)).Ft=t,t.root=e,_?q=e:r&&(r.Qt=t,r.Ft&&r.Ft.ou.push(t))}function pe(e,t,_){var r=re(e,{parent:!0}).node;if(!(e=e&&e.match(/([^\/]+|\/)\/*$/)[1]))throw new ee(28);if("."===e||".."===e)throw new ee(20);var s=oe(r,e);if(s)throw new ee(s);if(!r.wt.Pt)throw new ee(63);return r.wt.Pt(r,e,t,_)}function ye(e){return pe(e,16895,0)}function Pe(e,t,_){void 0===_&&(_=t,t=438),pe(e,8192|t,_)}function xe(e,t){if(!((...e)=>{for(var t="",_=!1,r=e.length-1;-1<=r&&!_;r--){if("string"!=typeof(_=0<=r?e[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!_)return"";t=_+"/"+t,_="/"===_.charAt(0)}return(_?"/":"")+(t=K(t.split("/").filter(e=>!!e),!_).join("/"))||"."})(e))throw new ee(44);var _=re(t,{parent:!0}).node;if(!_)throw new ee(44);var r=oe(_,t=t&&t.match(/([^\/]+|\/)\/*$/)[1]);if(r)throw new ee(r);if(!_.wt.St)throw new ee(63);_.wt.St(_,t,e)}function ge(e,t,_=438){if(""===e)throw new ee(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&_|32768:0,"object"==typeof e)r=e;else{var s=e.endsWith("/");r=(e=re(e,{Ut:!(131072&t),pu:!0})).node,e=e.path}var n=!1;if(64&t)if(r){if(128&t)throw new ee(20)}else{if(s)throw new ee(31);r=pe(e,511|_,0),n=!0}if(!r)throw new ee(44);if(8192==(61440&r.mode)&&(t&=-513),65536&t&&16384!=(61440&r.mode))throw new ee(54);if(!n&&(s=r?40960==(61440&r.mode)?32:16384==(61440&r.mode)&&("r"!==ie(t)||576&t)?31:ae(r,ie(t)):44))throw new ee(s);if(512&t&&!n){if(16384==(61440&(s="string"==typeof(s=r)?re(s,{Ut:!0}).node:s).mode))throw new ee(31);if(32768!=(61440&s.mode))throw new ee(28);var i=ae(s,"w");if(i)throw new ee(i);ue(s,{size:0,timestamp:Date.now()})}t&=-131713;e:for(s=r;;){if(s===s.parent){s=s.Ft.eu;var a=a?"/"!==s[s.length-1]?`${s}/${a}`:s+a:s;break e}a=a?`${s.name}/${a}`:s.name,s=s.parent}return(a=fe({node:r,path:a,flags:t,seekable:!0,position:0,ut:r.ut,qu:[],error:!1})).ut.open&&a.ut.open(a),n&&(_&=511,ue(r="string"==typeof r?re(r,{Ut:!0}).node:r,{mode:4095&_|-4096&r.mode,zt:Date.now(),zu:void 0})),!c.logReadFiles||1&t||e in J||(J[e]=1),a}function me(e,t,_){if(null===e.It)throw new ee(8);if(!e.seekable||!e.ut.Ct)throw new ee(70);if(0!=_&&1!=_&&2!=_)throw new ee(28);e.position=e.ut.Ct(e,t,_),e.qu=[]}function ke(e,t,_){e=z("/dev/"+e);var r=((e,t)=>{var _=0;return e&&(_|=365),t&&(_|=146),_})(!!t,!!_);ke.cu??(ke.cu=64);var s=ke.cu++<<8;ve(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 ee(29)}if(void 0===i&&0===n)throw new ee(6);if(null==i)break;n++,_[r+c]=i}return n&&(e.node.Kt=Date.now()),n},write(e,t,r,s){for(var n=0;n<s;n++)try{_(t[r+n])}catch(e){throw new ee(29)}return s&&(e.node.Bt=e.node.zt=Date.now()),n}}),Pe(e,r,s)}var Ne=void 0;Z=Array(4096),he(V,"/"),ye("/tmp"),ye("/home"),ye("/home/web_user"),function(){ye("/dev"),ve(259,{read:()=>0,write:(e,t,_,r)=>r,Ct:()=>0}),Pe("/dev/null",259),U(1280,D),U(1536,O),Pe("/dev/tty",1280),Pe("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,_=()=>(0===t&&(L(e),t=e.byteLength),e[--t]);ke("random",_),ke("urandom",_),ye("/dev/shm"),ye("/dev/shm/tmp")}(),function(){ye("/proc");var e=ye("/proc/self");ye("/proc/self/fd"),he({Ft(){var t=ce(e,"fd",16895,73);return t.ut={Ct:V.ut.Ct},t.wt={Mt(e,t){var _=le(e=+t);return(e={parent:null,Ft:{eu:"fake"},wt:{Nt:()=>_.path},id:e+1}).parent=e},Yt:()=>Array.from(X.entries()).filter(([,e])=>e).map(([e])=>e.toString())},t}},"/proc/self/fd")}(),V.au=new ee(44),V.au.stack="<generic error, no stack>";var we,Ie={b:function(e,t,_){Ne=_;try{var r=le(e);switch(t){case 0:var s=T();if(0>s)break;for(;X[s];)s++;return function(e,t=-1){return e=fe(e,t),e.ut?.Au?.(e),e}(r,s).It;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:return s=T(),r.flags|=s,0;case 12:return s=T(),h[s+0>>1]=2,0}return-28}catch(e){if("ErrnoError"!==e.name)throw e;return-e.Ht}},f:function(e,t,_){Ne=_;try{var r=le(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return r.xt?0:-59;case 21505:if(!r.xt)return-59;if(r.xt.Gt.lu){e=[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=T();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]=e[n]||0}return 0;case 21506:case 21507:case 21508:if(!r.xt)return-59;if(r.xt.Gt.mu)for(s=T(),e=[],n=0;32>n;n++)e.push(d[s+n+17]);return 0;case 21519:return r.xt?(s=T(),p[s>>2]=0):-59;case 21520:return r.xt?-28:-59;case 21531:if(s=T(),!r.ut.ku)throw new ee(59);return r.ut.ku(r,t,s);case 21523:return r.xt?(r.xt.Gt.nu&&(n=[24,80],s=T(),h[s>>1]=n[0],h[s+2>>1]=n[1]),0):-59;default:return-28}}catch(e){if("ErrnoError"!==e.name)throw e;return-e.Ht}},g:function(e,t,_,r){Ne=r;try{var s=t=t?B(v,t):"";if("/"===s.charAt(0))t=s;else{var n=-100===e?"/":le(e).path;if(0==s.length)throw new ee(44);t=n+"/"+s}return ge(t,_,r?T():0).It}catch(e){if("ErrnoError"!==e.name)throw e;return-e.Ht}},i:()=>I(""),h:e=>{var t=v.length;if(2147483648<(e>>>=0))return!1;for(var _=1;4>=_;_*=2){var r=t*(1+.2/_);r=Math.min(r,e+100663296);e:{r=(Math.min(2147483648,65536*Math.ceil(Math.max(e,r)/65536))-u.buffer.byteLength+65535)/65536|0;try{u.grow(r),m();var s=1;break e}catch(e){}s=void 0}if(s)return!0}return!1},a:function(e){try{var t=le(e);if(null===t.It)throw new ee(8);t.Wt&&(t.Wt=null);try{t.ut.close&&t.ut.close(t)}catch(e){throw e}finally{X[t.It]=null}return t.It=null,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.Ht}},d:function(e,t,_,r){try{e:{var s=le(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=n,f=d;if(0>a||0>l)throw new ee(28);if(null===o.It)throw new ee(8);if(1==(2097155&o.flags))throw new ee(8);if(16384==(61440&o.node.mode))throw new ee(31);if(!o.ut.read)throw new ee(28);var u=void 0!==l;if(u){if(!o.seekable)throw new ee(70)}else l=o.position;var v=o.ut.read(o,f,i,a,l);u||(o.position+=v);var h=v;if(0>h){var p=-1;break e}if(t+=h,h<a)break;void 0!==n&&(n+=h)}p=t}return y[r>>2]=p,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.Ht}},e:function(e,t,_,r){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t);try{if(isNaN(t))return 61;var s=le(e);return me(s,t,_),P[r>>3]=BigInt(s.position),s.Wt&&0===t&&0===_&&(s.Wt=null),0}catch(e){if("ErrnoError"!==e.name)throw e;return e.Ht}},c:function(e,t,_,r){try{e:{var s=le(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,v=d;if(0>f||0>u)throw new ee(28);if(null===o.It)throw new ee(8);if(!(2097155&o.flags))throw new ee(8);if(16384==(61440&o.node.mode))throw new ee(31);if(!o.ut.write)throw new ee(28);o.seekable&&1024&o.flags&&me(o,0,2);var h=void 0!==u;if(h){if(!o.seekable)throw new ee(70)}else u=o.position;var p=o.ut.write(o,v,l,f,u,void 0);h||(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("ErrnoError"!==e.name)throw e;return e.Ht}}};if(async function(){function e(e){return we=e.exports,u=we.j,m(),N--,c.monitorRunDependencies?.(N),0==N&&w&&(e=w,w=null,e()),we}N++,c.monitorRunDependencies?.(N);var t={a:Ie};if(c.instantiateWasm)return new Promise(_=>{c.instantiateWasm(t,(t,r)=>{e(t),_(t.exports)})});k??=c.locateFile?c.locateFile("libfoundation.worker.wasm",o):o+"libfoundation.worker.wasm";try{var _=await async function(e){var t=k;if(!x&&"function"==typeof WebAssembly.instantiateStreaming)try{var _=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(_,e)}catch(e){f(`wasm streaming compile failed: ${e}`),f("falling back to ArrayBuffer instantiation")}return E(t,e)}(t);return e(_.instance)}catch(e){return r(e),Promise.reject(e)}}(),c._vscf_impl_api=(e,t)=>(c._vscf_impl_api=we.l)(e,t),c._vscf_impl_tag=e=>(c._vscf_impl_tag=we.m)(e),c._vscf_impl_shallow_copy=e=>(c._vscf_impl_shallow_copy=we.n)(e),c._vscf_error_ctx_size=()=>(c._vscf_error_ctx_size=we.o)(),c._vscf_error_reset=e=>(c._vscf_error_reset=we.p)(e),c._vscf_error_status=e=>(c._vscf_error_status=we.q)(e),c._vscf_oid_from_alg_id=(e,t)=>(c._vscf_oid_from_alg_id=we.r)(e,t),c._vscf_oid_to_alg_id=e=>(c._vscf_oid_to_alg_id=we.s)(e),c._vscf_oid_equal=(e,t)=>(c._vscf_oid_equal=we.t)(e,t),c._vscf_oid_from_id=(e,t)=>(c._vscf_oid_from_id=we.u)(e,t),c._vscf_oid_to_id=e=>(c._vscf_oid_to_id=we.v)(e),c._vscf_oid_id_to_alg_id=e=>(c._vscf_oid_id_to_alg_id=we.w)(e),c._vscf_base64_encoded_len=e=>(c._vscf_base64_encoded_len=we.x)(e),c._vscf_base64_encode=(e,t)=>(c._vscf_base64_encode=we.y)(e,t),c._vscf_base64_decoded_len=e=>(c._vscf_base64_decoded_len=we.z)(e),c._vscf_base64_decode=(e,t)=>(c._vscf_base64_decode=we.A)(e,t),c._vscf_pem_wrapped_len=(e,t)=>(c._vscf_pem_wrapped_len=we.B)(e,t),c._vscf_pem_wrap=(e,t,_)=>(c._vscf_pem_wrap=we.C)(e,t,_),c._vscf_pem_unwrapped_len=e=>(c._vscf_pem_unwrapped_len=we.D)(e),c._vscf_pem_unwrap=(e,t)=>(c._vscf_pem_unwrap=we.E)(e,t),c._vscf_pem_title=(e,t)=>(c._vscf_pem_title=we.F)(e,t),c._vscf_message_info_new=()=>(c._vscf_message_info_new=we.G)(),c._vscf_message_info_delete=e=>(c._vscf_message_info_delete=we.H)(e),c._vscf_message_info_shallow_copy=e=>(c._vscf_message_info_shallow_copy=we.I)(e),c._vscf_message_info_data_encryption_alg_info=e=>(c._vscf_message_info_data_encryption_alg_info=we.J)(e),c._vscf_message_info_key_recipient_info_list=e=>(c._vscf_message_info_key_recipient_info_list=we.K)(e),c._vscf_message_info_password_recipient_info_list=e=>(c._vscf_message_info_password_recipient_info_list=we.L)(e),c._vscf_message_info_has_custom_params=e=>(c._vscf_message_info_has_custom_params=we.M)(e),c._vscf_message_info_custom_params=e=>(c._vscf_message_info_custom_params=we.N)(e),c._vscf_message_info_has_cipher_kdf_alg_info=e=>(c._vscf_message_info_has_cipher_kdf_alg_info=we.O)(e),c._vscf_message_info_cipher_kdf_alg_info=e=>(c._vscf_message_info_cipher_kdf_alg_info=we.P)(e),c._vscf_message_info_has_cipher_padding_alg_info=e=>(c._vscf_message_info_has_cipher_padding_alg_info=we.Q)(e),c._vscf_message_info_cipher_padding_alg_info=e=>(c._vscf_message_info_cipher_padding_alg_info=we.R)(e),c._vscf_message_info_has_footer_info=e=>(c._vscf_message_info_has_footer_info=we.S)(e),c._vscf_message_info_footer_info=e=>(c._vscf_message_info_footer_info=we.T)(e),c._vscf_message_info_clear=e=>(c._vscf_message_info_clear=we.U)(e),c._vscf_key_recipient_info_new=()=>(c._vscf_key_recipient_info_new=we.V)(),c._vscf_key_recipient_info_new_with_data=(e,t,_)=>(c._vscf_key_recipient_info_new_with_data=we.W)(e,t,_),c._vscf_key_recipient_info_delete=e=>(c._vscf_key_recipient_info_delete=we.X)(e),c._vscf_key_recipient_info_shallow_copy=e=>(c._vscf_key_recipient_info_shallow_copy=we.Y)(e),c._vscf_key_recipient_info_recipient_id=(e,t)=>(c._vscf_key_recipient_info_recipient_id=we.Z)(e,t),c._vscf_key_recipient_info_key_encryption_algorithm=e=>(c._vscf_key_recipient_info_key_encryption_algorithm=we._)(e),c._vscf_key_recipient_info_encrypted_key=(e,t)=>(c._vscf_key_recipient_info_encrypted_key=we.$)(e,t),c._vscf_key_recipient_info_list_new=()=>(c._vscf_key_recipient_info_list_new=we.aa)(),c._vscf_key_recipient_info_list_delete=e=>(c._vscf_key_recipient_info_list_delete=we.ba)(e),c._vscf_key_recipient_info_list_shallow_copy=e=>(c._vscf_key_recipient_info_list_shallow_copy=we.ca)(e),c._vscf_key_recipient_info_list_has_item=e=>(c._vscf_key_recipient_info_list_has_item=we.da)(e),c._vscf_key_recipient_info_list_item=e=>(c._vscf_key_recipient_info_list_item=we.ea)(e),c._vscf_key_recipient_info_list_has_next=e=>(c._vscf_key_recipient_info_list_has_next=we.fa)(e),c._vscf_key_recipient_info_list_next=e=>(c._vscf_key_recipient_info_list_next=we.ga)(e),c._vscf_key_recipient_info_list_has_prev=e=>(c._vscf_key_recipient_info_list_has_prev=we.ha)(e),c._vscf_key_recipient_info_list_prev=e=>(c._vscf_key_recipient_info_list_prev=we.ia)(e),c._vscf_key_recipient_info_list_clear=e=>(c._vscf_key_recipient_info_list_clear=we.ja)(e),c._vscf_password_recipient_info_new=()=>(c._vscf_password_recipient_info_new=we.ka)(),c._vscf_password_recipient_info_new_with_members=(e,t)=>(c._vscf_password_recipient_info_new_with_members=we.la)(e,t),c._vscf_password_recipient_info_delete=e=>(c._vscf_password_recipient_info_delete=we.ma)(e),c._vscf_password_recipient_info_shallow_copy=e=>(c._vscf_password_recipient_info_shallow_copy=we.na)(e),c._vscf_password_recipient_info_key_encryption_algorithm=e=>(c._vscf_password_recipient_info_key_encryption_algorithm=we.oa)(e),c._vscf_password_recipient_info_encrypted_key=(e,t)=>(c._vscf_password_recipient_info_encrypted_key=we.pa)(e,t),c._vscf_password_recipient_info_list_new=()=>(c._vscf_password_recipient_info_list_new=we.qa)(),c._vscf_password_recipient_info_list_delete=e=>(c._vscf_password_recipient_info_list_delete=we.ra)(e),c._vscf_password_recipient_info_list_shallow_copy=e=>(c._vscf_password_recipient_info_list_shallow_copy=we.sa)(e),c._vscf_password_recipient_info_list_has_item=e=>(c._vscf_password_recipient_info_list_has_item=we.ta)(e),c._vscf_password_recipient_info_list_item=e=>(c._vscf_password_recipient_info_list_item=we.ua)(e),c._vscf_password_recipient_info_list_has_next=e=>(c._vscf_password_recipient_info_list_has_next=we.va)(e),c._vscf_password_recipient_info_list_next=e=>(c._vscf_password_recipient_info_list_next=we.wa)(e),c._vscf_password_recipient_info_list_has_prev=e=>(c._vscf_password_recipient_info_list_has_prev=we.xa)(e),c._vscf_password_recipient_info_list_prev=e=>(c._vscf_password_recipient_info_list_prev=we.ya)(e),c._vscf_password_recipient_info_list_clear=e=>(c._vscf_password_recipient_info_list_clear=we.za)(e),c._vscf_alg_factory_create_hash_from_info=e=>(c._vscf_alg_factory_create_hash_from_info=we.Aa)(e),c._vscf_alg_factory_create_mac_from_info=e=>(c._vscf_alg_factory_create_mac_from_info=we.Ba)(e),c._vscf_alg_factory_create_kdf_from_info=e=>(c._vscf_alg_factory_create_kdf_from_info=we.Ca)(e),c._vscf_alg_factory_create_salted_kdf_from_info=e=>(c._vscf_alg_factory_create_salted_kdf_from_info=we.Da)(e),c._vscf_alg_factory_create_cipher_from_info=e=>(c._vscf_alg_factory_create_cipher_from_info=we.Ea)(e),c._vscf_alg_factory_create_padding_from_info=(e,t)=>(c._vscf_alg_factory_create_padding_from_info=we.Fa)(e,t),c._vscf_key_alg_factory_create_from_alg_id=(e,t,_)=>(c._vscf_key_alg_factory_create_from_alg_id=we.Ga)(e,t,_),c._vscf_key_alg_factory_create_from_key=(e,t,_)=>(c._vscf_key_alg_factory_create_from_key=we.Ha)(e,t,_),c._vscf_key_alg_factory_create_from_raw_public_key=(e,t,_)=>(c._vscf_key_alg_factory_create_from_raw_public_key=we.Ia)(e,t,_),c._vscf_key_alg_factory_create_from_raw_private_key=(e,t,_)=>(c._vscf_key_alg_factory_create_from_raw_private_key=we.Ja)(e,t,_),c._vscf_ecies_release_random=e=>(c._vscf_ecies_release_random=we.Ka)(e),c._vscf_ecies_release_cipher=e=>(c._vscf_ecies_release_cipher=we.La)(e),c._vscf_ecies_release_mac=e=>(c._vscf_ecies_release_mac=we.Ma)(e),c._vscf_ecies_release_kdf=e=>(c._vscf_ecies_release_kdf=we.Na)(e),c._vscf_ecies_release_ephemeral_key=e=>(c._vscf_ecies_release_ephemeral_key=we.Oa)(e),c._vscf_ecies_new=()=>(c._vscf_ecies_new=we.Pa)(),c._vscf_ecies_delete=e=>(c._vscf_ecies_delete=we.Qa)(e),c._vscf_ecies_shallow_copy=e=>(c._vscf_ecies_shallow_copy=we.Ra)(e),c._vscf_ecies_use_random=(e,t)=>(c._vscf_ecies_use_random=we.Sa)(e,t),c._vscf_ecies_use_cipher=(e,t)=>(c._vscf_ecies_use_cipher=we.Ta)(e,t),c._vscf_ecies_use_mac=(e,t)=>(c._vscf_ecies_use_mac=we.Ua)(e,t),c._vscf_ecies_use_kdf=(e,t)=>(c._vscf_ecies_use_kdf=we.Va)(e,t),c._vscf_ecies_use_ephemeral_key=(e,t)=>(c._vscf_ecies_use_ephemeral_key=we.Wa)(e,t),c._vscf_ecies_set_key_alg=(e,t)=>(c._vscf_ecies_set_key_alg=we.Xa)(e,t),c._vscf_ecies_release_key_alg=e=>(c._vscf_ecies_release_key_alg=we.Ya)(e),c._vscf_ecies_setup_defaults=e=>(c._vscf_ecies_setup_defaults=we.Za)(e),c._vscf_ecies_setup_defaults_no_random=e=>(c._vscf_ecies_setup_defaults_no_random=we._a)(e),c._vscf_ecies_encrypted_len=(e,t,_)=>(c._vscf_ecies_encrypted_len=we.$a)(e,t,_),c._vscf_ecies_encrypt=(e,t,_,r)=>(c._vscf_ecies_encrypt=we.ab)(e,t,_,r),c._vscf_ecies_decrypted_len=(e,t,_)=>(c._vscf_ecies_decrypted_len=we.bb)(e,t,_),c._vscf_ecies_decrypt=(e,t,_,r)=>(c._vscf_ecies_decrypt=we.cb)(e,t,_,r),c._vscf_recipient_cipher_release_random=e=>(c._vscf_recipient_cipher_release_random=we.db)(e),c._vscf_recipient_cipher_release_encryption_cipher=e=>(c._vscf_recipient_cipher_release_encryption_cipher=we.eb)(e),c._vscf_recipient_cipher_release_encryption_padding=e=>(c._vscf_recipient_cipher_release_encryption_padding=we.fb)(e),c._vscf_recipient_cipher_release_padding_params=e=>(c._vscf_recipient_cipher_release_padding_params=we.gb)(e),c._vscf_recipient_cipher_release_signer_hash=e=>(c._vscf_recipient_cipher_release_signer_hash=we.hb)(e),c._vscf_recipient_cipher_new=()=>(c._vscf_recipient_cipher_new=we.ib)(),c._vscf_recipient_cipher_delete=e=>(c._vscf_recipient_cipher_delete=we.jb)(e),c._vscf_recipient_cipher_shallow_copy=e=>(c._vscf_recipient_cipher_shallow_copy=we.kb)(e),c._vscf_recipient_cipher_use_random=(e,t)=>(c._vscf_recipient_cipher_use_random=we.lb)(e,t),c._vscf_recipient_cipher_use_encryption_cipher=(e,t)=>(c._vscf_recipient_cipher_use_encryption_cipher=we.mb)(e,t),c._vscf_recipient_cipher_use_encryption_padding=(e,t)=>(c._vscf_recipient_cipher_use_encryption_padding=we.nb)(e,t),c._vscf_recipient_cipher_use_padding_params=(e,t)=>(c._vscf_recipient_cipher_use_padding_params=we.ob)(e,t),c._vscf_recipient_cipher_use_signer_hash=(e,t)=>(c._vscf_recipient_cipher_use_signer_hash=we.pb)(e,t),c._vscf_recipient_cipher_has_key_recipient=(e,t)=>(c._vscf_recipient_cipher_has_key_recipient=we.qb)(e,t),c._vscf_recipient_cipher_add_key_recipient=(e,t,_)=>(c._vscf_recipient_cipher_add_key_recipient=we.rb)(e,t,_),c._vscf_recipient_cipher_clear_recipients=e=>(c._vscf_recipient_cipher_clear_recipients=we.sb)(e),c._vscf_recipient_cipher_add_signer=(e,t,_)=>(c._vscf_recipient_cipher_add_signer=we.tb)(e,t,_),c._vscf_recipient_cipher_clear_signers=e=>(c._vscf_recipient_cipher_clear_signers=we.ub)(e),c._vscf_recipient_cipher_custom_params=e=>(c._vscf_recipient_cipher_custom_params=we.vb)(e),c._vscf_recipient_cipher_start_encryption=e=>(c._vscf_recipient_cipher_start_encryption=we.wb)(e),c._vscf_recipient_cipher_start_signed_encryption=(e,t)=>(c._vscf_recipient_cipher_start_signed_encryption=we.xb)(e,t),c._vscf_recipient_cipher_message_info_len=e=>(c._vscf_recipient_cipher_message_info_len=we.yb)(e),c._vscf_recipient_cipher_pack_message_info=(e,t)=>(c._vscf_recipient_cipher_pack_message_info=we.zb)(e,t),c._vscf_recipient_cipher_encryption_out_len=(e,t)=>(c._vscf_recipient_cipher_encryption_out_len=we.Ab)(e,t),c._vscf_recipient_cipher_message_info_footer_len=e=>(c._vscf_recipient_cipher_message_info_footer_len=we.Bb)(e),c._vscf_recipient_cipher_process_encryption=(e,t,_)=>(c._vscf_recipient_cipher_process_encryption=we.Cb)(e,t,_),c._vscf_recipient_cipher_finish_encryption=(e,t)=>(c._vscf_recipient_cipher_finish_encryption=we.Db)(e,t),c._vscf_recipient_cipher_start_decryption_with_key=(e,t,_,r)=>(c._vscf_recipient_cipher_start_decryption_with_key=we.Eb)(e,t,_,r),c._vscf_recipient_cipher_start_verified_decryption_with_key=(e,t,_,r,s)=>(c._vscf_recipient_cipher_start_verified_decryption_with_key=we.Fb)(e,t,_,r,s),c._vscf_recipient_cipher_decryption_out_len=(e,t)=>(c._vscf_recipient_cipher_decryption_out_len=we.Gb)(e,t),c._vscf_recipient_cipher_process_decryption=(e,t,_)=>(c._vscf_recipient_cipher_process_decryption=we.Hb)(e,t,_),c._vscf_recipient_cipher_finish_decryption=(e,t)=>(c._vscf_recipient_cipher_finish_decryption=we.Ib)(e,t),c._vscf_recipient_cipher_is_data_signed=e=>(c._vscf_recipient_cipher_is_data_signed=we.Jb)(e),c._vscf_recipient_cipher_signer_infos=e=>(c._vscf_recipient_cipher_signer_infos=we.Kb)(e),c._vscf_recipient_cipher_verify_signer_info=(e,t,_)=>(c._vscf_recipient_cipher_verify_signer_info=we.Lb)(e,t,_),c._vscf_recipient_cipher_pack_message_info_footer=(e,t)=>(c._vscf_recipient_cipher_pack_message_info_footer=we.Mb)(e,t),c._vscf_message_info_custom_params_new=()=>(c._vscf_message_info_custom_params_new=we.Nb)(),c._vscf_message_info_custom_params_delete=e=>(c._vscf_message_info_custom_params_delete=we.Ob)(e),c._vscf_message_info_custom_params_shallow_copy=e=>(c._vscf_message_info_custom_params_shallow_copy=we.Pb)(e),c._vscf_message_info_custom_params_add_int=(e,t,_)=>(c._vscf_message_info_custom_params_add_int=we.Qb)(e,t,_),c._vscf_message_info_custom_params_add_string=(e,t,_)=>(c._vscf_message_info_custom_params_add_string=we.Rb)(e,t,_),c._vscf_message_info_custom_params_add_data=(e,t,_)=>(c._vscf_message_info_custom_params_add_data=we.Sb)(e,t,_),c._vscf_message_info_custom_params_clear=e=>(c._vscf_message_info_custom_params_clear=we.Tb)(e),c._vscf_message_info_custom_params_find_int=(e,t,_)=>(c._vscf_message_info_custom_params_find_int=we.Ub)(e,t,_),c._vscf_message_info_custom_params_find_string=(e,t,_,r)=>(c._vscf_message_info_custom_params_find_string=we.Vb)(e,t,_,r),c._vscf_message_info_custom_params_find_data=(e,t,_,r)=>(c._vscf_message_info_custom_params_find_data=we.Wb)(e,t,_,r),c._vscf_message_info_custom_params_has_params=e=>(c._vscf_message_info_custom_params_has_params=we.Xb)(e),c._vscf_key_provider_release_random=e=>(c._vscf_key_provider_release_random=we.Yb)(e),c._vscf_key_provider_new=()=>(c._vscf_key_provider_new=we.Zb)(),c._vscf_key_provider_delete=e=>(c._vscf_key_provider_delete=we._b)(e),c._vscf_key_provider_shallow_copy=e=>(c._vscf_key_provider_shallow_copy=we.$b)(e),c._vscf_key_provider_use_random=(e,t)=>(c._vscf_key_provider_use_random=we.ac)(e,t),c._vscf_key_provider_setup_defaults=e=>(c._vscf_key_provider_setup_defaults=we.bc)(e),c._vscf_key_provider_set_rsa_params=(e,t)=>(c._vscf_key_provider_set_rsa_params=we.cc)(e,t),c._vscf_key_provider_generate_private_key=(e,t,_)=>(c._vscf_key_provider_generate_private_key=we.dc)(e,t,_),c._vscf_key_provider_generate_post_quantum_private_key=(e,t)=>(c._vscf_key_provider_generate_post_quantum_private_key=we.ec)(e,t),c._vscf_key_provider_generate_compound_hybrid_private_key=(e,t,_,r,s,n)=>(c._vscf_key_provider_generate_compound_hybrid_private_key=we.fc)(e,t,_,r,s,n),c._vscf_key_provider_generate_hybrid_private_key=(e,t,_,r)=>(c._vscf_key_provider_generate_hybrid_private_key=we.gc)(e,t,_,r),c._vscf_key_provider_generate_compound_private_key=(e,t,_,r)=>(c._vscf_key_provider_generate_compound_private_key=we.hc)(e,t,_,r),c._vscf_key_provider_import_private_key=(e,t,_)=>(c._vscf_key_provider_import_private_key=we.ic)(e,t,_),c._vscf_key_provider_import_public_key=(e,t,_)=>(c._vscf_key_provider_import_public_key=we.jc)(e,t,_),c._vscf_key_provider_exported_public_key_len=(e,t)=>(c._vscf_key_provider_exported_public_key_len=we.kc)(e,t),c._vscf_key_provider_export_public_key=(e,t,_)=>(c._vscf_key_provider_export_public_key=we.lc)(e,t,_),c._vscf_key_provider_exported_private_key_len=(e,t)=>(c._vscf_key_provider_exported_private_key_len=we.mc)(e,t),c._vscf_key_provider_export_private_key=(e,t,_)=>(c._vscf_key_provider_export_private_key=we.nc)(e,t,_),c._vscf_signer_release_hash=e=>(c._vscf_signer_release_hash=we.oc)(e),c._vscf_signer_release_random=e=>(c._vscf_signer_release_random=we.pc)(e),c._vscf_signer_new=()=>(c._vscf_signer_new=we.qc)(),c._vscf_signer_delete=e=>(c._vscf_signer_delete=we.rc)(e),c._vscf_signer_shallow_copy=e=>(c._vscf_signer_shallow_copy=we.sc)(e),c._vscf_signer_use_hash=(e,t)=>(c._vscf_signer_use_hash=we.tc)(e,t),c._vscf_signer_use_random=(e,t)=>(c._vscf_signer_use_random=we.uc)(e,t),c._vscf_signer_reset=e=>(c._vscf_signer_reset=we.vc)(e),c._vscf_signer_append_data=(e,t)=>(c._vscf_signer_append_data=we.wc)(e,t),c._vscf_signer_signature_len=(e,t)=>(c._vscf_signer_signature_len=we.xc)(e,t),c._vscf_signer_sign=(e,t,_)=>(c._vscf_signer_sign=we.yc)(e,t,_),c._vscf_verifier_new=()=>(c._vscf_verifier_new=we.zc)(),c._vscf_verifier_delete=e=>(c._vscf_verifier_delete=we.Ac)(e),c._vscf_verifier_shallow_copy=e=>(c._vscf_verifier_shallow_copy=we.Bc)(e),c._vscf_verifier_reset=(e,t)=>(c._vscf_verifier_reset=we.Cc)(e,t),c._vscf_verifier_append_data=(e,t)=>(c._vscf_verifier_append_data=we.Dc)(e,t),c._vscf_verifier_verify=(e,t)=>(c._vscf_verifier_verify=we.Ec)(e,t),c._vscf_brainkey_client_release_random=e=>(c._vscf_brainkey_client_release_random=we.Fc)(e),c._vscf_brainkey_client_release_operation_random=e=>(c._vscf_brainkey_client_release_operation_random=we.Gc)(e),c._vscf_brainkey_client_new=()=>(c._vscf_brainkey_client_new=we.Hc)(),c._vscf_brainkey_client_delete=e=>(c._vscf_brainkey_client_delete=we.Ic)(e),c._vscf_brainkey_client_shallow_copy=e=>(c._vscf_brainkey_client_shallow_copy=we.Jc)(e),c._vscf_brainkey_client_use_random=(e,t)=>(c._vscf_brainkey_client_use_random=we.Kc)(e,t),c._vscf_brainkey_client_use_operation_random=(e,t)=>(c._vscf_brainkey_client_use_operation_random=we.Lc)(e,t),c._vscf_brainkey_client_setup_defaults=e=>(c._vscf_brainkey_client_setup_defaults=we.Mc)(e),c._vscf_brainkey_client_blind=(e,t,_,r)=>(c._vscf_brainkey_client_blind=we.Nc)(e,t,_,r),c._vscf_brainkey_client_deblind=(e,t,_,r,s,n)=>(c._vscf_brainkey_client_deblind=we.Oc)(e,t,_,r,s,n),c._vscf_brainkey_server_release_random=e=>(c._vscf_brainkey_server_release_random=we.Pc)(e),c._vscf_brainkey_server_release_operation_random=e=>(c._vscf_brainkey_server_release_operation_random=we.Qc)(e),c._vscf_brainkey_server_new=()=>(c._vscf_brainkey_server_new=we.Rc)(),c._vscf_brainkey_server_delete=e=>(c._vscf_brainkey_server_delete=we.Sc)(e),c._vscf_brainkey_server_shallow_copy=e=>(c._vscf_brainkey_server_shallow_copy=we.Tc)(e),c._vscf_brainkey_server_use_random=(e,t)=>(c._vscf_brainkey_server_use_random=we.Uc)(e,t),c._vscf_brainkey_server_use_operation_random=(e,t)=>(c._vscf_brainkey_server_use_operation_random=we.Vc)(e,t),c._vscf_brainkey_server_setup_defaults=e=>(c._vscf_brainkey_server_setup_defaults=we.Wc)(e),c._vscf_brainkey_server_generate_identity_secret=(e,t)=>(c._vscf_brainkey_server_generate_identity_secret=we.Xc)(e,t),c._vscf_brainkey_server_harden=(e,t,_,r)=>(c._vscf_brainkey_server_harden=we.Yc)(e,t,_,r),c._vscf_group_session_message_new=()=>(c._vscf_group_session_message_new=we.Zc)(),c._vscf_group_session_message_delete=e=>(c._vscf_group_session_message_delete=we._c)(e),c._vscf_group_session_message_shallow_copy=e=>(c._vscf_group_session_message_shallow_copy=we.$c)(e),c._vscf_group_session_message_get_type=e=>(c._vscf_group_session_message_get_type=we.ad)(e),c._vscf_group_session_message_get_session_id=(e,t)=>(c._vscf_group_session_message_get_session_id=we.bd)(e,t),c._vscf_group_session_message_get_epoch=e=>(c._vscf_group_session_message_get_epoch=we.cd)(e),c._vscf_group_session_message_serialize_len=e=>(c._vscf_group_session_message_serialize_len=we.dd)(e),c._vscf_group_session_message_serialize=(e,t)=>(c._vscf_group_session_message_serialize=we.ed)(e,t),c._vscf_group_session_message_deserialize=(e,t)=>(c._vscf_group_session_message_deserialize=we.fd)(e,t),c._vscf_group_session_ticket_release_rng=e=>(c._vscf_group_session_ticket_release_rng=we.gd)(e),c._vscf_group_session_ticket_new=()=>(c._vscf_group_session_ticket_new=we.hd)(),c._vscf_group_session_ticket_delete=e=>(c._vscf_group_session_ticket_delete=we.id)(e),c._vscf_group_session_ticket_shallow_copy=e=>(c._vscf_group_session_ticket_shallow_copy=we.jd)(e),c._vscf_group_session_ticket_use_rng=(e,t)=>(c._vscf_group_session_ticket_use_rng=we.kd)(e,t),c._vscf_group_session_ticket_setup_defaults=e=>(c._vscf_group_session_ticket_setup_defaults=we.ld)(e),c._vscf_group_session_ticket_setup_ticket_as_new=(e,t)=>(c._vscf_group_session_ticket_setup_ticket_as_new=we.md)(e,t),c._vscf_group_session_ticket_get_ticket_message=e=>(c._vscf_group_session_ticket_get_ticket_message=we.nd)(e),c._vscf_group_session_release_rng=e=>(c._vscf_group_session_release_rng=we.od)(e),c._vscf_group_session_new=()=>(c._vscf_group_session_new=we.pd)(),c._vscf_group_session_delete=e=>(c._vscf_group_session_delete=we.qd)(e),c._vscf_group_session_shallow_copy=e=>(c._vscf_group_session_shallow_copy=we.rd)(e),c._vscf_group_session_use_rng=(e,t)=>(c._vscf_group_session_use_rng=we.sd)(e,t),c._vscf_group_session_get_current_epoch=e=>(c._vscf_group_session_get_current_epoch=we.td)(e),c._vscf_group_session_setup_defaults=e=>(c._vscf_group_session_setup_defaults=we.ud)(e),c._vscf_group_session_get_session_id=(e,t)=>(c._vscf_group_session_get_session_id=we.vd)(e,t),c._vscf_group_session_add_epoch=(e,t)=>(c._vscf_group_session_add_epoch=we.wd)(e,t),c._vscf_group_session_encrypt=(e,t,_,r)=>(c._vscf_group_session_encrypt=we.xd)(e,t,_,r),c._vscf_group_session_decrypt_len=(e,t)=>(c._vscf_group_session_decrypt_len=we.yd)(e,t),c._vscf_group_session_decrypt=(e,t,_,r)=>(c._vscf_group_session_decrypt=we.zd)(e,t,_,r),c._vscf_group_session_create_group_ticket=(e,t)=>(c._vscf_group_session_create_group_ticket=we.Ad)(e,t),c._vscf_message_info_editor_release_random=e=>(c._vscf_message_info_editor_release_random=we.Bd)(e),c._vscf_message_info_editor_new=()=>(c._vscf_message_info_editor_new=we.Cd)(),c._vscf_message_info_editor_delete=e=>(c._vscf_message_info_editor_delete=we.Dd)(e),c._vscf_message_info_editor_shallow_copy=e=>(c._vscf_message_info_editor_shallow_copy=we.Ed)(e),c._vscf_message_info_editor_use_random=(e,t)=>(c._vscf_message_info_editor_use_random=we.Fd)(e,t),c._vscf_message_info_editor_setup_defaults=e=>(c._vscf_message_info_editor_setup_defaults=we.Gd)(e),c._vscf_message_info_editor_unpack=(e,t)=>(c._vscf_message_info_editor_unpack=we.Hd)(e,t),c._vscf_message_info_editor_unlock=(e,t,_)=>(c._vscf_message_info_editor_unlock=we.Id)(e,t,_),c._vscf_message_info_editor_add_key_recipient=(e,t,_)=>(c._vscf_message_info_editor_add_key_recipient=we.Jd)(e,t,_),c._vscf_message_info_editor_remove_key_recipient=(e,t)=>(c._vscf_message_info_editor_remove_key_recipient=we.Kd)(e,t),c._vscf_message_info_editor_remove_all=e=>(c._vscf_message_info_editor_remove_all=we.Ld)(e),c._vscf_message_info_editor_packed_len=e=>(c._vscf_message_info_editor_packed_len=we.Md)(e),c._vscf_message_info_editor_pack=(e,t)=>(c._vscf_message_info_editor_pack=we.Nd)(e,t),c._vscf_signer_info_new=()=>(c._vscf_signer_info_new=we.Od)(),c._vscf_signer_info_delete=e=>(c._vscf_signer_info_delete=we.Pd)(e),c._vscf_signer_info_shallow_copy=e=>(c._vscf_signer_info_shallow_copy=we.Qd)(e),c._vscf_signer_info_signer_id=(e,t)=>(c._vscf_signer_info_signer_id=we.Rd)(e,t),c._vscf_signer_info_signer_alg_info=e=>(c._vscf_signer_info_signer_alg_info=we.Sd)(e),c._vscf_signer_info_signature=(e,t)=>(c._vscf_signer_info_signature=we.Td)(e,t),c._vscf_signer_info_list_new=()=>(c._vscf_signer_info_list_new=we.Ud)(),c._vscf_signer_info_list_delete=e=>(c._vscf_signer_info_list_delete=we.Vd)(e),c._vscf_signer_info_list_shallow_copy=e=>(c._vscf_signer_info_list_shallow_copy=we.Wd)(e),c._vscf_signer_info_list_has_item=e=>(c._vscf_signer_info_list_has_item=we.Xd)(e),c._vscf_signer_info_list_item=e=>(c._vscf_signer_info_list_item=we.Yd)(e),c._vscf_signer_info_list_has_next=e=>(c._vscf_signer_info_list_has_next=we.Zd)(e),c._vscf_signer_info_list_next=e=>(c._vscf_signer_info_list_next=we._d)(e),c._vscf_signer_info_list_has_prev=e=>(c._vscf_signer_info_list_has_prev=we.$d)(e),c._vscf_signer_info_list_prev=e=>(c._vscf_signer_info_list_prev=we.ae)(e),c._vscf_signer_info_list_clear=e=>(c._vscf_signer_info_list_clear=we.be)(e),c._vscf_message_info_footer_new=()=>(c._vscf_message_info_footer_new=we.ce)(),c._vscf_message_info_footer_delete=e=>(c._vscf_message_info_footer_delete=we.de)(e),c._vscf_message_info_footer_shallow_copy=e=>(c._vscf_message_info_footer_shallow_copy=we.ee)(e),c._vscf_message_info_footer_has_signer_infos=e=>(c._vscf_message_info_footer_has_signer_infos=we.fe)(e),c._vscf_message_info_footer_signer_infos=e=>(c._vscf_message_info_footer_signer_infos=we.ge)(e),c._vscf_message_info_footer_signer_hash_alg_info=e=>(c._vscf_message_info_footer_signer_hash_alg_info=we.he)(e),c._vscf_message_info_footer_signer_digest=(e,t)=>(c._vscf_message_info_footer_signer_digest=we.ie)(e,t),c._vscf_signed_data_info_new=()=>(c._vscf_signed_data_info_new=we.je)(),c._vscf_signed_data_info_delete=e=>(c._vscf_signed_data_info_delete=we.ke)(e),c._vscf_signed_data_info_shallow_copy=e=>(c._vscf_signed_data_info_shallow_copy=we.le)(e),c._vscf_signed_data_info_hash_alg_info=e=>(c._vscf_signed_data_info_hash_alg_info=we.me)(e),c._vscf_footer_info_new=()=>(c._vscf_footer_info_new=we.ne)(),c._vscf_footer_info_delete=e=>(c._vscf_footer_info_delete=we.oe)(e),c._vscf_footer_info_shallow_copy=e=>(c._vscf_footer_info_shallow_copy=we.pe)(e),c._vscf_footer_info_has_signed_data_info=e=>(c._vscf_footer_info_has_signed_data_info=we.qe)(e),c._vscf_footer_info_signed_data_info=e=>(c._vscf_footer_info_signed_data_info=we.re)(e),c._vscf_footer_info_set_data_size=(e,t)=>(c._vscf_footer_info_set_data_size=we.se)(e,t),c._vscf_footer_info_data_size=e=>(c._vscf_footer_info_data_size=we.te)(e),c._vscf_key_info_new=()=>(c._vscf_key_info_new=we.ue)(),c._vscf_key_info_new_with_alg_info=e=>(c._vscf_key_info_new_with_alg_info=we.ve)(e),c._vscf_key_info_delete=e=>(c._vscf_key_info_delete=we.we)(e),c._vscf_key_info_shallow_copy=e=>(c._vscf_key_info_shallow_copy=we.xe)(e),c._vscf_key_info_is_compound=e=>(c._vscf_key_info_is_compound=we.ye)(e),c._vscf_key_info_is_hybrid=e=>(c._vscf_key_info_is_hybrid=we.ze)(e),c._vscf_key_info_is_compound_hybrid=e=>(c._vscf_key_info_is_compound_hybrid=we.Ae)(e),c._vscf_key_info_is_compound_hybrid_cipher=e=>(c._vscf_key_info_is_compound_hybrid_cipher=we.Be)(e),c._vscf_key_info_is_compound_hybrid_signer=e=>(c._vscf_key_info_is_compound_hybrid_signer=we.Ce)(e),c._vscf_key_info_is_hybrid_post_quantum=e=>(c._vscf_key_info_is_hybrid_post_quantum=we.De)(e),c._vscf_key_info_is_hybrid_post_quantum_cipher=e=>(c._vscf_key_info_is_hybrid_post_quantum_cipher=we.Ee)(e),c._vscf_key_info_is_hybrid_post_quantum_signer=e=>(c._vscf_key_info_is_hybrid_post_quantum_signer=we.Fe)(e),c._vscf_key_info_alg_id=e=>(c._vscf_key_info_alg_id=we.Ge)(e),c._vscf_key_info_compound_cipher_alg_id=e=>(c._vscf_key_info_compound_cipher_alg_id=we.He)(e),c._vscf_key_info_compound_signer_alg_id=e=>(c._vscf_key_info_compound_signer_alg_id=we.Ie)(e),c._vscf_key_info_hybrid_first_key_alg_id=e=>(c._vscf_key_info_hybrid_first_key_alg_id=we.Je)(e),c._vscf_key_info_hybrid_second_key_alg_id=e=>(c._vscf_key_info_hybrid_second_key_alg_id=we.Ke)(e),c._vscf_key_info_compound_hybrid_cipher_first_key_alg_id=e=>(c._vscf_key_info_compound_hybrid_cipher_first_key_alg_id=we.Le)(e),c._vscf_key_info_compound_hybrid_cipher_second_key_alg_id=e=>(c._vscf_key_info_compound_hybrid_cipher_second_key_alg_id=we.Me)(e),c._vscf_key_info_compound_hybrid_signer_first_key_alg_id=e=>(c._vscf_key_info_compound_hybrid_signer_first_key_alg_id=we.Ne)(e),c._vscf_key_info_compound_hybrid_signer_second_key_alg_id=e=>(c._vscf_key_info_compound_hybrid_signer_second_key_alg_id=we.Oe)(e),c._vscf_padding_params_new=()=>(c._vscf_padding_params_new=we.Pe)(),c._vscf_padding_params_new_with_constraints=(e,t)=>(c._vscf_padding_params_new_with_constraints=we.Qe)(e,t),c._vscf_padding_params_delete=e=>(c._vscf_padding_params_delete=we.Re)(e),c._vscf_padding_params_shallow_copy=e=>(c._vscf_padding_params_shallow_copy=we.Se)(e),c._vscf_padding_params_frame=e=>(c._vscf_padding_params_frame=we.Te)(e),c._vscf_padding_params_frame_max=e=>(c._vscf_padding_params_frame_max=we.Ue)(e),c._vscf_sha224_alg_id=e=>(c._vscf_sha224_alg_id=we.Ve)(e),c._vscf_sha224_produce_alg_info=e=>(c._vscf_sha224_produce_alg_info=we.We)(e),c._vscf_sha224_restore_alg_info=(e,t)=>(c._vscf_sha224_restore_alg_info=we.Xe)(e,t),c._vscf_sha224_hash=(e,t)=>(c._vscf_sha224_hash=we.Ye)(e,t),c._vscf_sha224_finish=(e,t)=>(c._vscf_sha224_finish=we.Ze)(e,t),c._vscf_sha224_start=e=>(c._vscf_sha224_start=we._e)(e),c._vscf_sha224_update=(e,t)=>(c._vscf_sha224_update=we.$e)(e,t),c._vscf_sha224_new=()=>(c._vscf_sha224_new=we.af)(),c._vscf_sha224_delete=e=>(c._vscf_sha224_delete=we.bf)(e),c._vscf_sha224_shallow_copy=e=>(c._vscf_sha224_shallow_copy=we.cf)(e),c._vscf_sha256_alg_id=e=>(c._vscf_sha256_alg_id=we.df)(e),c._vscf_sha256_produce_alg_info=e=>(c._vscf_sha256_produce_alg_info=we.ef)(e),c._vscf_sha256_restore_alg_info=(e,t)=>(c._vscf_sha256_restore_alg_info=we.ff)(e,t),c._vscf_sha256_hash=(e,t)=>(c._vscf_sha256_hash=we.gf)(e,t),c._vscf_sha256_finish=(e,t)=>(c._vscf_sha256_finish=we.hf)(e,t),c._vscf_sha256_start=e=>(c._vscf_sha256_start=we.jf)(e),c._vscf_sha256_update=(e,t)=>(c._vscf_sha256_update=we.kf)(e,t),c._vscf_sha256_new=()=>(c._vscf_sha256_new=we.lf)(),c._vscf_sha256_delete=e=>(c._vscf_sha256_delete=we.mf)(e),c._vscf_sha256_shallow_copy=e=>(c._vscf_sha256_shallow_copy=we.nf)(e),c._vscf_sha384_alg_id=e=>(c._vscf_sha384_alg_id=we.of)(e),c._vscf_sha384_produce_alg_info=e=>(c._vscf_sha384_produce_alg_info=we.pf)(e),c._vscf_sha384_restore_alg_info=(e,t)=>(c._vscf_sha384_restore_alg_info=we.qf)(e,t),c._vscf_sha384_hash=(e,t)=>(c._vscf_sha384_hash=we.rf)(e,t),c._vscf_sha384_finish=(e,t)=>(c._vscf_sha384_finish=we.sf)(e,t),c._vscf_sha384_start=e=>(c._vscf_sha384_start=we.tf)(e),c._vscf_sha384_update=(e,t)=>(c._vscf_sha384_update=we.uf)(e,t),c._vscf_sha384_new=()=>(c._vscf_sha384_new=we.vf)(),c._vscf_sha384_delete=e=>(c._vscf_sha384_delete=we.wf)(e),c._vscf_sha384_shallow_copy=e=>(c._vscf_sha384_shallow_copy=we.xf)(e),c._vscf_sha512_alg_id=e=>(c._vscf_sha512_alg_id=we.yf)(e),c._vscf_sha512_produce_alg_info=e=>(c._vscf_sha512_produce_alg_info=we.zf)(e),c._vscf_sha512_restore_alg_info=(e,t)=>(c._vscf_sha512_restore_alg_info=we.Af)(e,t),c._vscf_sha512_hash=(e,t)=>(c._vscf_sha512_hash=we.Bf)(e,t),c._vscf_sha512_finish=(e,t)=>(c._vscf_sha512_finish=we.Cf)(e,t),c._vscf_sha512_start=e=>(c._vscf_sha512_start=we.Df)(e),c._vscf_sha512_update=(e,t)=>(c._vscf_sha512_update=we.Ef)(e,t),c._vscf_sha512_new=()=>(c._vscf_sha512_new=we.Ff)(),c._vscf_sha512_delete=e=>(c._vscf_sha512_delete=we.Gf)(e),c._vscf_sha512_shallow_copy=e=>(c._vscf_sha512_shallow_copy=we.Hf)(e),c._vscf_aes256_gcm_out_len=(e,t)=>(c._vscf_aes256_gcm_out_len=we.If)(e,t),c._vscf_aes256_gcm_alg_id=e=>(c._vscf_aes256_gcm_alg_id=we.Jf)(e),c._vscf_aes256_gcm_produce_alg_info=e=>(c._vscf_aes256_gcm_produce_alg_info=we.Kf)(e),c._vscf_aes256_gcm_restore_alg_info=(e,t)=>(c._vscf_aes256_gcm_restore_alg_info=we.Lf)(e,t),c._vscf_aes256_gcm_set_nonce=(e,t)=>(c._vscf_aes256_gcm_set_nonce=we.Mf)(e,t),c._vscf_aes256_gcm_encrypt=(e,t,_)=>(c._vscf_aes256_gcm_encrypt=we.Nf)(e,t,_),c._vscf_aes256_gcm_start_encryption=e=>(c._vscf_aes256_gcm_start_encryption=we.Of)(e),c._vscf_aes256_gcm_update=(e,t,_)=>(c._vscf_aes256_gcm_update=we.Pf)(e,t,_),c._vscf_aes256_gcm_finish_auth_decryption=(e,t,_)=>(c._vscf_aes256_gcm_finish_auth_decryption=we.Qf)(e,t,_),c._vscf_aes256_gcm_finish_auth_encryption=(e,t,_)=>(c._vscf_aes256_gcm_finish_auth_encryption=we.Rf)(e,t,_),c._vscf_aes256_gcm_encrypted_len=(e,t)=>(c._vscf_aes256_gcm_encrypted_len=we.Sf)(e,t),c._vscf_aes256_gcm_finish=(e,t)=>(c._vscf_aes256_gcm_finish=we.Tf)(e,t),c._vscf_aes256_gcm_precise_encrypted_len=(e,t)=>(c._vscf_aes256_gcm_precise_encrypted_len=we.Uf)(e,t),c._vscf_aes256_gcm_decrypt=(e,t,_)=>(c._vscf_aes256_gcm_decrypt=we.Vf)(e,t,_),c._vscf_aes256_gcm_start_decryption=e=>(c._vscf_aes256_gcm_start_decryption=we.Wf)(e),c._vscf_aes256_gcm_decrypted_len=(e,t)=>(c._vscf_aes256_gcm_decrypted_len=we.Xf)(e,t),c._vscf_aes256_gcm_set_key=(e,t)=>(c._vscf_aes256_gcm_set_key=we.Yf)(e,t),c._vscf_aes256_gcm_state=e=>(c._vscf_aes256_gcm_state=we.Zf)(e),c._vscf_aes256_gcm_decrypted_out_len=(e,t)=>(c._vscf_aes256_gcm_decrypted_out_len=we._f)(e,t),c._vscf_aes256_gcm_encrypted_out_len=(e,t)=>(c._vscf_aes256_gcm_encrypted_out_len=we.$f)(e,t),c._vscf_aes256_gcm_auth_encrypt=(e,t,_,r,s)=>(c._vscf_aes256_gcm_auth_encrypt=we.ag)(e,t,_,r,s),c._vscf_aes256_gcm_auth_encrypted_len=(e,t)=>(c._vscf_aes256_gcm_auth_encrypted_len=we.bg)(e,t),c._vscf_aes256_gcm_set_auth_data=(e,t)=>(c._vscf_aes256_gcm_set_auth_data=we.cg)(e,t),c._vscf_aes256_gcm_auth_decrypt=(e,t,_,r,s)=>(c._vscf_aes256_gcm_auth_decrypt=we.dg)(e,t,_,r,s),c._vscf_aes256_gcm_auth_decrypted_len=(e,t)=>(c._vscf_aes256_gcm_auth_decrypted_len=we.eg)(e,t),c._vscf_aes256_gcm_new=()=>(c._vscf_aes256_gcm_new=we.fg)(),c._vscf_aes256_gcm_delete=e=>(c._vscf_aes256_gcm_delete=we.gg)(e),c._vscf_aes256_gcm_shallow_copy=e=>(c._vscf_aes256_gcm_shallow_copy=we.hg)(e),c._vscf_aes256_cbc_alg_id=e=>(c._vscf_aes256_cbc_alg_id=we.ig)(e),c._vscf_aes256_cbc_produce_alg_info=e=>(c._vscf_aes256_cbc_produce_alg_info=we.jg)(e),c._vscf_aes256_cbc_restore_alg_info=(e,t)=>(c._vscf_aes256_cbc_restore_alg_info=we.kg)(e,t),c._vscf_aes256_cbc_set_nonce=(e,t)=>(c._vscf_aes256_cbc_set_nonce=we.lg)(e,t),c._vscf_aes256_cbc_encrypt=(e,t,_)=>(c._vscf_aes256_cbc_encrypt=we.mg)(e,t,_),c._vscf_aes256_cbc_start_encryption=e=>(c._vscf_aes256_cbc_start_encryption=we.ng)(e),c._vscf_aes256_cbc_update=(e,t,_)=>(c._vscf_aes256_cbc_update=we.og)(e,t,_),c._vscf_aes256_cbc_finish=(e,t)=>(c._vscf_aes256_cbc_finish=we.pg)(e,t),c._vscf_aes256_cbc_encrypted_len=(e,t)=>(c._vscf_aes256_cbc_encrypted_len=we.qg)(e,t),c._vscf_aes256_cbc_precise_encrypted_len=(e,t)=>(c._vscf_aes256_cbc_precise_encrypted_len=we.rg)(e,t),c._vscf_aes256_cbc_decrypt=(e,t,_)=>(c._vscf_aes256_cbc_decrypt=we.sg)(e,t,_),c._vscf_aes256_cbc_start_decryption=e=>(c._vscf_aes256_cbc_start_decryption=we.tg)(e),c._vscf_aes256_cbc_decrypted_len=(e,t)=>(c._vscf_aes256_cbc_decrypted_len=we.ug)(e,t),c._vscf_aes256_cbc_set_key=(e,t)=>(c._vscf_aes256_cbc_set_key=we.vg)(e,t),c._vscf_aes256_cbc_state=e=>(c._vscf_aes256_cbc_state=we.wg)(e),c._vscf_aes256_cbc_out_len=(e,t)=>(c._vscf_aes256_cbc_out_len=we.xg)(e,t),c._vscf_aes256_cbc_decrypted_out_len=(e,t)=>(c._vscf_aes256_cbc_decrypted_out_len=we.yg)(e,t),c._vscf_aes256_cbc_encrypted_out_len=(e,t)=>(c._vscf_aes256_cbc_encrypted_out_len=we.zg)(e,t),c._vscf_aes256_cbc_new=()=>(c._vscf_aes256_cbc_new=we.Ag)(),c._vscf_aes256_cbc_delete=e=>(c._vscf_aes256_cbc_delete=we.Bg)(e),c._vscf_aes256_cbc_shallow_copy=e=>(c._vscf_aes256_cbc_shallow_copy=we.Cg)(e),c._vscf_asn1rd_reset=(e,t)=>(c._vscf_asn1rd_reset=we.Dg)(e,t),c._vscf_asn1rd_left_len=e=>(c._vscf_asn1rd_left_len=we.Eg)(e),c._vscf_asn1rd_has_error=e=>(c._vscf_asn1rd_has_error=we.Fg)(e),c._vscf_asn1rd_status=e=>(c._vscf_asn1rd_status=we.Gg)(e),c._vscf_asn1rd_get_tag=e=>(c._vscf_asn1rd_get_tag=we.Hg)(e),c._vscf_asn1rd_get_len=e=>(c._vscf_asn1rd_get_len=we.Ig)(e),c._vscf_asn1rd_get_data_len=e=>(c._vscf_asn1rd_get_data_len=we.Jg)(e),c._vscf_asn1rd_read_tag=(e,t)=>(c._vscf_asn1rd_read_tag=we.Kg)(e,t),c._vscf_asn1rd_read_context_tag=(e,t)=>(c._vscf_asn1rd_read_context_tag=we.Lg)(e,t),c._vscf_asn1rd_read_int=e=>(c._vscf_asn1rd_read_int=we.Mg)(e),c._vscf_asn1rd_read_int64=e=>(c._vscf_asn1rd_read_int64=we.Ng)(e),c._vscf_asn1rd_read_int8=e=>(c._vscf_asn1rd_read_int8=we.Og)(e),c._vscf_asn1rd_read_int16=e=>(c._vscf_asn1rd_read_int16=we.Pg)(e),c._vscf_asn1rd_read_int32=e=>(c._vscf_asn1rd_read_int32=we.Qg)(e),c._vscf_asn1rd_read_uint=e=>(c._vscf_asn1rd_read_uint=we.Rg)(e),c._vscf_asn1rd_read_uint64=e=>(c._vscf_asn1rd_read_uint64=we.Sg)(e),c._vscf_asn1rd_read_uint8=e=>(c._vscf_asn1rd_read_uint8=we.Tg)(e),c._vscf_asn1rd_read_uint16=e=>(c._vscf_asn1rd_read_uint16=we.Ug)(e),c._vscf_asn1rd_read_uint32=e=>(c._vscf_asn1rd_read_uint32=we.Vg)(e),c._vscf_asn1rd_read_bool=e=>(c._vscf_asn1rd_read_bool=we.Wg)(e),c._vscf_asn1rd_read_null=e=>(c._vscf_asn1rd_read_null=we.Xg)(e),c._vscf_asn1rd_read_null_optional=e=>(c._vscf_asn1rd_read_null_optional=we.Yg)(e),c._vscf_asn1rd_read_octet_str=(e,t)=>(c._vscf_asn1rd_read_octet_str=we.Zg)(e,t),c._vscf_asn1rd_read_bitstring_as_octet_str=(e,t)=>(c._vscf_asn1rd_read_bitstring_as_octet_str=we._g)(e,t),c._vscf_asn1rd_read_utf8_str=(e,t)=>(c._vscf_asn1rd_read_utf8_str=we.$g)(e,t),c._vscf_asn1rd_read_oid=(e,t)=>(c._vscf_asn1rd_read_oid=we.ah)(e,t),c._vscf_asn1rd_read_data=(e,t,_)=>(c._vscf_asn1rd_read_data=we.bh)(e,t,_),c._vscf_asn1rd_read_sequence=e=>(c._vscf_asn1rd_read_sequence=we.ch)(e),c._vscf_asn1rd_read_set=e=>(c._vscf_asn1rd_read_set=we.dh)(e),c._vscf_asn1rd_new=()=>(c._vscf_asn1rd_new=we.eh)(),c._vscf_asn1rd_delete=e=>(c._vscf_asn1rd_delete=we.fh)(e),c._vscf_asn1rd_shallow_copy=e=>(c._vscf_asn1rd_shallow_copy=we.gh)(e),c._vscf_asn1wr_reset=(e,t,_)=>(c._vscf_asn1wr_reset=we.hh)(e,t,_),c._vscf_asn1wr_finish=(e,t)=>(c._vscf_asn1wr_finish=we.ih)(e,t),c._vscf_asn1wr_bytes=e=>(c._vscf_asn1wr_bytes=we.jh)(e),c._vscf_asn1wr_len=e=>(c._vscf_asn1wr_len=we.kh)(e),c._vscf_asn1wr_written_len=e=>(c._vscf_asn1wr_written_len=we.lh)(e),c._vscf_asn1wr_unwritten_len=e=>(c._vscf_asn1wr_unwritten_len=we.mh)(e),c._vscf_asn1wr_has_error=e=>(c._vscf_asn1wr_has_error=we.nh)(e),c._vscf_asn1wr_status=e=>(c._vscf_asn1wr_status=we.oh)(e),c._vscf_asn1wr_reserve=(e,t)=>(c._vscf_asn1wr_reserve=we.ph)(e,t),c._vscf_asn1wr_write_tag=(e,t)=>(c._vscf_asn1wr_write_tag=we.qh)(e,t),c._vscf_asn1wr_write_context_tag=(e,t,_)=>(c._vscf_asn1wr_write_context_tag=we.rh)(e,t,_),c._vscf_asn1wr_write_len=(e,t)=>(c._vscf_asn1wr_write_len=we.sh)(e,t),c._vscf_asn1wr_write_int=(e,t)=>(c._vscf_asn1wr_write_int=we.th)(e,t),c._vscf_asn1wr_write_int64=(e,t)=>(c._vscf_asn1wr_write_int64=we.uh)(e,t),c._vscf_asn1wr_write_int8=(e,t)=>(c._vscf_asn1wr_write_int8=we.vh)(e,t),c._vscf_asn1wr_write_int16=(e,t)=>(c._vscf_asn1wr_write_int16=we.wh)(e,t),c._vscf_asn1wr_write_int32=(e,t)=>(c._vscf_asn1wr_write_int32=we.xh)(e,t),c._vscf_asn1wr_write_uint=(e,t)=>(c._vscf_asn1wr_write_uint=we.yh)(e,t),c._vscf_asn1wr_write_uint64=(e,t)=>(c._vscf_asn1wr_write_uint64=we.zh)(e,t),c._vscf_asn1wr_write_uint8=(e,t)=>(c._vscf_asn1wr_write_uint8=we.Ah)(e,t),c._vscf_asn1wr_write_uint16=(e,t)=>(c._vscf_asn1wr_write_uint16=we.Bh)(e,t),c._vscf_asn1wr_write_uint32=(e,t)=>(c._vscf_asn1wr_write_uint32=we.Ch)(e,t),c._vscf_asn1wr_write_bool=(e,t)=>(c._vscf_asn1wr_write_bool=we.Dh)(e,t),c._vscf_asn1wr_write_null=e=>(c._vscf_asn1wr_write_null=we.Eh)(e),c._vscf_asn1wr_write_octet_str=(e,t)=>(c._vscf_asn1wr_write_octet_str=we.Fh)(e,t),c._vscf_asn1wr_write_octet_str_as_bitstring=(e,t)=>(c._vscf_asn1wr_write_octet_str_as_bitstring=we.Gh)(e,t),c._vscf_asn1wr_write_data=(e,t)=>(c._vscf_asn1wr_write_data=we.Hh)(e,t),c._vscf_asn1wr_write_utf8_str=(e,t)=>(c._vscf_asn1wr_write_utf8_str=we.Ih)(e,t),c._vscf_asn1wr_write_oid=(e,t)=>(c._vscf_asn1wr_write_oid=we.Jh)(e,t),c._vscf_asn1wr_write_sequence=(e,t)=>(c._vscf_asn1wr_write_sequence=we.Kh)(e,t),c._vscf_asn1wr_write_set=(e,t)=>(c._vscf_asn1wr_write_set=we.Lh)(e,t),c._vscf_asn1wr_new=()=>(c._vscf_asn1wr_new=we.Mh)(),c._vscf_asn1wr_delete=e=>(c._vscf_asn1wr_delete=we.Nh)(e),c._vscf_asn1wr_shallow_copy=e=>(c._vscf_asn1wr_shallow_copy=we.Oh)(e),c._vscf_rsa_public_key_key_exponent=e=>(c._vscf_rsa_public_key_key_exponent=we.Ph)(e),c._vscf_rsa_public_key_is_valid=e=>(c._vscf_rsa_public_key_is_valid=we.Qh)(e),c._vscf_rsa_public_key_len=e=>(c._vscf_rsa_public_key_len=we.Rh)(e),c._vscf_rsa_public_key_alg_id=e=>(c._vscf_rsa_public_key_alg_id=we.Sh)(e),c._vscf_rsa_public_key_alg_info=e=>(c._vscf_rsa_public_key_alg_info=we.Th)(e),c._vscf_rsa_public_key_bitlen=e=>(c._vscf_rsa_public_key_bitlen=we.Uh)(e),c._vscf_rsa_public_key_impl_tag=e=>(c._vscf_rsa_public_key_impl_tag=we.Vh)(e),c._vscf_rsa_public_key_new=()=>(c._vscf_rsa_public_key_new=we.Wh)(),c._vscf_rsa_public_key_delete=e=>(c._vscf_rsa_public_key_delete=we.Xh)(e),c._vscf_rsa_public_key_shallow_copy=e=>(c._vscf_rsa_public_key_shallow_copy=we.Yh)(e),c._vscf_rsa_private_key_is_valid=e=>(c._vscf_rsa_private_key_is_valid=we.Zh)(e),c._vscf_rsa_private_key_len=e=>(c._vscf_rsa_private_key_len=we._h)(e),c._vscf_rsa_private_key_alg_id=e=>(c._vscf_rsa_private_key_alg_id=we.$h)(e),c._vscf_rsa_private_key_alg_info=e=>(c._vscf_rsa_private_key_alg_info=we.ai)(e),c._vscf_rsa_private_key_bitlen=e=>(c._vscf_rsa_private_key_bitlen=we.bi)(e),c._vscf_rsa_private_key_impl_tag=e=>(c._vscf_rsa_private_key_impl_tag=we.ci)(e),c._vscf_rsa_private_key_extract_public_key=e=>(c._vscf_rsa_private_key_extract_public_key=we.di)(e),c._vscf_rsa_private_key_new=()=>(c._vscf_rsa_private_key_new=we.ei)(),c._vscf_rsa_private_key_delete=e=>(c._vscf_rsa_private_key_delete=we.fi)(e),c._vscf_rsa_private_key_shallow_copy=e=>(c._vscf_rsa_private_key_shallow_copy=we.gi)(e),c._vscf_rsa_setup_defaults=e=>(c._vscf_rsa_setup_defaults=we.hi)(e),c._vscf_rsa_generate_key=(e,t,_)=>(c._vscf_rsa_generate_key=we.ii)(e,t,_),c._vscf_rsa_generate_ephemeral_key=(e,t,_)=>(c._vscf_rsa_generate_ephemeral_key=we.ji)(e,t,_),c._vscf_rsa_import_public_key=(e,t,_)=>(c._vscf_rsa_import_public_key=we.ki)(e,t,_),c._vscf_rsa_import_public_key_data=(e,t,_,r)=>(c._vscf_rsa_import_public_key_data=we.li)(e,t,_,r),c._vscf_rsa_export_public_key=(e,t,_)=>(c._vscf_rsa_export_public_key=we.mi)(e,t,_),c._vscf_rsa_exported_public_key_data_len=(e,t)=>(c._vscf_rsa_exported_public_key_data_len=we.ni)(e,t),c._vscf_rsa_export_public_key_data=(e,t,_)=>(c._vscf_rsa_export_public_key_data=we.oi)(e,t,_),c._vscf_rsa_import_private_key=(e,t,_)=>(c._vscf_rsa_import_private_key=we.pi)(e,t,_),c._vscf_rsa_import_private_key_data=(e,t,_,r)=>(c._vscf_rsa_import_private_key_data=we.qi)(e,t,_,r),c._vscf_rsa_export_private_key=(e,t,_)=>(c._vscf_rsa_export_private_key=we.ri)(e,t,_),c._vscf_rsa_exported_private_key_data_len=(e,t)=>(c._vscf_rsa_exported_private_key_data_len=we.si)(e,t),c._vscf_rsa_export_private_key_data=(e,t,_)=>(c._vscf_rsa_export_private_key_data=we.ti)(e,t,_),c._vscf_rsa_can_encrypt=(e,t,_)=>(c._vscf_rsa_can_encrypt=we.ui)(e,t,_),c._vscf_rsa_encrypted_len=(e,t,_)=>(c._vscf_rsa_encrypted_len=we.vi)(e,t,_),c._vscf_rsa_encrypt=(e,t,_,r)=>(c._vscf_rsa_encrypt=we.wi)(e,t,_,r),c._vscf_rsa_can_decrypt=(e,t,_)=>(c._vscf_rsa_can_decrypt=we.xi)(e,t,_),c._vscf_rsa_decrypted_len=(e,t,_)=>(c._vscf_rsa_decrypted_len=we.yi)(e,t,_),c._vscf_rsa_decrypt=(e,t,_,r)=>(c._vscf_rsa_decrypt=we.zi)(e,t,_,r),c._vscf_rsa_can_sign=(e,t)=>(c._vscf_rsa_can_sign=we.Ai)(e,t),c._vscf_rsa_signature_len=(e,t)=>(c._vscf_rsa_signature_len=we.Bi)(e,t),c._vscf_rsa_sign_hash=(e,t,_,r,s)=>(c._vscf_rsa_sign_hash=we.Ci)(e,t,_,r,s),c._vscf_rsa_can_verify=(e,t)=>(c._vscf_rsa_can_verify=we.Di)(e,t),c._vscf_rsa_verify_hash=(e,t,_,r,s)=>(c._vscf_rsa_verify_hash=we.Ei)(e,t,_,r,s),c._vscf_rsa_use_random=(e,t)=>(c._vscf_rsa_use_random=we.Fi)(e,t),c._vscf_rsa_release_random=e=>(c._vscf_rsa_release_random=we.Gi)(e),c._vscf_rsa_new=()=>(c._vscf_rsa_new=we.Hi)(),c._vscf_rsa_delete=e=>(c._vscf_rsa_delete=we.Ii)(e),c._vscf_rsa_shallow_copy=e=>(c._vscf_rsa_shallow_copy=we.Ji)(e),c._vscf_ecc_public_key_alg_id=e=>(c._vscf_ecc_public_key_alg_id=we.Ki)(e),c._vscf_ecc_public_key_alg_info=e=>(c._vscf_ecc_public_key_alg_info=we.Li)(e),c._vscf_ecc_public_key_len=e=>(c._vscf_ecc_public_key_len=we.Mi)(e),c._vscf_ecc_public_key_bitlen=e=>(c._vscf_ecc_public_key_bitlen=we.Ni)(e),c._vscf_ecc_public_key_impl_tag=e=>(c._vscf_ecc_public_key_impl_tag=we.Oi)(e),c._vscf_ecc_public_key_is_valid=e=>(c._vscf_ecc_public_key_is_valid=we.Pi)(e),c._vscf_ecc_public_key_new=()=>(c._vscf_ecc_public_key_new=we.Qi)(),c._vscf_ecc_public_key_delete=e=>(c._vscf_ecc_public_key_delete=we.Ri)(e),c._vscf_ecc_public_key_shallow_copy=e=>(c._vscf_ecc_public_key_shallow_copy=we.Si)(e),c._vscf_ecc_private_key_alg_id=e=>(c._vscf_ecc_private_key_alg_id=we.Ti)(e),c._vscf_ecc_private_key_alg_info=e=>(c._vscf_ecc_private_key_alg_info=we.Ui)(e),c._vscf_ecc_private_key_len=e=>(c._vscf_ecc_private_key_len=we.Vi)(e),c._vscf_ecc_private_key_bitlen=e=>(c._vscf_ecc_private_key_bitlen=we.Wi)(e),c._vscf_ecc_private_key_impl_tag=e=>(c._vscf_ecc_private_key_impl_tag=we.Xi)(e),c._vscf_ecc_private_key_is_valid=e=>(c._vscf_ecc_private_key_is_valid=we.Yi)(e),c._vscf_ecc_private_key_extract_public_key=e=>(c._vscf_ecc_private_key_extract_public_key=we.Zi)(e),c._vscf_ecc_private_key_new=()=>(c._vscf_ecc_private_key_new=we._i)(),c._vscf_ecc_private_key_delete=e=>(c._vscf_ecc_private_key_delete=we.$i)(e),c._vscf_ecc_private_key_shallow_copy=e=>(c._vscf_ecc_private_key_shallow_copy=we.aj)(e),c._vscf_ecc_setup_defaults=e=>(c._vscf_ecc_setup_defaults=we.bj)(e),c._vscf_ecc_generate_key=(e,t,_)=>(c._vscf_ecc_generate_key=we.cj)(e,t,_),c._vscf_ecc_generate_ephemeral_key=(e,t,_)=>(c._vscf_ecc_generate_ephemeral_key=we.dj)(e,t,_),c._vscf_ecc_import_public_key=(e,t,_)=>(c._vscf_ecc_import_public_key=we.ej)(e,t,_),c._vscf_ecc_import_public_key_data=(e,t,_,r)=>(c._vscf_ecc_import_public_key_data=we.fj)(e,t,_,r),c._vscf_ecc_export_public_key=(e,t,_)=>(c._vscf_ecc_export_public_key=we.gj)(e,t,_),c._vscf_ecc_exported_public_key_data_len=(e,t)=>(c._vscf_ecc_exported_public_key_data_len=we.hj)(e,t),c._vscf_ecc_export_public_key_data=(e,t,_)=>(c._vscf_ecc_export_public_key_data=we.ij)(e,t,_),c._vscf_ecc_import_private_key=(e,t,_)=>(c._vscf_ecc_import_private_key=we.jj)(e,t,_),c._vscf_ecc_import_private_key_data=(e,t,_,r)=>(c._vscf_ecc_import_private_key_data=we.kj)(e,t,_,r),c._vscf_ecc_export_private_key=(e,t,_)=>(c._vscf_ecc_export_private_key=we.lj)(e,t,_),c._vscf_ecc_exported_private_key_data_len=(e,t)=>(c._vscf_ecc_exported_private_key_data_len=we.mj)(e,t),c._vscf_ecc_export_private_key_data=(e,t,_)=>(c._vscf_ecc_export_private_key_data=we.nj)(e,t,_),c._vscf_ecc_can_encrypt=(e,t,_)=>(c._vscf_ecc_can_encrypt=we.oj)(e,t,_),c._vscf_ecc_encrypted_len=(e,t,_)=>(c._vscf_ecc_encrypted_len=we.pj)(e,t,_),c._vscf_ecc_encrypt=(e,t,_,r)=>(c._vscf_ecc_encrypt=we.qj)(e,t,_,r),c._vscf_ecc_can_decrypt=(e,t,_)=>(c._vscf_ecc_can_decrypt=we.rj)(e,t,_),c._vscf_ecc_decrypted_len=(e,t,_)=>(c._vscf_ecc_decrypted_len=we.sj)(e,t,_),c._vscf_ecc_decrypt=(e,t,_,r)=>(c._vscf_ecc_decrypt=we.tj)(e,t,_,r),c._vscf_ecc_can_sign=(e,t)=>(c._vscf_ecc_can_sign=we.uj)(e,t),c._vscf_ecc_signature_len=(e,t)=>(c._vscf_ecc_signature_len=we.vj)(e,t),c._vscf_ecc_sign_hash=(e,t,_,r,s)=>(c._vscf_ecc_sign_hash=we.wj)(e,t,_,r,s),c._vscf_ecc_can_verify=(e,t)=>(c._vscf_ecc_can_verify=we.xj)(e,t),c._vscf_ecc_verify_hash=(e,t,_,r,s)=>(c._vscf_ecc_verify_hash=we.yj)(e,t,_,r,s),c._vscf_ecc_compute_shared_key=(e,t,_,r)=>(c._vscf_ecc_compute_shared_key=we.zj)(e,t,_,r),c._vscf_ecc_shared_key_len=(e,t)=>(c._vscf_ecc_shared_key_len=we.Aj)(e,t),c._vscf_ecc_kem_shared_key_len=(e,t)=>(c._vscf_ecc_kem_shared_key_len=we.Bj)(e,t),c._vscf_ecc_kem_encapsulated_key_len=(e,t)=>(c._vscf_ecc_kem_encapsulated_key_len=we.Cj)(e,t),c._vscf_ecc_kem_encapsulate=(e,t,_,r)=>(c._vscf_ecc_kem_encapsulate=we.Dj)(e,t,_,r),c._vscf_ecc_kem_decapsulate=(e,t,_,r)=>(c._vscf_ecc_kem_decapsulate=we.Ej)(e,t,_,r),c._vscf_ecc_use_random=(e,t)=>(c._vscf_ecc_use_random=we.Fj)(e,t),c._vscf_ecc_release_random=e=>(c._vscf_ecc_release_random=we.Gj)(e),c._vscf_ecc_use_ecies=(e,t)=>(c._vscf_ecc_use_ecies=we.Hj)(e,t),c._vscf_ecc_release_ecies=e=>(c._vscf_ecc_release_ecies=we.Ij)(e),c._vscf_ecc_new=()=>(c._vscf_ecc_new=we.Jj)(),c._vscf_ecc_delete=e=>(c._vscf_ecc_delete=we.Kj)(e),c._vscf_ecc_shallow_copy=e=>(c._vscf_ecc_shallow_copy=we.Lj)(e),c._vscf_entropy_accumulator_setup_defaults=e=>(c._vscf_entropy_accumulator_setup_defaults=we.Mj)(e),c._vscf_entropy_accumulator_add_source=(e,t,_)=>(c._vscf_entropy_accumulator_add_source=we.Nj)(e,t,_),c._vscf_entropy_accumulator_is_strong=e=>(c._vscf_entropy_accumulator_is_strong=we.Oj)(e),c._vscf_entropy_accumulator_gather=(e,t,_)=>(c._vscf_entropy_accumulator_gather=we.Pj)(e,t,_),c._vscf_entropy_accumulator_new=()=>(c._vscf_entropy_accumulator_new=we.Qj)(),c._vscf_entropy_accumulator_delete=e=>(c._vscf_entropy_accumulator_delete=we.Rj)(e),c._vscf_entropy_accumulator_shallow_copy=e=>(c._vscf_entropy_accumulator_shallow_copy=we.Sj)(e),c._vscf_ctr_drbg_setup_defaults=e=>(c._vscf_ctr_drbg_setup_defaults=we.Tj)(e),c._vscf_ctr_drbg_enable_prediction_resistance=e=>(c._vscf_ctr_drbg_enable_prediction_resistance=we.Uj)(e),c._vscf_ctr_drbg_set_reseed_interval=(e,t)=>(c._vscf_ctr_drbg_set_reseed_interval=we.Vj)(e,t),c._vscf_ctr_drbg_set_entropy_len=(e,t)=>(c._vscf_ctr_drbg_set_entropy_len=we.Wj)(e,t),c._vscf_ctr_drbg_random=(e,t,_)=>(c._vscf_ctr_drbg_random=we.Xj)(e,t,_),c._vscf_ctr_drbg_reseed=e=>(c._vscf_ctr_drbg_reseed=we.Yj)(e),c._vscf_ctr_drbg_use_entropy_source=(e,t)=>(c._vscf_ctr_drbg_use_entropy_source=we.Zj)(e,t),c._vscf_ctr_drbg_release_entropy_source=e=>(c._vscf_ctr_drbg_release_entropy_source=we._j)(e),c._vscf_ctr_drbg_new=()=>(c._vscf_ctr_drbg_new=we.$j)(),c._vscf_ctr_drbg_delete=e=>(c._vscf_ctr_drbg_delete=we.ak)(e),c._vscf_ctr_drbg_shallow_copy=e=>(c._vscf_ctr_drbg_shallow_copy=we.bk)(e),c._vscf_hmac_alg_id=e=>(c._vscf_hmac_alg_id=we.ck)(e),c._vscf_hmac_produce_alg_info=e=>(c._vscf_hmac_produce_alg_info=we.dk)(e),c._vscf_hmac_restore_alg_info=(e,t)=>(c._vscf_hmac_restore_alg_info=we.ek)(e,t),c._vscf_hmac_digest_len=e=>(c._vscf_hmac_digest_len=we.fk)(e),c._vscf_hmac_mac=(e,t,_,r)=>(c._vscf_hmac_mac=we.gk)(e,t,_,r),c._vscf_hmac_start=(e,t)=>(c._vscf_hmac_start=we.hk)(e,t),c._vscf_hmac_finish=(e,t)=>(c._vscf_hmac_finish=we.ik)(e,t),c._vscf_hmac_update=(e,t)=>(c._vscf_hmac_update=we.jk)(e,t),c._vscf_hmac_reset=e=>(c._vscf_hmac_reset=we.kk)(e),c._vscf_hmac_use_hash=(e,t)=>(c._vscf_hmac_use_hash=we.lk)(e,t),c._vscf_hmac_release_hash=e=>(c._vscf_hmac_release_hash=we.mk)(e),c._vscf_hmac_new=()=>(c._vscf_hmac_new=we.nk)(),c._vscf_hmac_delete=e=>(c._vscf_hmac_delete=we.ok)(e),c._vscf_hmac_shallow_copy=e=>(c._vscf_hmac_shallow_copy=we.pk)(e),c._vscf_hkdf_alg_id=e=>(c._vscf_hkdf_alg_id=we.qk)(e),c._vscf_hkdf_produce_alg_info=e=>(c._vscf_hkdf_produce_alg_info=we.rk)(e),c._vscf_hkdf_restore_alg_info=(e,t)=>(c._vscf_hkdf_restore_alg_info=we.sk)(e,t),c._vscf_hkdf_derive=(e,t,_,r)=>(c._vscf_hkdf_derive=we.tk)(e,t,_,r),c._vscf_hkdf_reset=(e,t,_)=>(c._vscf_hkdf_reset=we.uk)(e,t,_),c._vscf_hkdf_set_info=(e,t)=>(c._vscf_hkdf_set_info=we.vk)(e,t),c._vscf_hkdf_use_hash=(e,t)=>(c._vscf_hkdf_use_hash=we.wk)(e,t),c._vscf_hkdf_release_hash=e=>(c._vscf_hkdf_release_hash=we.xk)(e),c._vscf_hkdf_new=()=>(c._vscf_hkdf_new=we.yk)(),c._vscf_hkdf_delete=e=>(c._vscf_hkdf_delete=we.zk)(e),c._vscf_hkdf_shallow_copy=e=>(c._vscf_hkdf_shallow_copy=we.Ak)(e),c._vscf_kdf1_alg_id=e=>(c._vscf_kdf1_alg_id=we.Bk)(e),c._vscf_kdf1_produce_alg_info=e=>(c._vscf_kdf1_produce_alg_info=we.Ck)(e),c._vscf_kdf1_restore_alg_info=(e,t)=>(c._vscf_kdf1_restore_alg_info=we.Dk)(e,t),c._vscf_kdf1_derive=(e,t,_,r)=>(c._vscf_kdf1_derive=we.Ek)(e,t,_,r),c._vscf_kdf1_use_hash=(e,t)=>(c._vscf_kdf1_use_hash=we.Fk)(e,t),c._vscf_kdf1_release_hash=e=>(c._vscf_kdf1_release_hash=we.Gk)(e),c._vscf_kdf1_new=()=>(c._vscf_kdf1_new=we.Hk)(),c._vscf_kdf1_delete=e=>(c._vscf_kdf1_delete=we.Ik)(e),c._vscf_kdf1_shallow_copy=e=>(c._vscf_kdf1_shallow_copy=we.Jk)(e),c._vscf_kdf2_alg_id=e=>(c._vscf_kdf2_alg_id=we.Kk)(e),c._vscf_kdf2_produce_alg_info=e=>(c._vscf_kdf2_produce_alg_info=we.Lk)(e),c._vscf_kdf2_restore_alg_info=(e,t)=>(c._vscf_kdf2_restore_alg_info=we.Mk)(e,t),c._vscf_kdf2_derive=(e,t,_,r)=>(c._vscf_kdf2_derive=we.Nk)(e,t,_,r),c._vscf_kdf2_use_hash=(e,t)=>(c._vscf_kdf2_use_hash=we.Ok)(e,t),c._vscf_kdf2_release_hash=e=>(c._vscf_kdf2_release_hash=we.Pk)(e),c._vscf_kdf2_new=()=>(c._vscf_kdf2_new=we.Qk)(),c._vscf_kdf2_delete=e=>(c._vscf_kdf2_delete=we.Rk)(e),c._vscf_kdf2_shallow_copy=e=>(c._vscf_kdf2_shallow_copy=we.Sk)(e),c._vscf_fake_random_setup_source_byte=(e,t)=>(c._vscf_fake_random_setup_source_byte=we.Tk)(e,t),c._vscf_fake_random_setup_source_data=(e,t)=>(c._vscf_fake_random_setup_source_data=we.Uk)(e,t),c._vscf_fake_random_random=(e,t,_)=>(c._vscf_fake_random_random=we.Vk)(e,t,_),c._vscf_fake_random_reseed=e=>(c._vscf_fake_random_reseed=we.Wk)(e),c._vscf_fake_random_is_strong=e=>(c._vscf_fake_random_is_strong=we.Xk)(e),c._vscf_fake_random_gather=(e,t,_)=>(c._vscf_fake_random_gather=we.Yk)(e,t,_),c._vscf_fake_random_new=()=>(c._vscf_fake_random_new=we.Zk)(),c._vscf_fake_random_delete=e=>(c._vscf_fake_random_delete=we._k)(e),c._vscf_fake_random_shallow_copy=e=>(c._vscf_fake_random_shallow_copy=we.$k)(e),c._vscf_pkcs5_pbkdf2_setup_defaults=e=>(c._vscf_pkcs5_pbkdf2_setup_defaults=we.al)(e),c._vscf_pkcs5_pbkdf2_alg_id=e=>(c._vscf_pkcs5_pbkdf2_alg_id=we.bl)(e),c._vscf_pkcs5_pbkdf2_produce_alg_info=e=>(c._vscf_pkcs5_pbkdf2_produce_alg_info=we.cl)(e),c._vscf_pkcs5_pbkdf2_restore_alg_info=(e,t)=>(c._vscf_pkcs5_pbkdf2_restore_alg_info=we.dl)(e,t),c._vscf_pkcs5_pbkdf2_reset=(e,t,_)=>(c._vscf_pkcs5_pbkdf2_reset=we.el)(e,t,_),c._vscf_pkcs5_pbkdf2_derive=(e,t,_,r)=>(c._vscf_pkcs5_pbkdf2_derive=we.fl)(e,t,_,r),c._vscf_pkcs5_pbkdf2_set_info=(e,t)=>(c._vscf_pkcs5_pbkdf2_set_info=we.gl)(e,t),c._vscf_pkcs5_pbkdf2_use_hmac=(e,t)=>(c._vscf_pkcs5_pbkdf2_use_hmac=we.hl)(e,t),c._vscf_pkcs5_pbkdf2_release_hmac=e=>(c._vscf_pkcs5_pbkdf2_release_hmac=we.il)(e),c._vscf_pkcs5_pbkdf2_new=()=>(c._vscf_pkcs5_pbkdf2_new=we.jl)(),c._vscf_pkcs5_pbkdf2_delete=e=>(c._vscf_pkcs5_pbkdf2_delete=we.kl)(e),c._vscf_pkcs5_pbkdf2_shallow_copy=e=>(c._vscf_pkcs5_pbkdf2_shallow_copy=we.ll)(e),c._vscf_pkcs5_pbes2_reset=(e,t)=>(c._vscf_pkcs5_pbes2_reset=we.ml)(e,t),c._vscf_pkcs5_pbes2_alg_id=e=>(c._vscf_pkcs5_pbes2_alg_id=we.nl)(e),c._vscf_pkcs5_pbes2_produce_alg_info=e=>(c._vscf_pkcs5_pbes2_produce_alg_info=we.ol)(e),c._vscf_pkcs5_pbes2_restore_alg_info=(e,t)=>(c._vscf_pkcs5_pbes2_restore_alg_info=we.pl)(e,t),c._vscf_pkcs5_pbes2_encrypt=(e,t,_)=>(c._vscf_pkcs5_pbes2_encrypt=we.ql)(e,t,_),c._vscf_pkcs5_pbes2_encrypted_len=(e,t)=>(c._vscf_pkcs5_pbes2_encrypted_len=we.rl)(e,t),c._vscf_pkcs5_pbes2_precise_encrypted_len=(e,t)=>(c._vscf_pkcs5_pbes2_precise_encrypted_len=we.sl)(e,t),c._vscf_pkcs5_pbes2_decrypt=(e,t,_)=>(c._vscf_pkcs5_pbes2_decrypt=we.tl)(e,t,_),c._vscf_pkcs5_pbes2_decrypted_len=(e,t)=>(c._vscf_pkcs5_pbes2_decrypted_len=we.ul)(e,t),c._vscf_pkcs5_pbes2_use_kdf=(e,t)=>(c._vscf_pkcs5_pbes2_use_kdf=we.vl)(e,t),c._vscf_pkcs5_pbes2_release_kdf=e=>(c._vscf_pkcs5_pbes2_release_kdf=we.wl)(e),c._vscf_pkcs5_pbes2_use_cipher=(e,t)=>(c._vscf_pkcs5_pbes2_use_cipher=we.xl)(e,t),c._vscf_pkcs5_pbes2_release_cipher=e=>(c._vscf_pkcs5_pbes2_release_cipher=we.yl)(e),c._vscf_pkcs5_pbes2_new=()=>(c._vscf_pkcs5_pbes2_new=we.zl)(),c._vscf_pkcs5_pbes2_delete=e=>(c._vscf_pkcs5_pbes2_delete=we.Al)(e),c._vscf_pkcs5_pbes2_shallow_copy=e=>(c._vscf_pkcs5_pbes2_shallow_copy=we.Bl)(e),c._vscf_seed_entropy_source_reset_seed=(e,t)=>(c._vscf_seed_entropy_source_reset_seed=we.Cl)(e,t),c._vscf_seed_entropy_source_is_strong=e=>(c._vscf_seed_entropy_source_is_strong=we.Dl)(e),c._vscf_seed_entropy_source_gather=(e,t,_)=>(c._vscf_seed_entropy_source_gather=we.El)(e,t,_),c._vscf_seed_entropy_source_new=()=>(c._vscf_seed_entropy_source_new=we.Fl)(),c._vscf_seed_entropy_source_delete=e=>(c._vscf_seed_entropy_source_delete=we.Gl)(e),c._vscf_seed_entropy_source_shallow_copy=e=>(c._vscf_seed_entropy_source_shallow_copy=we.Hl)(e),c._vscf_key_material_rng_reset_key_material=(e,t)=>(c._vscf_key_material_rng_reset_key_material=we.Il)(e,t),c._vscf_key_material_rng_random=(e,t,_)=>(c._vscf_key_material_rng_random=we.Jl)(e,t,_),c._vscf_key_material_rng_reseed=e=>(c._vscf_key_material_rng_reseed=we.Kl)(e),c._vscf_key_material_rng_new=()=>(c._vscf_key_material_rng_new=we.Ll)(),c._vscf_key_material_rng_delete=e=>(c._vscf_key_material_rng_delete=we.Ml)(e),c._vscf_key_material_rng_shallow_copy=e=>(c._vscf_key_material_rng_shallow_copy=we.Nl)(e),c._vscf_raw_public_key_data=(e,t)=>(c._vscf_raw_public_key_data=we.Ol)(e,t),c._vscf_raw_public_key_alg_id=e=>(c._vscf_raw_public_key_alg_id=we.Pl)(e),c._vscf_raw_public_key_alg_info=e=>(c._vscf_raw_public_key_alg_info=we.Ql)(e),c._vscf_raw_public_key_len=e=>(c._vscf_raw_public_key_len=we.Rl)(e),c._vscf_raw_public_key_bitlen=e=>(c._vscf_raw_public_key_bitlen=we.Sl)(e),c._vscf_raw_public_key_impl_tag=e=>(c._vscf_raw_public_key_impl_tag=we.Tl)(e),c._vscf_raw_public_key_is_valid=e=>(c._vscf_raw_public_key_is_valid=we.Ul)(e),c._vscf_raw_public_key_new=()=>(c._vscf_raw_public_key_new=we.Vl)(),c._vscf_raw_public_key_delete=e=>(c._vscf_raw_public_key_delete=we.Wl)(e),c._vscf_raw_public_key_shallow_copy=e=>(c._vscf_raw_public_key_shallow_copy=we.Xl)(e),c._vscf_raw_private_key_data=(e,t)=>(c._vscf_raw_private_key_data=we.Yl)(e,t),c._vscf_raw_private_key_has_public_key=e=>(c._vscf_raw_private_key_has_public_key=we.Zl)(e),c._vscf_raw_private_key_set_public_key=(e,t)=>(c._vscf_raw_private_key_set_public_key=we._l)(e,t),c._vscf_raw_private_key_get_public_key=e=>(c._vscf_raw_private_key_get_public_key=we.$l)(e),c._vscf_raw_private_key_alg_id=e=>(c._vscf_raw_private_key_alg_id=we.am)(e),c._vscf_raw_private_key_alg_info=e=>(c._vscf_raw_private_key_alg_info=we.bm)(e),c._vscf_raw_private_key_len=e=>(c._vscf_raw_private_key_len=we.cm)(e),c._vscf_raw_private_key_bitlen=e=>(c._vscf_raw_private_key_bitlen=we.dm)(e),c._vscf_raw_private_key_impl_tag=e=>(c._vscf_raw_private_key_impl_tag=we.em)(e),c._vscf_raw_private_key_is_valid=e=>(c._vscf_raw_private_key_is_valid=we.fm)(e),c._vscf_raw_private_key_extract_public_key=e=>(c._vscf_raw_private_key_extract_public_key=we.gm)(e),c._vscf_raw_private_key_new=()=>(c._vscf_raw_private_key_new=we.hm)(),c._vscf_raw_private_key_delete=e=>(c._vscf_raw_private_key_delete=we.im)(e),c._vscf_raw_private_key_shallow_copy=e=>(c._vscf_raw_private_key_shallow_copy=we.jm)(e),c._vscf_pkcs8_serializer_setup_defaults=e=>(c._vscf_pkcs8_serializer_setup_defaults=we.km)(e),c._vscf_pkcs8_serializer_serialize_public_key_inplace=(e,t,_)=>(c._vscf_pkcs8_serializer_serialize_public_key_inplace=we.lm)(e,t,_),c._vscf_pkcs8_serializer_serialized_public_key_len=(e,t)=>(c._vscf_pkcs8_serializer_serialized_public_key_len=we.mm)(e,t),c._vscf_pkcs8_serializer_serialize_private_key_inplace=(e,t,_)=>(c._vscf_pkcs8_serializer_serialize_private_key_inplace=we.nm)(e,t,_),c._vscf_pkcs8_serializer_serialized_private_key_len=(e,t)=>(c._vscf_pkcs8_serializer_serialized_private_key_len=we.om)(e,t),c._vscf_pkcs8_serializer_serialize_public_key=(e,t,_)=>(c._vscf_pkcs8_serializer_serialize_public_key=we.pm)(e,t,_),c._vscf_pkcs8_serializer_serialize_private_key=(e,t,_)=>(c._vscf_pkcs8_serializer_serialize_private_key=we.qm)(e,t,_),c._vscf_pkcs8_serializer_use_asn1_writer=(e,t)=>(c._vscf_pkcs8_serializer_use_asn1_writer=we.rm)(e,t),c._vscf_pkcs8_serializer_release_asn1_writer=e=>(c._vscf_pkcs8_serializer_release_asn1_writer=we.sm)(e),c._vscf_pkcs8_serializer_new=()=>(c._vscf_pkcs8_serializer_new=we.tm)(),c._vscf_pkcs8_serializer_delete=e=>(c._vscf_pkcs8_serializer_delete=we.um)(e),c._vscf_pkcs8_serializer_shallow_copy=e=>(c._vscf_pkcs8_serializer_shallow_copy=we.vm)(e),c._vscf_sec1_serializer_setup_defaults=e=>(c._vscf_sec1_serializer_setup_defaults=we.wm)(e),c._vscf_sec1_serializer_serialize_public_key_inplace=(e,t,_)=>(c._vscf_sec1_serializer_serialize_public_key_inplace=we.xm)(e,t,_),c._vscf_sec1_serializer_serialized_public_key_len=(e,t)=>(c._vscf_sec1_serializer_serialized_public_key_len=we.ym)(e,t),c._vscf_sec1_serializer_serialize_private_key_inplace=(e,t,_)=>(c._vscf_sec1_serializer_serialize_private_key_inplace=we.zm)(e,t,_),c._vscf_sec1_serializer_serialized_private_key_len=(e,t)=>(c._vscf_sec1_serializer_serialized_private_key_len=we.Am)(e,t),c._vscf_sec1_serializer_serialize_public_key=(e,t,_)=>(c._vscf_sec1_serializer_serialize_public_key=we.Bm)(e,t,_),c._vscf_sec1_serializer_serialize_private_key=(e,t,_)=>(c._vscf_sec1_serializer_serialize_private_key=we.Cm)(e,t,_),c._vscf_sec1_serializer_use_asn1_writer=(e,t)=>(c._vscf_sec1_serializer_use_asn1_writer=we.Dm)(e,t),c._vscf_sec1_serializer_release_asn1_writer=e=>(c._vscf_sec1_serializer_release_asn1_writer=we.Em)(e),c._vscf_sec1_serializer_new=()=>(c._vscf_sec1_serializer_new=we.Fm)(),c._vscf_sec1_serializer_delete=e=>(c._vscf_sec1_serializer_delete=we.Gm)(e),c._vscf_sec1_serializer_shallow_copy=e=>(c._vscf_sec1_serializer_shallow_copy=we.Hm)(e),c._vscf_key_asn1_serializer_setup_defaults=e=>(c._vscf_key_asn1_serializer_setup_defaults=we.Im)(e),c._vscf_key_asn1_serializer_serialize_public_key_inplace=(e,t,_)=>(c._vscf_key_asn1_serializer_serialize_public_key_inplace=we.Jm)(e,t,_),c._vscf_key_asn1_serializer_serialized_public_key_len=(e,t)=>(c._vscf_key_asn1_serializer_serialized_public_key_len=we.Km)(e,t),c._vscf_key_asn1_serializer_serialize_private_key_inplace=(e,t,_)=>(c._vscf_key_asn1_serializer_serialize_private_key_inplace=we.Lm)(e,t,_),c._vscf_key_asn1_serializer_serialized_private_key_len=(e,t)=>(c._vscf_key_asn1_serializer_serialized_private_key_len=we.Mm)(e,t),c._vscf_key_asn1_serializer_serialize_public_key=(e,t,_)=>(c._vscf_key_asn1_serializer_serialize_public_key=we.Nm)(e,t,_),c._vscf_key_asn1_serializer_serialize_private_key=(e,t,_)=>(c._vscf_key_asn1_serializer_serialize_private_key=we.Om)(e,t,_),c._vscf_key_asn1_serializer_use_asn1_writer=(e,t)=>(c._vscf_key_asn1_serializer_use_asn1_writer=we.Pm)(e,t),c._vscf_key_asn1_serializer_release_asn1_writer=e=>(c._vscf_key_asn1_serializer_release_asn1_writer=we.Qm)(e),c._vscf_key_asn1_serializer_new=()=>(c._vscf_key_asn1_serializer_new=we.Rm)(),c._vscf_key_asn1_serializer_delete=e=>(c._vscf_key_asn1_serializer_delete=we.Sm)(e),c._vscf_key_asn1_serializer_shallow_copy=e=>(c._vscf_key_asn1_serializer_shallow_copy=we.Tm)(e),c._vscf_key_asn1_deserializer_setup_defaults=e=>(c._vscf_key_asn1_deserializer_setup_defaults=we.Um)(e),c._vscf_key_asn1_deserializer_deserialize_public_key_inplace=(e,t)=>(c._vscf_key_asn1_deserializer_deserialize_public_key_inplace=we.Vm)(e,t),c._vscf_key_asn1_deserializer_deserialize_private_key_inplace=(e,t)=>(c._vscf_key_asn1_deserializer_deserialize_private_key_inplace=we.Wm)(e,t),c._vscf_key_asn1_deserializer_deserialize_public_key=(e,t,_)=>(c._vscf_key_asn1_deserializer_deserialize_public_key=we.Xm)(e,t,_),c._vscf_key_asn1_deserializer_deserialize_private_key=(e,t,_)=>(c._vscf_key_asn1_deserializer_deserialize_private_key=we.Ym)(e,t,_),c._vscf_key_asn1_deserializer_use_asn1_reader=(e,t)=>(c._vscf_key_asn1_deserializer_use_asn1_reader=we.Zm)(e,t),c._vscf_key_asn1_deserializer_release_asn1_reader=e=>(c._vscf_key_asn1_deserializer_release_asn1_reader=we._m)(e),c._vscf_key_asn1_deserializer_new=()=>(c._vscf_key_asn1_deserializer_new=we.$m)(),c._vscf_key_asn1_deserializer_delete=e=>(c._vscf_key_asn1_deserializer_delete=we.an)(e),c._vscf_key_asn1_deserializer_shallow_copy=e=>(c._vscf_key_asn1_deserializer_shallow_copy=we.bn)(e),c._vscf_ed25519_setup_defaults=e=>(c._vscf_ed25519_setup_defaults=we.cn)(e),c._vscf_ed25519_generate_key=(e,t)=>(c._vscf_ed25519_generate_key=we.dn)(e,t),c._vscf_ed25519_generate_ephemeral_key=(e,t,_)=>(c._vscf_ed25519_generate_ephemeral_key=we.en)(e,t,_),c._vscf_ed25519_import_public_key=(e,t,_)=>(c._vscf_ed25519_import_public_key=we.fn)(e,t,_),c._vscf_ed25519_import_public_key_data=(e,t,_,r)=>(c._vscf_ed25519_import_public_key_data=we.gn)(e,t,_,r),c._vscf_ed25519_export_public_key=(e,t,_)=>(c._vscf_ed25519_export_public_key=we.hn)(e,t,_),c._vscf_ed25519_exported_public_key_data_len=(e,t)=>(c._vscf_ed25519_exported_public_key_data_len=we.jn)(e,t),c._vscf_ed25519_export_public_key_data=(e,t,_)=>(c._vscf_ed25519_export_public_key_data=we.kn)(e,t,_),c._vscf_ed25519_import_private_key=(e,t,_)=>(c._vscf_ed25519_import_private_key=we.ln)(e,t,_),c._vscf_ed25519_import_private_key_data=(e,t,_,r)=>(c._vscf_ed25519_import_private_key_data=we.mn)(e,t,_,r),c._vscf_ed25519_export_private_key=(e,t,_)=>(c._vscf_ed25519_export_private_key=we.nn)(e,t,_),c._vscf_ed25519_exported_private_key_data_len=(e,t)=>(c._vscf_ed25519_exported_private_key_data_len=we.on)(e,t),c._vscf_ed25519_export_private_key_data=(e,t,_)=>(c._vscf_ed25519_export_private_key_data=we.pn)(e,t,_),c._vscf_ed25519_can_encrypt=(e,t,_)=>(c._vscf_ed25519_can_encrypt=we.qn)(e,t,_),c._vscf_ed25519_encrypted_len=(e,t,_)=>(c._vscf_ed25519_encrypted_len=we.rn)(e,t,_),c._vscf_ed25519_encrypt=(e,t,_,r)=>(c._vscf_ed25519_encrypt=we.sn)(e,t,_,r),c._vscf_ed25519_can_decrypt=(e,t,_)=>(c._vscf_ed25519_can_decrypt=we.tn)(e,t,_),c._vscf_ed25519_decrypted_len=(e,t,_)=>(c._vscf_ed25519_decrypted_len=we.un)(e,t,_),c._vscf_ed25519_decrypt=(e,t,_,r)=>(c._vscf_ed25519_decrypt=we.vn)(e,t,_,r),c._vscf_ed25519_can_sign=(e,t)=>(c._vscf_ed25519_can_sign=we.wn)(e,t),c._vscf_ed25519_signature_len=(e,t)=>(c._vscf_ed25519_signature_len=we.xn)(e,t),c._vscf_ed25519_sign_hash=(e,t,_,r,s)=>(c._vscf_ed25519_sign_hash=we.yn)(e,t,_,r,s),c._vscf_ed25519_can_verify=(e,t)=>(c._vscf_ed25519_can_verify=we.zn)(e,t),c._vscf_ed25519_verify_hash=(e,t,_,r,s)=>(c._vscf_ed25519_verify_hash=we.An)(e,t,_,r,s),c._vscf_ed25519_compute_shared_key=(e,t,_,r)=>(c._vscf_ed25519_compute_shared_key=we.Bn)(e,t,_,r),c._vscf_ed25519_shared_key_len=(e,t)=>(c._vscf_ed25519_shared_key_len=we.Cn)(e,t),c._vscf_ed25519_kem_shared_key_len=(e,t)=>(c._vscf_ed25519_kem_shared_key_len=we.Dn)(e,t),c._vscf_ed25519_kem_encapsulated_key_len=(e,t)=>(c._vscf_ed25519_kem_encapsulated_key_len=we.En)(e,t),c._vscf_ed25519_kem_encapsulate=(e,t,_,r)=>(c._vscf_ed25519_kem_encapsulate=we.Fn)(e,t,_,r),c._vscf_ed25519_kem_decapsulate=(e,t,_,r)=>(c._vscf_ed25519_kem_decapsulate=we.Gn)(e,t,_,r),c._vscf_ed25519_use_random=(e,t)=>(c._vscf_ed25519_use_random=we.Hn)(e,t),c._vscf_ed25519_release_random=e=>(c._vscf_ed25519_release_random=we.In)(e),c._vscf_ed25519_use_ecies=(e,t)=>(c._vscf_ed25519_use_ecies=we.Jn)(e,t),c._vscf_ed25519_release_ecies=e=>(c._vscf_ed25519_release_ecies=we.Kn)(e),c._vscf_ed25519_new=()=>(c._vscf_ed25519_new=we.Ln)(),c._vscf_ed25519_delete=e=>(c._vscf_ed25519_delete=we.Mn)(e),c._vscf_ed25519_shallow_copy=e=>(c._vscf_ed25519_shallow_copy=we.Nn)(e),c._vscf_curve25519_setup_defaults=e=>(c._vscf_curve25519_setup_defaults=we.On)(e),c._vscf_curve25519_generate_key=(e,t)=>(c._vscf_curve25519_generate_key=we.Pn)(e,t),c._vscf_curve25519_generate_ephemeral_key=(e,t,_)=>(c._vscf_curve25519_generate_ephemeral_key=we.Qn)(e,t,_),c._vscf_curve25519_import_public_key=(e,t,_)=>(c._vscf_curve25519_import_public_key=we.Rn)(e,t,_),c._vscf_curve25519_import_public_key_data=(e,t,_,r)=>(c._vscf_curve25519_import_public_key_data=we.Sn)(e,t,_,r),c._vscf_curve25519_export_public_key=(e,t,_)=>(c._vscf_curve25519_export_public_key=we.Tn)(e,t,_),c._vscf_curve25519_exported_public_key_data_len=(e,t)=>(c._vscf_curve25519_exported_public_key_data_len=we.Un)(e,t),c._vscf_curve25519_export_public_key_data=(e,t,_)=>(c._vscf_curve25519_export_public_key_data=we.Vn)(e,t,_),c._vscf_curve25519_import_private_key=(e,t,_)=>(c._vscf_curve25519_import_private_key=we.Wn)(e,t,_),c._vscf_curve25519_import_private_key_data=(e,t,_,r)=>(c._vscf_curve25519_import_private_key_data=we.Xn)(e,t,_,r),c._vscf_curve25519_export_private_key=(e,t,_)=>(c._vscf_curve25519_export_private_key=we.Yn)(e,t,_),c._vscf_curve25519_exported_private_key_data_len=(e,t)=>(c._vscf_curve25519_exported_private_key_data_len=we.Zn)(e,t),c._vscf_curve25519_export_private_key_data=(e,t,_)=>(c._vscf_curve25519_export_private_key_data=we._n)(e,t,_),c._vscf_curve25519_can_encrypt=(e,t,_)=>(c._vscf_curve25519_can_encrypt=we.$n)(e,t,_),c._vscf_curve25519_encrypted_len=(e,t,_)=>(c._vscf_curve25519_encrypted_len=we.ao)(e,t,_),c._vscf_curve25519_encrypt=(e,t,_,r)=>(c._vscf_curve25519_encrypt=we.bo)(e,t,_,r),c._vscf_curve25519_can_decrypt=(e,t,_)=>(c._vscf_curve25519_can_decrypt=we.co)(e,t,_),c._vscf_curve25519_decrypted_len=(e,t,_)=>(c._vscf_curve25519_decrypted_len=we.eo)(e,t,_),c._vscf_curve25519_decrypt=(e,t,_,r)=>(c._vscf_curve25519_decrypt=we.fo)(e,t,_,r),c._vscf_curve25519_compute_shared_key=(e,t,_,r)=>(c._vscf_curve25519_compute_shared_key=we.go)(e,t,_,r),c._vscf_curve25519_shared_key_len=(e,t)=>(c._vscf_curve25519_shared_key_len=we.ho)(e,t),c._vscf_curve25519_kem_shared_key_len=(e,t)=>(c._vscf_curve25519_kem_shared_key_len=we.io)(e,t),c._vscf_curve25519_kem_encapsulated_key_len=(e,t)=>(c._vscf_curve25519_kem_encapsulated_key_len=we.jo)(e,t),c._vscf_curve25519_kem_encapsulate=(e,t,_,r)=>(c._vscf_curve25519_kem_encapsulate=we.ko)(e,t,_,r),c._vscf_curve25519_kem_decapsulate=(e,t,_,r)=>(c._vscf_curve25519_kem_decapsulate=we.lo)(e,t,_,r),c._vscf_curve25519_use_random=(e,t)=>(c._vscf_curve25519_use_random=we.mo)(e,t),c._vscf_curve25519_release_random=e=>(c._vscf_curve25519_release_random=we.no)(e),c._vscf_curve25519_use_ecies=(e,t)=>(c._vscf_curve25519_use_ecies=we.oo)(e,t),c._vscf_curve25519_release_ecies=e=>(c._vscf_curve25519_release_ecies=we.po)(e),c._vscf_curve25519_new=()=>(c._vscf_curve25519_new=we.qo)(),c._vscf_curve25519_delete=e=>(c._vscf_curve25519_delete=we.ro)(e),c._vscf_curve25519_shallow_copy=e=>(c._vscf_curve25519_shallow_copy=we.so)(e),c._vscf_falcon_setup_defaults=e=>(c._vscf_falcon_setup_defaults=we.to)(e),c._vscf_falcon_generate_key=(e,t)=>(c._vscf_falcon_generate_key=we.uo)(e,t),c._vscf_falcon_produce_alg_info=e=>(c._vscf_falcon_produce_alg_info=we.vo)(e),c._vscf_falcon_alg_id=e=>(c._vscf_falcon_alg_id=we.wo)(e),c._vscf_falcon_restore_alg_info=(e,t)=>(c._vscf_falcon_restore_alg_info=we.xo)(e,t),c._vscf_falcon_generate_ephemeral_key=(e,t,_)=>(c._vscf_falcon_generate_ephemeral_key=we.yo)(e,t,_),c._vscf_falcon_import_public_key=(e,t,_)=>(c._vscf_falcon_import_public_key=we.zo)(e,t,_),c._vscf_falcon_import_public_key_data=(e,t,_,r)=>(c._vscf_falcon_import_public_key_data=we.Ao)(e,t,_,r),c._vscf_falcon_export_public_key=(e,t,_)=>(c._vscf_falcon_export_public_key=we.Bo)(e,t,_),c._vscf_falcon_exported_public_key_data_len=(e,t)=>(c._vscf_falcon_exported_public_key_data_len=we.Co)(e,t),c._vscf_falcon_export_public_key_data=(e,t,_)=>(c._vscf_falcon_export_public_key_data=we.Do)(e,t,_),c._vscf_falcon_import_private_key=(e,t,_)=>(c._vscf_falcon_import_private_key=we.Eo)(e,t,_),c._vscf_falcon_import_private_key_data=(e,t,_,r)=>(c._vscf_falcon_import_private_key_data=we.Fo)(e,t,_,r),c._vscf_falcon_export_private_key=(e,t,_)=>(c._vscf_falcon_export_private_key=we.Go)(e,t,_),c._vscf_falcon_exported_private_key_data_len=(e,t)=>(c._vscf_falcon_exported_private_key_data_len=we.Ho)(e,t),c._vscf_falcon_export_private_key_data=(e,t,_)=>(c._vscf_falcon_export_private_key_data=we.Io)(e,t,_),c._vscf_falcon_can_sign=(e,t)=>(c._vscf_falcon_can_sign=we.Jo)(e,t),c._vscf_falcon_signature_len=(e,t)=>(c._vscf_falcon_signature_len=we.Ko)(e,t),c._vscf_falcon_sign_hash=(e,t,_,r,s)=>(c._vscf_falcon_sign_hash=we.Lo)(e,t,_,r,s),c._vscf_falcon_can_verify=(e,t)=>(c._vscf_falcon_can_verify=we.Mo)(e,t),c._vscf_falcon_verify_hash=(e,t,_,r,s)=>(c._vscf_falcon_verify_hash=we.No)(e,t,_,r,s),c._vscf_falcon_use_random=(e,t)=>(c._vscf_falcon_use_random=we.Oo)(e,t),c._vscf_falcon_release_random=e=>(c._vscf_falcon_release_random=we.Po)(e),c._vscf_falcon_new=()=>(c._vscf_falcon_new=we.Qo)(),c._vscf_falcon_delete=e=>(c._vscf_falcon_delete=we.Ro)(e),c._vscf_falcon_shallow_copy=e=>(c._vscf_falcon_shallow_copy=we.So)(e),c._vscf_round5_setup_defaults=e=>(c._vscf_round5_setup_defaults=we.To)(e),c._vscf_round5_generate_key=(e,t,_)=>(c._vscf_round5_generate_key=we.Uo)(e,t,_),c._vscf_round5_generate_ephemeral_key=(e,t,_)=>(c._vscf_round5_generate_ephemeral_key=we.Vo)(e,t,_),c._vscf_round5_import_public_key=(e,t,_)=>(c._vscf_round5_import_public_key=we.Wo)(e,t,_),c._vscf_round5_import_public_key_data=(e,t,_,r)=>(c._vscf_round5_import_public_key_data=we.Xo)(e,t,_,r),c._vscf_round5_export_public_key=(e,t,_)=>(c._vscf_round5_export_public_key=we.Yo)(e,t,_),c._vscf_round5_exported_public_key_data_len=(e,t)=>(c._vscf_round5_exported_public_key_data_len=we.Zo)(e,t),c._vscf_round5_export_public_key_data=(e,t,_)=>(c._vscf_round5_export_public_key_data=we._o)(e,t,_),c._vscf_round5_import_private_key=(e,t,_)=>(c._vscf_round5_import_private_key=we.$o)(e,t,_),c._vscf_round5_import_private_key_data=(e,t,_,r)=>(c._vscf_round5_import_private_key_data=we.ap)(e,t,_,r),c._vscf_round5_export_private_key=(e,t,_)=>(c._vscf_round5_export_private_key=we.bp)(e,t,_),c._vscf_round5_exported_private_key_data_len=(e,t)=>(c._vscf_round5_exported_private_key_data_len=we.cp)(e,t),c._vscf_round5_export_private_key_data=(e,t,_)=>(c._vscf_round5_export_private_key_data=we.dp)(e,t,_),c._vscf_round5_kem_shared_key_len=(e,t)=>(c._vscf_round5_kem_shared_key_len=we.ep)(e,t),c._vscf_round5_kem_encapsulated_key_len=(e,t)=>(c._vscf_round5_kem_encapsulated_key_len=we.fp)(e,t),c._vscf_round5_kem_encapsulate=(e,t,_,r)=>(c._vscf_round5_kem_encapsulate=we.gp)(e,t,_,r),c._vscf_round5_kem_decapsulate=(e,t,_,r)=>(c._vscf_round5_kem_decapsulate=we.hp)(e,t,_,r),c._vscf_round5_use_random=(e,t)=>(c._vscf_round5_use_random=we.ip)(e,t),c._vscf_round5_release_random=e=>(c._vscf_round5_release_random=we.jp)(e),c._vscf_round5_new=()=>(c._vscf_round5_new=we.kp)(),c._vscf_round5_delete=e=>(c._vscf_round5_delete=we.lp)(e),c._vscf_round5_shallow_copy=e=>(c._vscf_round5_shallow_copy=we.mp)(e),c._vscf_compound_key_alg_info_cipher_alg_info=e=>(c._vscf_compound_key_alg_info_cipher_alg_info=we.np)(e),c._vscf_compound_key_alg_info_signer_alg_info=e=>(c._vscf_compound_key_alg_info_signer_alg_info=we.op)(e),c._vscf_compound_key_alg_info_alg_id=e=>(c._vscf_compound_key_alg_info_alg_id=we.pp)(e),c._vscf_compound_key_alg_info_new=()=>(c._vscf_compound_key_alg_info_new=we.qp)(),c._vscf_compound_key_alg_info_delete=e=>(c._vscf_compound_key_alg_info_delete=we.rp)(e),c._vscf_compound_key_alg_info_shallow_copy=e=>(c._vscf_compound_key_alg_info_shallow_copy=we.sp)(e),c._vscf_compound_public_key_cipher_key=e=>(c._vscf_compound_public_key_cipher_key=we.tp)(e),c._vscf_compound_public_key_signer_key=e=>(c._vscf_compound_public_key_signer_key=we.up)(e),c._vscf_compound_public_key_alg_id=e=>(c._vscf_compound_public_key_alg_id=we.vp)(e),c._vscf_compound_public_key_alg_info=e=>(c._vscf_compound_public_key_alg_info=we.wp)(e),c._vscf_compound_public_key_len=e=>(c._vscf_compound_public_key_len=we.xp)(e),c._vscf_compound_public_key_bitlen=e=>(c._vscf_compound_public_key_bitlen=we.yp)(e),c._vscf_compound_public_key_impl_tag=e=>(c._vscf_compound_public_key_impl_tag=we.zp)(e),c._vscf_compound_public_key_is_valid=e=>(c._vscf_compound_public_key_is_valid=we.Ap)(e),c._vscf_compound_public_key_new=()=>(c._vscf_compound_public_key_new=we.Bp)(),c._vscf_compound_public_key_delete=e=>(c._vscf_compound_public_key_delete=we.Cp)(e),c._vscf_compound_public_key_shallow_copy=e=>(c._vscf_compound_public_key_shallow_copy=we.Dp)(e),c._vscf_compound_private_key_cipher_key=e=>(c._vscf_compound_private_key_cipher_key=we.Ep)(e),c._vscf_compound_private_key_signer_key=e=>(c._vscf_compound_private_key_signer_key=we.Fp)(e),c._vscf_compound_private_key_alg_id=e=>(c._vscf_compound_private_key_alg_id=we.Gp)(e),c._vscf_compound_private_key_alg_info=e=>(c._vscf_compound_private_key_alg_info=we.Hp)(e),c._vscf_compound_private_key_len=e=>(c._vscf_compound_private_key_len=we.Ip)(e),c._vscf_compound_private_key_bitlen=e=>(c._vscf_compound_private_key_bitlen=we.Jp)(e),c._vscf_compound_private_key_impl_tag=e=>(c._vscf_compound_private_key_impl_tag=we.Kp)(e),c._vscf_compound_private_key_is_valid=e=>(c._vscf_compound_private_key_is_valid=we.Lp)(e),c._vscf_compound_private_key_extract_public_key=e=>(c._vscf_compound_private_key_extract_public_key=we.Mp)(e),c._vscf_compound_private_key_new=()=>(c._vscf_compound_private_key_new=we.Np)(),c._vscf_compound_private_key_delete=e=>(c._vscf_compound_private_key_delete=we.Op)(e),c._vscf_compound_private_key_shallow_copy=e=>(c._vscf_compound_private_key_shallow_copy=we.Pp)(e),c._vscf_compound_key_alg_setup_defaults=e=>(c._vscf_compound_key_alg_setup_defaults=we.Qp)(e),c._vscf_compound_key_alg_make_key=(e,t,_,r)=>(c._vscf_compound_key_alg_make_key=we.Rp)(e,t,_,r),c._vscf_compound_key_alg_alg_id=e=>(c._vscf_compound_key_alg_alg_id=we.Sp)(e),c._vscf_compound_key_alg_produce_alg_info=e=>(c._vscf_compound_key_alg_produce_alg_info=we.Tp)(e),c._vscf_compound_key_alg_restore_alg_info=(e,t)=>(c._vscf_compound_key_alg_restore_alg_info=we.Up)(e,t),c._vscf_compound_key_alg_generate_ephemeral_key=(e,t,_)=>(c._vscf_compound_key_alg_generate_ephemeral_key=we.Vp)(e,t,_),c._vscf_compound_key_alg_import_public_key=(e,t,_)=>(c._vscf_compound_key_alg_import_public_key=we.Wp)(e,t,_),c._vscf_compound_key_alg_import_public_key_data=(e,t,_,r)=>(c._vscf_compound_key_alg_import_public_key_data=we.Xp)(e,t,_,r),c._vscf_compound_key_alg_export_public_key=(e,t,_)=>(c._vscf_compound_key_alg_export_public_key=we.Yp)(e,t,_),c._vscf_compound_key_alg_exported_public_key_data_len=(e,t)=>(c._vscf_compound_key_alg_exported_public_key_data_len=we.Zp)(e,t),c._vscf_compound_key_alg_export_public_key_data=(e,t,_)=>(c._vscf_compound_key_alg_export_public_key_data=we._p)(e,t,_),c._vscf_compound_key_alg_import_private_key=(e,t,_)=>(c._vscf_compound_key_alg_import_private_key=we.$p)(e,t,_),c._vscf_compound_key_alg_import_private_key_data=(e,t,_,r)=>(c._vscf_compound_key_alg_import_private_key_data=we.aq)(e,t,_,r),c._vscf_compound_key_alg_export_private_key=(e,t,_)=>(c._vscf_compound_key_alg_export_private_key=we.bq)(e,t,_),c._vscf_compound_key_alg_exported_private_key_data_len=(e,t)=>(c._vscf_compound_key_alg_exported_private_key_data_len=we.cq)(e,t),c._vscf_compound_key_alg_export_private_key_data=(e,t,_)=>(c._vscf_compound_key_alg_export_private_key_data=we.dq)(e,t,_),c._vscf_compound_key_alg_can_encrypt=(e,t,_)=>(c._vscf_compound_key_alg_can_encrypt=we.eq)(e,t,_),c._vscf_compound_key_alg_encrypted_len=(e,t,_)=>(c._vscf_compound_key_alg_encrypted_len=we.fq)(e,t,_),c._vscf_compound_key_alg_encrypt=(e,t,_,r)=>(c._vscf_compound_key_alg_encrypt=we.gq)(e,t,_,r),c._vscf_compound_key_alg_can_decrypt=(e,t,_)=>(c._vscf_compound_key_alg_can_decrypt=we.hq)(e,t,_),c._vscf_compound_key_alg_decrypted_len=(e,t,_)=>(c._vscf_compound_key_alg_decrypted_len=we.iq)(e,t,_),c._vscf_compound_key_alg_decrypt=(e,t,_,r)=>(c._vscf_compound_key_alg_decrypt=we.jq)(e,t,_,r),c._vscf_compound_key_alg_can_sign=(e,t)=>(c._vscf_compound_key_alg_can_sign=we.kq)(e,t),c._vscf_compound_key_alg_signature_len=(e,t)=>(c._vscf_compound_key_alg_signature_len=we.lq)(e,t),c._vscf_compound_key_alg_sign_hash=(e,t,_,r,s)=>(c._vscf_compound_key_alg_sign_hash=we.mq)(e,t,_,r,s),c._vscf_compound_key_alg_can_verify=(e,t)=>(c._vscf_compound_key_alg_can_verify=we.nq)(e,t),c._vscf_compound_key_alg_verify_hash=(e,t,_,r,s)=>(c._vscf_compound_key_alg_verify_hash=we.oq)(e,t,_,r,s),c._vscf_compound_key_alg_use_random=(e,t)=>(c._vscf_compound_key_alg_use_random=we.pq)(e,t),c._vscf_compound_key_alg_release_random=e=>(c._vscf_compound_key_alg_release_random=we.qq)(e),c._vscf_compound_key_alg_new=()=>(c._vscf_compound_key_alg_new=we.rq)(),c._vscf_compound_key_alg_delete=e=>(c._vscf_compound_key_alg_delete=we.sq)(e),c._vscf_compound_key_alg_shallow_copy=e=>(c._vscf_compound_key_alg_shallow_copy=we.tq)(e),c._vscf_hybrid_key_alg_info_first_key_alg_info=e=>(c._vscf_hybrid_key_alg_info_first_key_alg_info=we.uq)(e),c._vscf_hybrid_key_alg_info_second_key_alg_info=e=>(c._vscf_hybrid_key_alg_info_second_key_alg_info=we.vq)(e),c._vscf_hybrid_key_alg_info_alg_id=e=>(c._vscf_hybrid_key_alg_info_alg_id=we.wq)(e),c._vscf_hybrid_key_alg_info_new=()=>(c._vscf_hybrid_key_alg_info_new=we.xq)(),c._vscf_hybrid_key_alg_info_delete=e=>(c._vscf_hybrid_key_alg_info_delete=we.yq)(e),c._vscf_hybrid_key_alg_info_shallow_copy=e=>(c._vscf_hybrid_key_alg_info_shallow_copy=we.zq)(e),c._vscf_hybrid_public_key_first_key=e=>(c._vscf_hybrid_public_key_first_key=we.Aq)(e),c._vscf_hybrid_public_key_second_key=e=>(c._vscf_hybrid_public_key_second_key=we.Bq)(e),c._vscf_hybrid_public_key_alg_id=e=>(c._vscf_hybrid_public_key_alg_id=we.Cq)(e),c._vscf_hybrid_public_key_alg_info=e=>(c._vscf_hybrid_public_key_alg_info=we.Dq)(e),c._vscf_hybrid_public_key_len=e=>(c._vscf_hybrid_public_key_len=we.Eq)(e),c._vscf_hybrid_public_key_bitlen=e=>(c._vscf_hybrid_public_key_bitlen=we.Fq)(e),c._vscf_hybrid_public_key_impl_tag=e=>(c._vscf_hybrid_public_key_impl_tag=we.Gq)(e),c._vscf_hybrid_public_key_is_valid=e=>(c._vscf_hybrid_public_key_is_valid=we.Hq)(e),c._vscf_hybrid_public_key_new=()=>(c._vscf_hybrid_public_key_new=we.Iq)(),c._vscf_hybrid_public_key_delete=e=>(c._vscf_hybrid_public_key_delete=we.Jq)(e),c._vscf_hybrid_public_key_shallow_copy=e=>(c._vscf_hybrid_public_key_shallow_copy=we.Kq)(e),c._vscf_hybrid_private_key_first_key=e=>(c._vscf_hybrid_private_key_first_key=we.Lq)(e),c._vscf_hybrid_private_key_second_key=e=>(c._vscf_hybrid_private_key_second_key=we.Mq)(e),c._vscf_hybrid_private_key_alg_id=e=>(c._vscf_hybrid_private_key_alg_id=we.Nq)(e),c._vscf_hybrid_private_key_alg_info=e=>(c._vscf_hybrid_private_key_alg_info=we.Oq)(e),c._vscf_hybrid_private_key_len=e=>(c._vscf_hybrid_private_key_len=we.Pq)(e),c._vscf_hybrid_private_key_bitlen=e=>(c._vscf_hybrid_private_key_bitlen=we.Qq)(e),c._vscf_hybrid_private_key_impl_tag=e=>(c._vscf_hybrid_private_key_impl_tag=we.Rq)(e),c._vscf_hybrid_private_key_is_valid=e=>(c._vscf_hybrid_private_key_is_valid=we.Sq)(e),c._vscf_hybrid_private_key_extract_public_key=e=>(c._vscf_hybrid_private_key_extract_public_key=we.Tq)(e),c._vscf_hybrid_private_key_new=()=>(c._vscf_hybrid_private_key_new=we.Uq)(),c._vscf_hybrid_private_key_delete=e=>(c._vscf_hybrid_private_key_delete=we.Vq)(e),c._vscf_hybrid_private_key_shallow_copy=e=>(c._vscf_hybrid_private_key_shallow_copy=we.Wq)(e),c._vscf_hybrid_key_alg_setup_defaults=e=>(c._vscf_hybrid_key_alg_setup_defaults=we.Xq)(e),c._vscf_hybrid_key_alg_make_key=(e,t,_,r)=>(c._vscf_hybrid_key_alg_make_key=we.Yq)(e,t,_,r),c._vscf_hybrid_key_alg_generate_ephemeral_key=(e,t,_)=>(c._vscf_hybrid_key_alg_generate_ephemeral_key=we.Zq)(e,t,_),c._vscf_hybrid_key_alg_import_public_key=(e,t,_)=>(c._vscf_hybrid_key_alg_import_public_key=we._q)(e,t,_),c._vscf_hybrid_key_alg_import_public_key_data=(e,t,_,r)=>(c._vscf_hybrid_key_alg_import_public_key_data=we.$q)(e,t,_,r),c._vscf_hybrid_key_alg_export_public_key=(e,t,_)=>(c._vscf_hybrid_key_alg_export_public_key=we.ar)(e,t,_),c._vscf_hybrid_key_alg_exported_public_key_data_len=(e,t)=>(c._vscf_hybrid_key_alg_exported_public_key_data_len=we.br)(e,t),c._vscf_hybrid_key_alg_export_public_key_data=(e,t,_)=>(c._vscf_hybrid_key_alg_export_public_key_data=we.cr)(e,t,_),c._vscf_hybrid_key_alg_import_private_key=(e,t,_)=>(c._vscf_hybrid_key_alg_import_private_key=we.dr)(e,t,_),c._vscf_hybrid_key_alg_import_private_key_data=(e,t,_,r)=>(c._vscf_hybrid_key_alg_import_private_key_data=we.er)(e,t,_,r),c._vscf_hybrid_key_alg_export_private_key=(e,t,_)=>(c._vscf_hybrid_key_alg_export_private_key=we.fr)(e,t,_),c._vscf_hybrid_key_alg_exported_private_key_data_len=(e,t)=>(c._vscf_hybrid_key_alg_exported_private_key_data_len=we.gr)(e,t),c._vscf_hybrid_key_alg_export_private_key_data=(e,t,_)=>(c._vscf_hybrid_key_alg_export_private_key_data=we.hr)(e,t,_),c._vscf_hybrid_key_alg_can_encrypt=(e,t,_)=>(c._vscf_hybrid_key_alg_can_encrypt=we.ir)(e,t,_),c._vscf_hybrid_key_alg_encrypted_len=(e,t,_)=>(c._vscf_hybrid_key_alg_encrypted_len=we.jr)(e,t,_),c._vscf_hybrid_key_alg_encrypt=(e,t,_,r)=>(c._vscf_hybrid_key_alg_encrypt=we.kr)(e,t,_,r),c._vscf_hybrid_key_alg_can_decrypt=(e,t,_)=>(c._vscf_hybrid_key_alg_can_decrypt=we.lr)(e,t,_),c._vscf_hybrid_key_alg_decrypted_len=(e,t,_)=>(c._vscf_hybrid_key_alg_decrypted_len=we.mr)(e,t,_),c._vscf_hybrid_key_alg_decrypt=(e,t,_,r)=>(c._vscf_hybrid_key_alg_decrypt=we.nr)(e,t,_,r),c._vscf_hybrid_key_alg_can_sign=(e,t)=>(c._vscf_hybrid_key_alg_can_sign=we.or)(e,t),c._vscf_hybrid_key_alg_signature_len=(e,t)=>(c._vscf_hybrid_key_alg_signature_len=we.pr)(e,t),c._vscf_hybrid_key_alg_sign_hash=(e,t,_,r,s)=>(c._vscf_hybrid_key_alg_sign_hash=we.qr)(e,t,_,r,s),c._vscf_hybrid_key_alg_can_verify=(e,t)=>(c._vscf_hybrid_key_alg_can_verify=we.rr)(e,t),c._vscf_hybrid_key_alg_verify_hash=(e,t,_,r,s)=>(c._vscf_hybrid_key_alg_verify_hash=we.sr)(e,t,_,r,s),c._vscf_hybrid_key_alg_use_random=(e,t)=>(c._vscf_hybrid_key_alg_use_random=we.tr)(e,t),c._vscf_hybrid_key_alg_release_random=e=>(c._vscf_hybrid_key_alg_release_random=we.ur)(e),c._vscf_hybrid_key_alg_use_cipher=(e,t)=>(c._vscf_hybrid_key_alg_use_cipher=we.vr)(e,t),c._vscf_hybrid_key_alg_release_cipher=e=>(c._vscf_hybrid_key_alg_release_cipher=we.wr)(e),c._vscf_hybrid_key_alg_use_hash=(e,t)=>(c._vscf_hybrid_key_alg_use_hash=we.xr)(e,t),c._vscf_hybrid_key_alg_release_hash=e=>(c._vscf_hybrid_key_alg_release_hash=we.yr)(e),c._vscf_hybrid_key_alg_new=()=>(c._vscf_hybrid_key_alg_new=we.zr)(),c._vscf_hybrid_key_alg_delete=e=>(c._vscf_hybrid_key_alg_delete=we.Ar)(e),c._vscf_hybrid_key_alg_shallow_copy=e=>(c._vscf_hybrid_key_alg_shallow_copy=we.Br)(e),c._vscf_simple_alg_info_alg_id=e=>(c._vscf_simple_alg_info_alg_id=we.Cr)(e),c._vscf_simple_alg_info_new=()=>(c._vscf_simple_alg_info_new=we.Dr)(),c._vscf_simple_alg_info_delete=e=>(c._vscf_simple_alg_info_delete=we.Er)(e),c._vscf_simple_alg_info_shallow_copy=e=>(c._vscf_simple_alg_info_shallow_copy=we.Fr)(e),c._vscf_simple_alg_info_new_with_alg_id=e=>(c._vscf_simple_alg_info_new_with_alg_id=we.Gr)(e),c._vscf_hash_based_alg_info_hash_alg_info=e=>(c._vscf_hash_based_alg_info_hash_alg_info=we.Hr)(e),c._vscf_hash_based_alg_info_alg_id=e=>(c._vscf_hash_based_alg_info_alg_id=we.Ir)(e),c._vscf_hash_based_alg_info_new=()=>(c._vscf_hash_based_alg_info_new=we.Jr)(),c._vscf_hash_based_alg_info_delete=e=>(c._vscf_hash_based_alg_info_delete=we.Kr)(e),c._vscf_hash_based_alg_info_shallow_copy=e=>(c._vscf_hash_based_alg_info_shallow_copy=we.Lr)(e),c._vscf_cipher_alg_info_nonce=(e,t)=>(c._vscf_cipher_alg_info_nonce=we.Mr)(e,t),c._vscf_cipher_alg_info_alg_id=e=>(c._vscf_cipher_alg_info_alg_id=we.Nr)(e),c._vscf_cipher_alg_info_new=()=>(c._vscf_cipher_alg_info_new=we.Or)(),c._vscf_cipher_alg_info_delete=e=>(c._vscf_cipher_alg_info_delete=we.Pr)(e),c._vscf_cipher_alg_info_shallow_copy=e=>(c._vscf_cipher_alg_info_shallow_copy=we.Qr)(e),c._vscf_cipher_alg_info_new_with_members=(e,t)=>(c._vscf_cipher_alg_info_new_with_members=we.Rr)(e,t),c._vscf_salted_kdf_alg_info_hash_alg_info=e=>(c._vscf_salted_kdf_alg_info_hash_alg_info=we.Sr)(e),c._vscf_salted_kdf_alg_info_salt=(e,t)=>(c._vscf_salted_kdf_alg_info_salt=we.Tr)(e,t),c._vscf_salted_kdf_alg_info_iteration_count=e=>(c._vscf_salted_kdf_alg_info_iteration_count=we.Ur)(e),c._vscf_salted_kdf_alg_info_alg_id=e=>(c._vscf_salted_kdf_alg_info_alg_id=we.Vr)(e),c._vscf_salted_kdf_alg_info_new=()=>(c._vscf_salted_kdf_alg_info_new=we.Wr)(),c._vscf_salted_kdf_alg_info_delete=e=>(c._vscf_salted_kdf_alg_info_delete=we.Xr)(e),c._vscf_salted_kdf_alg_info_shallow_copy=e=>(c._vscf_salted_kdf_alg_info_shallow_copy=we.Yr)(e),c._vscf_pbe_alg_info_kdf_alg_info=e=>(c._vscf_pbe_alg_info_kdf_alg_info=we.Zr)(e),c._vscf_pbe_alg_info_cipher_alg_info=e=>(c._vscf_pbe_alg_info_cipher_alg_info=we._r)(e),c._vscf_pbe_alg_info_alg_id=e=>(c._vscf_pbe_alg_info_alg_id=we.$r)(e),c._vscf_pbe_alg_info_new=()=>(c._vscf_pbe_alg_info_new=we.as)(),c._vscf_pbe_alg_info_delete=e=>(c._vscf_pbe_alg_info_delete=we.bs)(e),c._vscf_pbe_alg_info_shallow_copy=e=>(c._vscf_pbe_alg_info_shallow_copy=we.cs)(e),c._vscf_ecc_alg_info_key_id=e=>(c._vscf_ecc_alg_info_key_id=we.ds)(e),c._vscf_ecc_alg_info_domain_id=e=>(c._vscf_ecc_alg_info_domain_id=we.es)(e),c._vscf_ecc_alg_info_alg_id=e=>(c._vscf_ecc_alg_info_alg_id=we.fs)(e),c._vscf_ecc_alg_info_new=()=>(c._vscf_ecc_alg_info_new=we.gs)(),c._vscf_ecc_alg_info_delete=e=>(c._vscf_ecc_alg_info_delete=we.hs)(e),c._vscf_ecc_alg_info_shallow_copy=e=>(c._vscf_ecc_alg_info_shallow_copy=we.is)(e),c._vscf_ecc_alg_info_new_with_members=(e,t,_)=>(c._vscf_ecc_alg_info_new_with_members=we.js)(e,t,_),c._vscf_alg_info_der_serializer_setup_defaults=e=>(c._vscf_alg_info_der_serializer_setup_defaults=we.ks)(e),c._vscf_alg_info_der_serializer_serialize_inplace=(e,t)=>(c._vscf_alg_info_der_serializer_serialize_inplace=we.ls)(e,t),c._vscf_alg_info_der_serializer_serialized_len=(e,t)=>(c._vscf_alg_info_der_serializer_serialized_len=we.ms)(e,t),c._vscf_alg_info_der_serializer_serialize=(e,t,_)=>(c._vscf_alg_info_der_serializer_serialize=we.ns)(e,t,_),c._vscf_alg_info_der_serializer_use_asn1_writer=(e,t)=>(c._vscf_alg_info_der_serializer_use_asn1_writer=we.os)(e,t),c._vscf_alg_info_der_serializer_release_asn1_writer=e=>(c._vscf_alg_info_der_serializer_release_asn1_writer=we.ps)(e),c._vscf_alg_info_der_serializer_new=()=>(c._vscf_alg_info_der_serializer_new=we.qs)(),c._vscf_alg_info_der_serializer_delete=e=>(c._vscf_alg_info_der_serializer_delete=we.rs)(e),c._vscf_alg_info_der_serializer_shallow_copy=e=>(c._vscf_alg_info_der_serializer_shallow_copy=we.ss)(e),c._vscf_alg_info_der_deserializer_setup_defaults=e=>(c._vscf_alg_info_der_deserializer_setup_defaults=we.ts)(e),c._vscf_alg_info_der_deserializer_deserialize_inplace=(e,t)=>(c._vscf_alg_info_der_deserializer_deserialize_inplace=we.us)(e,t),c._vscf_alg_info_der_deserializer_deserialize=(e,t,_)=>(c._vscf_alg_info_der_deserializer_deserialize=we.vs)(e,t,_),c._vscf_alg_info_der_deserializer_use_asn1_reader=(e,t)=>(c._vscf_alg_info_der_deserializer_use_asn1_reader=we.ws)(e,t),c._vscf_alg_info_der_deserializer_release_asn1_reader=e=>(c._vscf_alg_info_der_deserializer_release_asn1_reader=we.xs)(e),c._vscf_alg_info_der_deserializer_new=()=>(c._vscf_alg_info_der_deserializer_new=we.ys)(),c._vscf_alg_info_der_deserializer_delete=e=>(c._vscf_alg_info_der_deserializer_delete=we.zs)(e),c._vscf_alg_info_der_deserializer_shallow_copy=e=>(c._vscf_alg_info_der_deserializer_shallow_copy=we.As)(e),c._vscf_message_info_der_serializer_setup_defaults=e=>(c._vscf_message_info_der_serializer_setup_defaults=we.Bs)(e),c._vscf_message_info_der_serializer_serialized_len=(e,t)=>(c._vscf_message_info_der_serializer_serialized_len=we.Cs)(e,t),c._vscf_message_info_der_serializer_serialize=(e,t,_)=>(c._vscf_message_info_der_serializer_serialize=we.Ds)(e,t,_),c._vscf_message_info_der_serializer_read_prefix=(e,t)=>(c._vscf_message_info_der_serializer_read_prefix=we.Es)(e,t),c._vscf_message_info_der_serializer_deserialize=(e,t,_)=>(c._vscf_message_info_der_serializer_deserialize=we.Fs)(e,t,_),c._vscf_message_info_der_serializer_serialized_footer_len=(e,t)=>(c._vscf_message_info_der_serializer_serialized_footer_len=we.Gs)(e,t),c._vscf_message_info_der_serializer_serialize_footer=(e,t,_)=>(c._vscf_message_info_der_serializer_serialize_footer=we.Hs)(e,t,_),c._vscf_message_info_der_serializer_deserialize_footer=(e,t,_)=>(c._vscf_message_info_der_serializer_deserialize_footer=we.Is)(e,t,_),c._vscf_message_info_der_serializer_use_asn1_reader=(e,t)=>(c._vscf_message_info_der_serializer_use_asn1_reader=we.Js)(e,t),c._vscf_message_info_der_serializer_release_asn1_reader=e=>(c._vscf_message_info_der_serializer_release_asn1_reader=we.Ks)(e),c._vscf_message_info_der_serializer_use_asn1_writer=(e,t)=>(c._vscf_message_info_der_serializer_use_asn1_writer=we.Ls)(e,t),c._vscf_message_info_der_serializer_release_asn1_writer=e=>(c._vscf_message_info_der_serializer_release_asn1_writer=we.Ms)(e),c._vscf_message_info_der_serializer_new=()=>(c._vscf_message_info_der_serializer_new=we.Ns)(),c._vscf_message_info_der_serializer_delete=e=>(c._vscf_message_info_der_serializer_delete=we.Os)(e),c._vscf_message_info_der_serializer_shallow_copy=e=>(c._vscf_message_info_der_serializer_shallow_copy=we.Ps)(e),c._vscf_random_padding_alg_id=e=>(c._vscf_random_padding_alg_id=we.Qs)(e),c._vscf_random_padding_produce_alg_info=e=>(c._vscf_random_padding_produce_alg_info=we.Rs)(e),c._vscf_random_padding_restore_alg_info=(e,t)=>(c._vscf_random_padding_restore_alg_info=we.Ss)(e,t),c._vscf_random_padding_configure=(e,t)=>(c._vscf_random_padding_configure=we.Ts)(e,t),c._vscf_random_padding_padded_data_len=(e,t)=>(c._vscf_random_padding_padded_data_len=we.Us)(e,t),c._vscf_random_padding_len=e=>(c._vscf_random_padding_len=we.Vs)(e),c._vscf_random_padding_len_max=e=>(c._vscf_random_padding_len_max=we.Ws)(e),c._vscf_random_padding_start_data_processing=e=>(c._vscf_random_padding_start_data_processing=we.Xs)(e),c._vscf_random_padding_process_data=(e,t,_)=>(c._vscf_random_padding_process_data=we.Ys)(e,t,_),c._vscf_random_padding_finish_data_processing=(e,t)=>(c._vscf_random_padding_finish_data_processing=we.Zs)(e,t),c._vscf_random_padding_start_padded_data_processing=e=>(c._vscf_random_padding_start_padded_data_processing=we._s)(e),c._vscf_random_padding_process_padded_data=(e,t,_)=>(c._vscf_random_padding_process_padded_data=we.$s)(e,t,_),c._vscf_random_padding_finish_padded_data_processing_out_len=e=>(c._vscf_random_padding_finish_padded_data_processing_out_len=we.at)(e),c._vscf_random_padding_finish_padded_data_processing=(e,t)=>(c._vscf_random_padding_finish_padded_data_processing=we.bt)(e,t),c._vscf_random_padding_use_random=(e,t)=>(c._vscf_random_padding_use_random=we.ct)(e,t),c._vscf_random_padding_release_random=e=>(c._vscf_random_padding_release_random=we.dt)(e),c._vscf_random_padding_new=()=>(c._vscf_random_padding_new=we.et)(),c._vscf_random_padding_delete=e=>(c._vscf_random_padding_delete=we.ft)(e),c._vscf_random_padding_shallow_copy=e=>(c._vscf_random_padding_shallow_copy=we.gt)(e),c._vsc_data_ctx_size=()=>(c._vsc_data_ctx_size=we.ht)(),c._vsc_data=(e,t,_)=>(c._vsc_data=we.it)(e,t,_),c._vsc_data_len=e=>(c._vsc_data_len=we.jt)(e),c._vsc_data_bytes=e=>(c._vsc_data_bytes=we.kt)(e),c._vsc_buffer_new=()=>(c._vsc_buffer_new=we.lt)(),c._vsc_buffer_new_with_capacity=e=>(c._vsc_buffer_new_with_capacity=we.mt)(e),c._vsc_buffer_delete=e=>(c._vsc_buffer_delete=we.nt)(e),c._vsc_buffer_data=(e,t)=>(c._vsc_buffer_data=we.ot)(e,t),c._vsc_buffer_make_secure=e=>(c._vsc_buffer_make_secure=we.pt)(e),c._vsc_buffer_bytes=e=>(c._vsc_buffer_bytes=we.qt)(e),c._vsc_buffer_len=e=>(c._vsc_buffer_len=we.rt)(e),c._malloc=e=>(c._malloc=we.st)(e),c._free=e=>(c._free=we.tt)(e),c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.pop()();return function e(){function _(){if(c.calledRun=!0,!g){var e,_;if(c.noFSInit||$||($=!0,r??=c.stdin,e??=c.stdout,_??=c.stderr,r?ke("stdin",r):xe("/dev/tty","/dev/stdin"),e?ke("stdout",null,e):xe("/dev/tty","/dev/stdout"),_?ke("stderr",null,_):xe("/dev/tty1","/dev/stderr"),ge("/dev/stdin",0),ge("/dev/stdout",1),ge("/dev/stderr",1)),we.k(),Q=!1,t(c),c.onRuntimeInitialized?.(),c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;){var r=c.postRun.shift();A.unshift(r)}b(A)}}if(0<N)w=e;else{if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)F();b(C),0<N?w=e:c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),_()},1)):_()}}(),i},e.exports=r,e.exports.default=r),g.exports;var e,_,r}var k,N,w,I,E,b,A,C,F,T,K,z,S,L,R,B,Y,H,U,M,D,O,G,V,q,j,X,W,Z,$,Q,J,ee,te,_e,re,se,ne,ce,ie,ae,oe,le,fe,ue,de,ve,he,pe,ye,Pe,xe,ge,me,ke,Ne,we,Ie,Ee,be,Ae,Ce,Fe,Te,Ke,ze,Se,Le,Re,Be,Ye,He,Ue,Me,De,Oe,Ge,Ve,qe,je,Xe,We,Ze,$e,Qe,Je,et,tt,_t,rt,st,nt,ct,it,at,ot,lt,ft,ut,dt,vt,ht,pt,yt,Pt,xt,gt,mt,kt,Nt,wt,It,Et,bt,At,Ct,Ft,Tt,Kt,zt,St,Lt,Rt,Bt,Yt,Ht,Ut,Mt,Dt,Ot,Gt,Vt,qt,jt,Xt,Wt,Zt,$t,Qt,Jt,e_,t_,__,r_,s_,n_,c_,i_,a_,o_,l_,f_,u_,d_,v_,h_,p_,y_,P_,x_,g_,m_,k_,N_,w_,I_,E_,b_={};function A_(){if(k)return b_;function e(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 t(t,_){if(e(t,_),0==_)throw new TypeError(`'${t}' is NULL`)}return k=1,b_.ensureNumber=e,b_.ensureString=function(e,t){if(!("string"==typeof t||t instanceof String))throw new TypeError(`'${e}' is not a string`)},b_.ensureBoolean=function(e,t){if("boolean"!=typeof t)throw new TypeError(`'${e}' is not a boolean`)},b_.ensureByteArray=function(e,t){if(!(t instanceof Uint8Array))throw new TypeError(`'${e}' is not an Uint8Array`)},b_.ensureClass=function(e,_,r){if(!(_ instanceof r))throw new TypeError(`'${e}' is not an instance of the class ${r.name}`);t(e,_.ctxPtr)},b_.ensureNotNull=t,b_.ensureImplementInterface=function(e,_,r,s,n){if(t(e,_.ctxPtr),!n.isImplemented(_.ctxPtr,s))throw new TypeError(`'${e}' does not implement interface '${r}'`)},b_}var C_=function(){if(E_)return I_;E_=1;const e=m(),t=r?_:(r=1,_=(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})),g=n?s:(n=1,s=(e,t)=>class{static newAndTakeCContext(_){const r=e._vscf_impl_tag(_);switch(r){case t.FoundationImplTag.AES256_CBC:return t.Aes256Cbc.newAndTakeCContext(_);case t.FoundationImplTag.AES256_GCM:return t.Aes256Gcm.newAndTakeCContext(_);case t.FoundationImplTag.ALG_INFO_DER_DESERIALIZER:return t.AlgInfoDerDeserializer.newAndTakeCContext(_);case t.FoundationImplTag.ALG_INFO_DER_SERIALIZER:return t.AlgInfoDerSerializer.newAndTakeCContext(_);case t.FoundationImplTag.ASN1RD:return t.Asn1rd.newAndTakeCContext(_);case t.FoundationImplTag.ASN1WR:return t.Asn1wr.newAndTakeCContext(_);case t.FoundationImplTag.CIPHER_ALG_INFO:return t.CipherAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_KEY_ALG:return t.CompoundKeyAlg.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_KEY_ALG_INFO:return t.CompoundKeyAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_PRIVATE_KEY:return t.CompoundPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_PUBLIC_KEY:return t.CompoundPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.CTR_DRBG:return t.CtrDrbg.newAndTakeCContext(_);case t.FoundationImplTag.CURVE25519:return t.Curve25519.newAndTakeCContext(_);case t.FoundationImplTag.ECC:return t.Ecc.newAndTakeCContext(_);case t.FoundationImplTag.ECC_ALG_INFO:return t.EccAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.ECC_PRIVATE_KEY:return t.EccPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.ECC_PUBLIC_KEY:return t.EccPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.ED25519:return t.Ed25519.newAndTakeCContext(_);case t.FoundationImplTag.ENTROPY_ACCUMULATOR:return t.EntropyAccumulator.newAndTakeCContext(_);case t.FoundationImplTag.FAKE_RANDOM:return t.FakeRandom.newAndTakeCContext(_);case t.FoundationImplTag.FALCON:return t.Falcon.newAndTakeCContext(_);case t.FoundationImplTag.HASH_BASED_ALG_INFO:return t.HashBasedAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.HKDF:return t.Hkdf.newAndTakeCContext(_);case t.FoundationImplTag.HMAC:return t.Hmac.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_KEY_ALG:return t.HybridKeyAlg.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_KEY_ALG_INFO:return t.HybridKeyAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_PRIVATE_KEY:return t.HybridPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_PUBLIC_KEY:return t.HybridPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.KDF1:return t.Kdf1.newAndTakeCContext(_);case t.FoundationImplTag.KDF2:return t.Kdf2.newAndTakeCContext(_);case t.FoundationImplTag.KEY_ASN1_DESERIALIZER:return t.KeyAsn1Deserializer.newAndTakeCContext(_);case t.FoundationImplTag.KEY_ASN1_SERIALIZER:return t.KeyAsn1Serializer.newAndTakeCContext(_);case t.FoundationImplTag.KEY_MATERIAL_RNG:return t.KeyMaterialRng.newAndTakeCContext(_);case t.FoundationImplTag.MESSAGE_INFO_DER_SERIALIZER:return t.MessageInfoDerSerializer.newAndTakeCContext(_);case t.FoundationImplTag.PBE_ALG_INFO:return t.PbeAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.PKCS5_PBES2:return t.Pkcs5Pbes2.newAndTakeCContext(_);case t.FoundationImplTag.PKCS5_PBKDF2:return t.Pkcs5Pbkdf2.newAndTakeCContext(_);case t.FoundationImplTag.PKCS8_SERIALIZER:return t.Pkcs8Serializer.newAndTakeCContext(_);case t.FoundationImplTag.RANDOM_PADDING:return t.RandomPadding.newAndTakeCContext(_);case t.FoundationImplTag.RAW_PRIVATE_KEY:return t.RawPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.RAW_PUBLIC_KEY:return t.RawPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.ROUND5:return t.Round5.newAndTakeCContext(_);case t.FoundationImplTag.RSA:return t.Rsa.newAndTakeCContext(_);case t.FoundationImplTag.RSA_PRIVATE_KEY:return t.RsaPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.RSA_PUBLIC_KEY:return t.RsaPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.SALTED_KDF_ALG_INFO:return t.SaltedKdfAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.SEC1_SERIALIZER:return t.Sec1Serializer.newAndTakeCContext(_);case t.FoundationImplTag.SEED_ENTROPY_SOURCE:return t.SeedEntropySource.newAndTakeCContext(_);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.SIMPLE_ALG_INFO:return t.SimpleAlgInfo.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,_)}}),k=i?c:(i=1,c=(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})),b_=o?a:(o=1,a=(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 _}),C_=f?l:(f=1,l=(e,t)=>Object.freeze({BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,NULL:5,OID:6,UTF8_STRING:12,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,T61_STRING:20,IA5_STRING:22,UTC_TIME:23,GENERALIZED_TIME:24,UNIVERSAL_STRING:28,BMP_STRING:30,PRIMITIVE:0,CONSTRUCTED:32,CONTEXT_SPECIFIC:128})),F_=d?u:(d=1,u=(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})),T_=h?v:(h=1,v=(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})),K_=y?p:(y=1,p=(e,t)=>Object.freeze({GROUP_INFO:1,REGULAR:2})),z_=x?P:(x=1,P=(e,t)=>Object.freeze({INITIAL:0,ENCRYPTION:1,DECRYPTION:2})),S_=function(){if(w)return N;w=1;const e=A_();return N=(t,_)=>class{static fromAlgId(e){t._vscf_oid_from_alg_id(e)}static toAlgId(_){e.ensureByteArray("oid",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_oid_to_alg_id(c)}finally{t._free(s),t._free(c)}}static fromId(e){t._vscf_oid_from_id(e)}static toId(_){e.ensureByteArray("oid",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_oid_to_id(c)}finally{t._free(s),t._free(c)}}static idToAlgId(e){let _;return _=t._vscf_oid_id_to_alg_id(e),_}static equal(_,r){e.ensureByteArray("lhs",_),e.ensureByteArray("rhs",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r.length*r.BYTES_PER_ELEMENT,o=t._malloc(a);t.HEAP8.set(r,o);const l=t._vsc_data_ctx_size(),f=t._malloc(l);t._vsc_data(f,o,a);try{return!!t._vscf_oid_equal(i,f)}finally{t._free(n),t._free(i),t._free(o),t._free(f)}}}}(),L_=function(){if(E)return I;E=1;const e=A_();return I=(t,_)=>class{static encodedLen(_){let r;return e.ensureNumber("dataLen",_),r=t._vscf_base64_encoded_len(_),r}static encode(r){e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=_.Base64.encodedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{t._vscf_base64_encode(i,o);const e=t._vsc_buffer_bytes(o),_=t._vsc_buffer_len(o);return t.HEAPU8.slice(e,e+_)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}static decodedLen(_){let r;return e.ensureNumber("strLen",_),r=t._vscf_base64_decoded_len(_),r}static decode(r){e.ensureByteArray("str",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=_.Base64.decodedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_base64_decode(i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}}}(),R_=function(){if(A)return b;A=1;const e=A_();return b=(t,_)=>class{static wrappedLen(_,r){let s;return e.ensureString("title",_),e.ensureNumber("dataLen",r),s=t._vscf_pem_wrapped_len(_,r),s}static wrap(r,s){e.ensureString("title",r),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=_.Pem.wrappedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{t._vscf_pem_wrap(r,a,l);const e=t._vsc_buffer_bytes(l),_=t._vsc_buffer_len(l);return t.HEAPU8.slice(e,e+_)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}static unwrappedLen(_){let r;return e.ensureNumber("pemLen",_),r=t._vscf_pem_unwrapped_len(_),r}static unwrap(r){e.ensureByteArray("pem",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=_.Pem.unwrappedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_pem_unwrap(i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}static title(_){e.ensureByteArray("pem",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_pem_title(c)}finally{t._free(s),t._free(c)}}}}(),B_=function(){if(F)return C;F=1;const e=A_();return C=(t,_)=>{class r{constructor(e){this.name="MessageInfo",this.ctxPtr=void 0===e?t._vscf_message_info_new():e}static newAndUseCContext(e){return new r(t._vscf_message_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_message_info_delete(this.ctxPtr),this.ctxPtr=null)}dataEncryptionAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_data_encryption_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}keyRecipientInfoList(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_key_recipient_info_list(this.ctxPtr),_.KeyRecipientInfoList.newAndUseCContext(r)}passwordRecipientInfoList(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_password_recipient_info_list(this.ctxPtr),_.PasswordRecipientInfoList.newAndUseCContext(r)}hasCustomParams(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_message_info_has_custom_params(this.ctxPtr),!!_}customParams(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_custom_params(this.ctxPtr),_.MessageInfoCustomParams.newAndUseCContext(r)}hasCipherKdfAlgInfo(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_message_info_has_cipher_kdf_alg_info(this.ctxPtr),!!_}cipherKdfAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_cipher_kdf_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}hasCipherPaddingAlgInfo(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_message_info_has_cipher_padding_alg_info(this.ctxPtr),!!_}cipherPaddingAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_cipher_padding_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}hasFooterInfo(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_message_info_has_footer_info(this.ctxPtr),!!_}footerInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_footer_info(this.ctxPtr),_.FooterInfo.newAndUseCContext(r)}clear(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_message_info_clear(this.ctxPtr)}}return r}}(),Y_=function(){if(K)return T;K=1;const e=A_();return T=(t,_)=>{class r{constructor(e){this.name="KeyRecipientInfo",this.ctxPtr=void 0===e?t._vscf_key_recipient_info_new():e}static newAndUseCContext(e){return new r(t._vscf_key_recipient_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_key_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}recipientId(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_key_recipient_info_recipient_id(this.ctxPtr)}keyEncryptionAlgorithm(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_key_recipient_info_key_encryption_algorithm(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}encryptedKey(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_key_recipient_info_encrypted_key(this.ctxPtr)}}return r}}(),H_=function(){if(S)return z;S=1;const e=A_();return z=(t,_)=>{class r{constructor(e){this.name="KeyRecipientInfoList",this.ctxPtr=void 0===e?t._vscf_key_recipient_info_list_new():e}static newAndUseCContext(e){return new r(t._vscf_key_recipient_info_list_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_key_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_recipient_info_list_has_item(this.ctxPtr),!!_}item(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_key_recipient_info_list_item(this.ctxPtr),_.KeyRecipientInfo.newAndUseCContext(r)}hasNext(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_recipient_info_list_has_next(this.ctxPtr),!!_}next(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_key_recipient_info_list_next(this.ctxPtr),_.Self.newAndUseCContext(r)}hasPrev(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_recipient_info_list_has_prev(this.ctxPtr),!!_}prev(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_key_recipient_info_list_prev(this.ctxPtr),_.Self.newAndUseCContext(r)}clear(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_key_recipient_info_list_clear(this.ctxPtr)}}return r}}(),U_=function(){if(R)return L;R=1;const e=A_();return L=(t,_)=>{class r{constructor(e){this.name="PasswordRecipientInfo",this.ctxPtr=void 0===e?t._vscf_password_recipient_info_new():e}static newAndUseCContext(e){return new r(t._vscf_password_recipient_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_password_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}keyEncryptionAlgorithm(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_password_recipient_info_key_encryption_algorithm(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}encryptedKey(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_password_recipient_info_encrypted_key(this.ctxPtr)}}return r}}(),M_=function(){if(Y)return B;Y=1;const e=A_();return B=(t,_)=>{class r{constructor(e){this.name="PasswordRecipientInfoList",this.ctxPtr=void 0===e?t._vscf_password_recipient_info_list_new():e}static newAndUseCContext(e){return new r(t._vscf_password_recipient_info_list_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_password_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_password_recipient_info_list_has_item(this.ctxPtr),!!_}item(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_password_recipient_info_list_item(this.ctxPtr),_.PasswordRecipientInfo.newAndUseCContext(r)}hasNext(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_password_recipient_info_list_has_next(this.ctxPtr),!!_}next(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_password_recipient_info_list_next(this.ctxPtr),_.Self.newAndUseCContext(r)}hasPrev(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_password_recipient_info_list_has_prev(this.ctxPtr),!!_}prev(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_password_recipient_info_list_prev(this.ctxPtr),_.Self.newAndUseCContext(r)}clear(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_password_recipient_info_list_clear(this.ctxPtr)}}return r}}(),D_=function(){if(U)return H;U=1;const e=A_();return H=(t,_)=>class{static createHashFromInfo(r){let s;return e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_factory_create_hash_from_info(r.ctxPtr),_.FoundationInterface.newAndTakeCContext(s)}static createMacFromInfo(r){let s;return e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_factory_create_mac_from_info(r.ctxPtr),_.FoundationInterface.newAndTakeCContext(s)}static createKdfFromInfo(r){let s;return e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_factory_create_kdf_from_info(r.ctxPtr),_.FoundationInterface.newAndTakeCContext(s)}static createSaltedKdfFromInfo(r){let s;return e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_factory_create_salted_kdf_from_info(r.ctxPtr),_.FoundationInterface.newAndTakeCContext(s)}static createCipherFromInfo(r){let s;return e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_factory_create_cipher_from_info(r.ctxPtr),_.FoundationInterface.newAndTakeCContext(s)}static createPaddingFromInfo(r,s){let n;return e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),e.ensureImplementInterface("random",s,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),n=t._vscf_alg_factory_create_padding_from_info(r.ctxPtr,s.ctxPtr),_.FoundationInterface.newAndTakeCContext(n)}}}(),O_=function(){if(D)return M;D=1;const e=A_();return M=(t,_)=>class{static createFromAlgId(r,s){e.ensureImplementInterface("random",s,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_key_alg_factory_create_from_alg_id(r,s.ctxPtr,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}static createFromKey(r,s){e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),e.ensureImplementInterface("random",s,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_key_alg_factory_create_from_key(r.ctxPtr,s.ctxPtr,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}static createFromRawPublicKey(r,s){e.ensureClass("publicKey",r,_.RawPublicKey),e.ensureImplementInterface("random",s,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_key_alg_factory_create_from_raw_public_key(r.ctxPtr,s.ctxPtr,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}static createFromRawPrivateKey(r,s){e.ensureClass("privateKey",r,_.RawPrivateKey),e.ensureImplementInterface("random",s,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_key_alg_factory_create_from_raw_private_key(r.ctxPtr,s.ctxPtr,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}}}(),G_=function(){if(G)return O;G=1;const e=A_();return O=(t,_)=>{class r{constructor(e){this.name="Ecies",this.ctxPtr=void 0===e?t._vscf_ecies_new():e}static newAndUseCContext(e){return new r(t._vscf_ecies_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_ecies_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_ecies_release_random(this.ctxPtr),t._vscf_ecies_use_random(this.ctxPtr,r.ctxPtr)}set cipher(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("cipher",r,"Foundation.Cipher",_.FoundationInterfaceTag.CIPHER,_.FoundationInterface),t._vscf_ecies_release_cipher(this.ctxPtr),t._vscf_ecies_use_cipher(this.ctxPtr,r.ctxPtr)}set mac(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("mac",r,"Foundation.Mac",_.FoundationInterfaceTag.MAC,_.FoundationInterface),t._vscf_ecies_release_mac(this.ctxPtr),t._vscf_ecies_use_mac(this.ctxPtr,r.ctxPtr)}set kdf(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("kdf",r,"Foundation.Kdf",_.FoundationInterfaceTag.KDF,_.FoundationInterface),t._vscf_ecies_release_kdf(this.ctxPtr),t._vscf_ecies_use_kdf(this.ctxPtr,r.ctxPtr)}set ephemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("ephemeralKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),t._vscf_ecies_release_ephemeral_key(this.ctxPtr),t._vscf_ecies_use_ephemeral_key(this.ctxPtr,r.ctxPtr)}setKeyAlg(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("keyAlg",r,"Foundation.KeyAlg",_.FoundationInterfaceTag.KEY_ALG,_.FoundationInterface),t._vscf_ecies_set_key_alg(this.ctxPtr,r.ctxPtr)}releaseKeyAlg(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_ecies_release_key_alg(this.ctxPtr)}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_ecies_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}setupDefaultsNoRandom(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_ecies_setup_defaults_no_random(this.ctxPtr)}encryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ecies_encrypted_len(this.ctxPtr,r.ctxPtr,s),n}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.encryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ecies_encrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}decryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ecies_decrypted_len(this.ctxPtr,r.ctxPtr,s),n}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.decryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ecies_decrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}}return r}}(),V_=function(){if(q)return V;q=1;const e=A_();return V=(t,_)=>{class r{constructor(e){this.name="RecipientCipher",this.ctxPtr=void 0===e?t._vscf_recipient_cipher_new():e}static newAndUseCContext(e){return new r(t._vscf_recipient_cipher_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_recipient_cipher_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_recipient_cipher_release_random(this.ctxPtr),t._vscf_recipient_cipher_use_random(this.ctxPtr,r.ctxPtr)}set encryptionCipher(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("encryptionCipher",r,"Foundation.Cipher",_.FoundationInterfaceTag.CIPHER,_.FoundationInterface),t._vscf_recipient_cipher_release_encryption_cipher(this.ctxPtr),t._vscf_recipient_cipher_use_encryption_cipher(this.ctxPtr,r.ctxPtr)}set encryptionPadding(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("encryptionPadding",r,"Foundation.Padding",_.FoundationInterfaceTag.PADDING,_.FoundationInterface),t._vscf_recipient_cipher_release_encryption_padding(this.ctxPtr),t._vscf_recipient_cipher_use_encryption_padding(this.ctxPtr,r.ctxPtr)}set paddingParams(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("paddingParams",r,_.PaddingParams),t._vscf_recipient_cipher_release_padding_params(this.ctxPtr),t._vscf_recipient_cipher_use_padding_params(this.ctxPtr,r.ctxPtr)}set signerHash(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("signerHash",r,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),t._vscf_recipient_cipher_release_signer_hash(this.ctxPtr),t._vscf_recipient_cipher_use_signer_hash(this.ctxPtr,r.ctxPtr)}hasKeyRecipient(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("recipientId",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{return!!t._vscf_recipient_cipher_has_key_recipient(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}addKeyRecipient(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("recipientId",r),e.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);try{t._vscf_recipient_cipher_add_key_recipient(this.ctxPtr,a,s.ctxPtr)}finally{t._free(c),t._free(a)}}clearRecipients(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_recipient_cipher_clear_recipients(this.ctxPtr)}addSigner(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("signerId",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);try{const e=t._vscf_recipient_cipher_add_signer(this.ctxPtr,a,s.ctxPtr);_.FoundationError.handleStatusCode(e)}finally{t._free(c),t._free(a)}}clearSigners(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_recipient_cipher_clear_signers(this.ctxPtr)}customParams(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_recipient_cipher_custom_params(this.ctxPtr),_.MessageInfoCustomParams.newAndUseCContext(r)}startEncryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_recipient_cipher_start_encryption(this.ctxPtr);_.FoundationError.handleStatusCode(r)}startSignedEncryption(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataSize",r);const s=t._vscf_recipient_cipher_start_signed_encryption(this.ctxPtr,r);_.FoundationError.handleStatusCode(s)}messageInfoLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_recipient_cipher_message_info_len(this.ctxPtr),_}packMessageInfo(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.messageInfoLen(),r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_recipient_cipher_pack_message_info(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}encryptionOutLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_recipient_cipher_encryption_out_len(this.ctxPtr,_),r}processEncryption(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.encryptionOutLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_recipient_cipher_process_encryption(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}finishEncryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.encryptionOutLen(0),s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_recipient_cipher_finish_encryption(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}startDecryptionWithKey(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("recipientId",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("messageInfo",n);const c=r.length*r.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(r,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=n.length*n.BYTES_PER_ELEMENT,f=t._malloc(l);t.HEAP8.set(n,f);const u=t._vsc_data_ctx_size(),d=t._malloc(u);t._vsc_data(d,f,l);try{const e=t._vscf_recipient_cipher_start_decryption_with_key(this.ctxPtr,o,s.ctxPtr,d);_.FoundationError.handleStatusCode(e)}finally{t._free(i),t._free(o),t._free(f),t._free(d)}}startVerifiedDecryptionWithKey(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("recipientId",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("messageInfo",n),e.ensureByteArray("messageInfoFooter",c);const i=r.length*r.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(r,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=n.length*n.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(n,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);const h=c.length*c.BYTES_PER_ELEMENT,p=t._malloc(h);t.HEAP8.set(c,p);const y=t._vsc_data_ctx_size(),P=t._malloc(y);t._vsc_data(P,p,h);try{const e=t._vscf_recipient_cipher_start_verified_decryption_with_key(this.ctxPtr,l,s.ctxPtr,v,P);_.FoundationError.handleStatusCode(e)}finally{t._free(a),t._free(l),t._free(u),t._free(v),t._free(p),t._free(P)}}decryptionOutLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_recipient_cipher_decryption_out_len(this.ctxPtr,_),r}processDecryption(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.decryptionOutLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_recipient_cipher_process_decryption(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}finishDecryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.decryptionOutLen(0),s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_recipient_cipher_finish_decryption(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}isDataSigned(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_recipient_cipher_is_data_signed(this.ctxPtr),!!_}signerInfos(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_recipient_cipher_signer_infos(this.ctxPtr),_.SignerInfoList.newAndUseCContext(r)}verifySignerInfo(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("signerInfo",r,_.SignerInfo),e.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),n=t._vscf_recipient_cipher_verify_signer_info(this.ctxPtr,r.ctxPtr,s.ctxPtr),!!n}messageInfoFooterLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_recipient_cipher_message_info_footer_len(this.ctxPtr),_}packMessageInfoFooter(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.messageInfoFooterLen(),s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_recipient_cipher_pack_message_info_footer(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}}return r}}(),q_=function(){if(X)return j;X=1;const e=A_();return j=(t,_)=>{class r{constructor(e){this.name="MessageInfoCustomParams",this.ctxPtr=void 0===e?t._vscf_message_info_custom_params_new():e}static newAndUseCContext(e){return new r(t._vscf_message_info_custom_params_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_message_info_custom_params_delete(this.ctxPtr),this.ctxPtr=null)}static get OF_INT_TYPE(){return 1}get OF_INT_TYPE(){return 1}static get OF_STRING_TYPE(){return 2}get OF_STRING_TYPE(){return 2}static get OF_DATA_TYPE(){return 3}get OF_DATA_TYPE(){return 3}addInt(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",_),e.ensureNumber("value",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);try{t._vscf_message_info_custom_params_add_int(this.ctxPtr,i,r)}finally{t._free(n),t._free(i)}}addString(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",_),e.ensureByteArray("value",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r.length*r.BYTES_PER_ELEMENT,o=t._malloc(a);t.HEAP8.set(r,o);const l=t._vsc_data_ctx_size(),f=t._malloc(l);t._vsc_data(f,o,a);try{t._vscf_message_info_custom_params_add_string(this.ctxPtr,i,f)}finally{t._free(n),t._free(i),t._free(o),t._free(f)}}addData(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",_),e.ensureByteArray("value",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r.length*r.BYTES_PER_ELEMENT,o=t._malloc(a);t.HEAP8.set(r,o);const l=t._vsc_data_ctx_size(),f=t._malloc(l);t._vsc_data(f,o,a);try{t._vscf_message_info_custom_params_add_data(this.ctxPtr,i,f)}finally{t._free(n),t._free(i),t._free(o),t._free(f)}}clear(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_message_info_custom_params_clear(this.ctxPtr)}findInt(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_message_info_custom_params_find_int(this.ctxPtr,i,o);const e=t._vscf_error_status(o);_.FoundationError.handleStatusCode(e)}finally{t._free(n),t._free(i),t._free(o)}}findString(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_message_info_custom_params_find_string(this.ctxPtr,i,o);const e=t._vscf_error_status(o);_.FoundationError.handleStatusCode(e)}finally{t._free(n),t._free(i),t._free(o)}}findData(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_message_info_custom_params_find_data(this.ctxPtr,i,o);const e=t._vscf_error_status(o);_.FoundationError.handleStatusCode(e)}finally{t._free(n),t._free(i),t._free(o)}}hasParams(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_message_info_custom_params_has_params(this.ctxPtr),!!_}}return r}}(),j_=function(){if(Z)return W;Z=1;const e=A_();return W=(t,_)=>{class r{constructor(e){this.name="KeyProvider",this.ctxPtr=void 0===e?t._vscf_key_provider_new():e}static newAndUseCContext(e){return new r(t._vscf_key_provider_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_key_provider_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_key_provider_release_random(this.ctxPtr),t._vscf_key_provider_use_random(this.ctxPtr,r.ctxPtr)}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_key_provider_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}setRsaParams(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("bitlen",_),t._vscf_key_provider_set_rsa_params(this.ctxPtr,_)}generatePrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_key_provider_generate_private_key(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}generatePostQuantumPrivateKey(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_key_provider_generate_post_quantum_private_key(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(n)}finally{t._free(s)}}generateCompoundPrivateKey(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_key_provider_generate_compound_private_key(this.ctxPtr,r,s,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}generateHybridPrivateKey(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_key_provider_generate_hybrid_private_key(this.ctxPtr,r,s,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}generateCompoundHybridPrivateKey(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const i=t._vscf_error_ctx_size(),a=t._malloc(i);let o;t._vscf_error_reset(a);try{o=t._vscf_key_provider_generate_compound_hybrid_private_key(this.ctxPtr,r,s,n,c,a);const e=t._vscf_error_status(a);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(o)}finally{t._free(a)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("keyData",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_key_provider_import_private_key(this.ctxPtr,i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("keyData",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_key_provider_import_public_key(this.ctxPtr,i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}exportedPublicKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_key_provider_exported_public_key_len(this.ctxPtr,r.ctxPtr),s}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=this.exportedPublicKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_key_provider_export_public_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}exportedPrivateKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_key_provider_exported_private_key_len(this.ctxPtr,r.ctxPtr),s}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=this.exportedPrivateKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_key_provider_export_private_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}}return r}}(),X_=function(){if(Q)return $;Q=1;const e=A_();return $=(t,_)=>{class r{constructor(e){this.name="Signer",this.ctxPtr=void 0===e?t._vscf_signer_new():e}static newAndUseCContext(e){return new r(t._vscf_signer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_signer_delete(this.ctxPtr),this.ctxPtr=null)}set hash(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("hash",r,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),t._vscf_signer_release_hash(this.ctxPtr),t._vscf_signer_use_hash(this.ctxPtr,r.ctxPtr)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_signer_release_random(this.ctxPtr),t._vscf_signer_use_random(this.ctxPtr,r.ctxPtr)}reset(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_signer_reset(this.ctxPtr)}appendData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_signer_append_data(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}signatureLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_signer_signature_len(this.ctxPtr,r.ctxPtr),s}sign(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=this.signatureLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_signer_sign(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}}return r}}(),W_=function(){if(ee)return J;ee=1;const e=A_();return J=(t,_)=>{class r{constructor(e){this.name="Verifier",this.ctxPtr=void 0===e?t._vscf_verifier_new():e}static newAndUseCContext(e){return new r(t._vscf_verifier_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_verifier_delete(this.ctxPtr),this.ctxPtr=null)}reset(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("signature",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);try{const e=t._vscf_verifier_reset(this.ctxPtr,i);_.FoundationError.handleStatusCode(e)}finally{t._free(n),t._free(i)}}appendData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_verifier_append_data(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}verify(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_verifier_verify(this.ctxPtr,r.ctxPtr),!!s}}return r}}(),Z_=function(){if(_e)return te;_e=1;const e=A_();return te=(t,_)=>{class r{constructor(e){this.name="BrainkeyClient",this.ctxPtr=void 0===e?t._vscf_brainkey_client_new():e}static newAndUseCContext(e){return new r(t._vscf_brainkey_client_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_brainkey_client_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_brainkey_client_release_random(this.ctxPtr),t._vscf_brainkey_client_use_random(this.ctxPtr,r.ctxPtr)}set operationRandom(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("operationRandom",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_brainkey_client_release_operation_random(this.ctxPtr),t._vscf_brainkey_client_use_operation_random(this.ctxPtr,r.ctxPtr)}static get POINT_LEN(){return 65}get POINT_LEN(){return 65}static get MPI_LEN(){return 32}get MPI_LEN(){return 32}static get SEED_LEN(){return 32}get SEED_LEN(){return 32}static get MAX_PASSWORD_LEN(){return 128}get MAX_PASSWORD_LEN(){return 128}static get MAX_KEY_NAME_LEN(){return 128}get MAX_KEY_NAME_LEN(){return 128}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_brainkey_client_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}blind(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("password",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.MPI_LEN,o=t._vsc_buffer_new_with_capacity(a),l=this.POINT_LEN,f=t._vsc_buffer_new_with_capacity(l);try{const e=t._vscf_brainkey_client_blind(this.ctxPtr,i,o,f);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o),n=t.HEAPU8.slice(r,r+s),c=t._vsc_buffer_bytes(f),a=t._vsc_buffer_len(f);return{deblindFactor:n,blindedPoint:t.HEAPU8.slice(c,c+a)}}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o),t._vsc_buffer_delete(f)}}deblind(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("password",r),e.ensureByteArray("hardenedPoint",s),e.ensureByteArray("deblindFactor",n),e.ensureByteArray("keyName",c);const i=r.length*r.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(r,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=s.length*s.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(s,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);const h=n.length*n.BYTES_PER_ELEMENT,p=t._malloc(h);t.HEAP8.set(n,p);const y=t._vsc_data_ctx_size(),P=t._malloc(y);t._vsc_data(P,p,h);const x=c.length*c.BYTES_PER_ELEMENT,g=t._malloc(x);t.HEAP8.set(c,g);const m=t._vsc_data_ctx_size(),k=t._malloc(m);t._vsc_data(k,g,x);const N=this.POINT_LEN,w=t._vsc_buffer_new_with_capacity(N);try{const e=t._vscf_brainkey_client_deblind(this.ctxPtr,l,v,P,k,w);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(w),s=t._vsc_buffer_len(w);return t.HEAPU8.slice(r,r+s)}finally{t._free(a),t._free(l),t._free(u),t._free(v),t._free(p),t._free(P),t._free(g),t._free(k),t._vsc_buffer_delete(w)}}}return r}}(),$_=function(){if(se)return re;se=1;const e=A_();return re=(t,_)=>{class r{constructor(e){this.name="BrainkeyServer",this.ctxPtr=void 0===e?t._vscf_brainkey_server_new():e}static newAndUseCContext(e){return new r(t._vscf_brainkey_server_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_brainkey_server_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_brainkey_server_release_random(this.ctxPtr),t._vscf_brainkey_server_use_random(this.ctxPtr,r.ctxPtr)}set operationRandom(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("operationRandom",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_brainkey_server_release_operation_random(this.ctxPtr),t._vscf_brainkey_server_use_operation_random(this.ctxPtr,r.ctxPtr)}static get POINT_LEN(){return 65}get POINT_LEN(){return 65}static get MPI_LEN(){return 32}get MPI_LEN(){return 32}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_brainkey_server_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}generateIdentitySecret(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.MPI_LEN,s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_brainkey_server_generate_identity_secret(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}harden(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("identitySecret",r),e.ensureByteArray("blindedPoint",s);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=s.length*s.BYTES_PER_ELEMENT,l=t._malloc(o);t.HEAP8.set(s,l);const f=t._vsc_data_ctx_size(),u=t._malloc(f);t._vsc_data(u,l,o);const d=this.POINT_LEN,v=t._vsc_buffer_new_with_capacity(d);try{const e=t._vscf_brainkey_server_harden(this.ctxPtr,a,u,v);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(v),s=t._vsc_buffer_len(v);return t.HEAPU8.slice(r,r+s)}finally{t._free(c),t._free(a),t._free(l),t._free(u),t._vsc_buffer_delete(v)}}}return r}}(),Q_=function(){if(ce)return ne;ce=1;const e=A_();return ne=(t,_)=>{class r{constructor(e){this.name="GroupSessionMessage",this.ctxPtr=void 0===e?t._vscf_group_session_message_new():e}static newAndUseCContext(e){return new r(t._vscf_group_session_message_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_group_session_message_delete(this.ctxPtr),this.ctxPtr=null)}static get MAX_MESSAGE_LEN(){return 30188}get MAX_MESSAGE_LEN(){return 30188}static get MESSAGE_VERSION(){return 1}get MESSAGE_VERSION(){return 1}getType(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_group_session_message_get_type(this.ctxPtr),_}getSessionId(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_group_session_message_get_session_id(this.ctxPtr)}getEpoch(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_group_session_message_get_epoch(this.ctxPtr),_}serializeLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_group_session_message_serialize_len(this.ctxPtr),_}serialize(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.serializeLen(),r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_group_session_message_serialize(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}static deserialize(r){e.ensureByteArray("input",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_group_session_message_deserialize(i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.Self.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}deserialize(e){return r.deserialize(e)}}return r}}(),J_=function(){if(ae)return ie;ae=1;const e=A_();return ie=(t,_)=>{class r{constructor(e){this.name="GroupSessionTicket",this.ctxPtr=void 0===e?t._vscf_group_session_ticket_new():e}static newAndUseCContext(e){return new r(t._vscf_group_session_ticket_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_group_session_ticket_delete(this.ctxPtr),this.ctxPtr=null)}set rng(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("rng",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_group_session_ticket_release_rng(this.ctxPtr),t._vscf_group_session_ticket_use_rng(this.ctxPtr,r.ctxPtr)}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_group_session_ticket_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}setupTicketAsNew(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("sessionId",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);try{const e=t._vscf_group_session_ticket_setup_ticket_as_new(this.ctxPtr,i);_.FoundationError.handleStatusCode(e)}finally{t._free(n),t._free(i)}}getTicketMessage(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_group_session_ticket_get_ticket_message(this.ctxPtr),_.GroupSessionMessage.newAndUseCContext(r)}}return r}}(),er=function(){if(le)return oe;le=1;const e=A_();return oe=(t,_)=>{class r{constructor(e){this.name="GroupSession",this.ctxPtr=void 0===e?t._vscf_group_session_new():e}static newAndUseCContext(e){return new r(t._vscf_group_session_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_group_session_delete(this.ctxPtr),this.ctxPtr=null)}set rng(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("rng",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_group_session_release_rng(this.ctxPtr),t._vscf_group_session_use_rng(this.ctxPtr,r.ctxPtr)}static get SENDER_ID_LEN(){return 32}get SENDER_ID_LEN(){return 32}static get MAX_PLAIN_TEXT_LEN(){return 3e4}get MAX_PLAIN_TEXT_LEN(){return 3e4}static get MAX_EPOCHS_COUNT(){return 50}get MAX_EPOCHS_COUNT(){return 50}static get SALT_SIZE(){return 32}get SALT_SIZE(){return 32}getCurrentEpoch(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_group_session_get_current_epoch(this.ctxPtr),_}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_group_session_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}getSessionId(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_group_session_get_session_id(this.ctxPtr)}addEpoch(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("message",r,_.GroupSessionMessage);const s=t._vscf_group_session_add_epoch(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("plainText",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=t._vscf_error_ctx_size(),l=t._malloc(o);let f;t._vscf_error_reset(l);try{f=t._vscf_group_session_encrypt(this.ctxPtr,a,s.ctxPtr,l);const e=t._vscf_error_status(l);return _.FoundationError.handleStatusCode(e),_.GroupSessionMessage.newAndTakeCContext(f)}finally{t._free(c),t._free(a),t._free(l)}}decryptLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("message",r,_.GroupSessionMessage),s=t._vscf_group_session_decrypt_len(this.ctxPtr,r.ctxPtr),s}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("message",r,_.GroupSessionMessage),e.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const n=this.decryptLen(r),c=t._vsc_buffer_new_with_capacity(n);try{const e=t._vscf_group_session_decrypt(this.ctxPtr,r.ctxPtr,s.ctxPtr,c);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(c),i=t._vsc_buffer_len(c);return t.HEAPU8.slice(n,n+i)}finally{t._vsc_buffer_delete(c)}}createGroupTicket(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_group_session_create_group_ticket(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.GroupSessionTicket.newAndTakeCContext(n)}finally{t._free(s)}}}return r}}(),tr=function(){if(ue)return fe;ue=1;const e=A_();return fe=(t,_)=>{class r{constructor(e){this.name="MessageInfoEditor",this.ctxPtr=void 0===e?t._vscf_message_info_editor_new():e}static newAndUseCContext(e){return new r(t._vscf_message_info_editor_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_message_info_editor_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_message_info_editor_release_random(this.ctxPtr),t._vscf_message_info_editor_use_random(this.ctxPtr,r.ctxPtr)}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_message_info_editor_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}unpack(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("messageInfoData",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);try{const e=t._vscf_message_info_editor_unpack(this.ctxPtr,i);_.FoundationError.handleStatusCode(e)}finally{t._free(n),t._free(i)}}unlock(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("ownerRecipientId",r),e.ensureImplementInterface("ownerPrivateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);try{const e=t._vscf_message_info_editor_unlock(this.ctxPtr,a,s.ctxPtr);_.FoundationError.handleStatusCode(e)}finally{t._free(c),t._free(a)}}addKeyRecipient(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("recipientId",r),e.ensureImplementInterface("publicKey",s,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);try{const e=t._vscf_message_info_editor_add_key_recipient(this.ctxPtr,a,s.ctxPtr);_.FoundationError.handleStatusCode(e)}finally{t._free(c),t._free(a)}}removeKeyRecipient(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("recipientId",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{return!!t._vscf_message_info_editor_remove_key_recipient(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}removeAll(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_message_info_editor_remove_all(this.ctxPtr)}packedLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_message_info_editor_packed_len(this.ctxPtr),_}pack(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.packedLen(),r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_message_info_editor_pack(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}}return r}}(),_r=function(){if(ve)return de;ve=1;const e=A_();return de=(t,_)=>{class r{constructor(e){this.name="SignerInfo",this.ctxPtr=void 0===e?t._vscf_signer_info_new():e}static newAndUseCContext(e){return new r(t._vscf_signer_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_signer_info_delete(this.ctxPtr),this.ctxPtr=null)}signerId(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_signer_info_signer_id(this.ctxPtr)}signerAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_signer_info_signer_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}signature(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_signer_info_signature(this.ctxPtr)}}return r}}(),rr=function(){if(pe)return he;pe=1;const e=A_();return he=(t,_)=>{class r{constructor(e){this.name="SignerInfoList",this.ctxPtr=void 0===e?t._vscf_signer_info_list_new():e}static newAndUseCContext(e){return new r(t._vscf_signer_info_list_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_signer_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_signer_info_list_has_item(this.ctxPtr),!!_}item(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_signer_info_list_item(this.ctxPtr),_.SignerInfo.newAndUseCContext(r)}hasNext(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_signer_info_list_has_next(this.ctxPtr),!!_}next(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_signer_info_list_next(this.ctxPtr),_.Self.newAndUseCContext(r)}hasPrev(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_signer_info_list_has_prev(this.ctxPtr),!!_}prev(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_signer_info_list_prev(this.ctxPtr),_.Self.newAndUseCContext(r)}clear(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_signer_info_list_clear(this.ctxPtr)}}return r}}(),sr=function(){if(Pe)return ye;Pe=1;const e=A_();return ye=(t,_)=>{class r{constructor(e){this.name="MessageInfoFooter",this.ctxPtr=void 0===e?t._vscf_message_info_footer_new():e}static newAndUseCContext(e){return new r(t._vscf_message_info_footer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_message_info_footer_delete(this.ctxPtr),this.ctxPtr=null)}hasSignerInfos(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_message_info_footer_has_signer_infos(this.ctxPtr),!!_}signerInfos(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_footer_signer_infos(this.ctxPtr),_.SignerInfoList.newAndUseCContext(r)}signerHashAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_message_info_footer_signer_hash_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}signerDigest(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_message_info_footer_signer_digest(this.ctxPtr)}}return r}}(),nr=function(){if(ge)return xe;ge=1;const e=A_();return xe=(t,_)=>{class r{constructor(e){this.name="SignedDataInfo",this.ctxPtr=void 0===e?t._vscf_signed_data_info_new():e}static newAndUseCContext(e){return new r(t._vscf_signed_data_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_signed_data_info_delete(this.ctxPtr),this.ctxPtr=null)}hashAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_signed_data_info_hash_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),cr=function(){if(ke)return me;ke=1;const e=A_();return me=(t,_)=>{class r{constructor(e){this.name="FooterInfo",this.ctxPtr=void 0===e?t._vscf_footer_info_new():e}static newAndUseCContext(e){return new r(t._vscf_footer_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_footer_info_delete(this.ctxPtr),this.ctxPtr=null)}hasSignedDataInfo(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_footer_info_has_signed_data_info(this.ctxPtr),!!_}signedDataInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_footer_info_signed_data_info(this.ctxPtr),_.SignedDataInfo.newAndUseCContext(r)}setDataSize(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataSize",_),t._vscf_footer_info_set_data_size(this.ctxPtr,_)}dataSize(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_footer_info_data_size(this.ctxPtr),_}}return r}}(),ir=function(){if(we)return Ne;we=1;const e=A_();return Ne=(t,_)=>{class r{constructor(e){this.name="KeyInfo",this.ctxPtr=void 0===e?t._vscf_key_info_new():e}static newAndUseCContext(e){return new r(t._vscf_key_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_key_info_delete(this.ctxPtr),this.ctxPtr=null)}isCompound(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_compound(this.ctxPtr),!!_}isHybrid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_hybrid(this.ctxPtr),!!_}isCompoundHybrid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_compound_hybrid(this.ctxPtr),!!_}isCompoundHybridCipher(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_compound_hybrid_cipher(this.ctxPtr),!!_}isCompoundHybridSigner(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_compound_hybrid_signer(this.ctxPtr),!!_}isHybridPostQuantum(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_hybrid_post_quantum(this.ctxPtr),!!_}isHybridPostQuantumCipher(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_hybrid_post_quantum_cipher(this.ctxPtr),!!_}isHybridPostQuantumSigner(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_is_hybrid_post_quantum_signer(this.ctxPtr),!!_}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_alg_id(this.ctxPtr),_}compoundCipherAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_compound_cipher_alg_id(this.ctxPtr),_}compoundSignerAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_compound_signer_alg_id(this.ctxPtr),_}hybridFirstKeyAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_hybrid_first_key_alg_id(this.ctxPtr),_}hybridSecondKeyAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_hybrid_second_key_alg_id(this.ctxPtr),_}compoundHybridCipherFirstKeyAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_compound_hybrid_cipher_first_key_alg_id(this.ctxPtr),_}compoundHybridCipherSecondKeyAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_compound_hybrid_cipher_second_key_alg_id(this.ctxPtr),_}compoundHybridSignerFirstKeyAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_compound_hybrid_signer_first_key_alg_id(this.ctxPtr),_}compoundHybridSignerSecondKeyAlgId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_key_info_compound_hybrid_signer_second_key_alg_id(this.ctxPtr),_}}return r}}(),ar=function(){if(Ee)return Ie;Ee=1;const e=A_();return Ie=(t,_)=>{class r{constructor(e){this.name="PaddingParams",this.ctxPtr=void 0===e?t._vscf_padding_params_new():e}static newAndUseCContext(e){return new r(t._vscf_padding_params_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_padding_params_delete(this.ctxPtr),this.ctxPtr=null)}static get DEFAULT_FRAME_MIN(){return 32}get DEFAULT_FRAME_MIN(){return 32}static get DEFAULT_FRAME(){return 160}get DEFAULT_FRAME(){return 160}static get DEFAULT_FRAME_MAX(){return 256}get DEFAULT_FRAME_MAX(){return 256}frame(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_padding_params_frame(this.ctxPtr),_}frameMax(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_padding_params_frame_max(this.ctxPtr),_}}return r}}(),or=function(){if(Ae)return be;Ae=1;const e=A_();return be=(t,_)=>{class r{constructor(e){this.name="Sha224",this.ctxPtr=void 0===e?t._vscf_sha224_new():e}static newAndUseCContext(e){return new r(t._vscf_sha224_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_sha224_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 28}get DIGEST_LEN(){return 28}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return 64}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_sha224_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_sha224_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_sha224_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}static hash(_){e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);const i=this.DIGEST_LEN,a=t._vsc_buffer_new_with_capacity(i);try{t._vscf_sha224_hash(c,a);const e=t._vsc_buffer_bytes(a),_=t._vsc_buffer_len(a);return t.HEAPU8.slice(e,e+_)}finally{t._free(s),t._free(c),t._vsc_buffer_delete(a)}}hash(e){return r.hash(e)}start(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_sha224_start(this.ctxPtr)}update(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_sha224_update(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}finish(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.DIGEST_LEN,r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_sha224_finish(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}}return r}}(),lr=function(){if(Fe)return Ce;Fe=1;const e=A_();return Ce=(t,_)=>{class r{constructor(e){this.name="Sha256",this.ctxPtr=void 0===e?t._vscf_sha256_new():e}static newAndUseCContext(e){return new r(t._vscf_sha256_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_sha256_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 32}get DIGEST_LEN(){return 32}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return 64}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_sha256_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_sha256_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_sha256_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}static hash(_){e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);const i=this.DIGEST_LEN,a=t._vsc_buffer_new_with_capacity(i);try{t._vscf_sha256_hash(c,a);const e=t._vsc_buffer_bytes(a),_=t._vsc_buffer_len(a);return t.HEAPU8.slice(e,e+_)}finally{t._free(s),t._free(c),t._vsc_buffer_delete(a)}}hash(e){return r.hash(e)}start(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_sha256_start(this.ctxPtr)}update(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_sha256_update(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}finish(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.DIGEST_LEN,r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_sha256_finish(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}}return r}}(),fr=function(){if(Ke)return Te;Ke=1;const e=A_();return Te=(t,_)=>{class r{constructor(e){this.name="Sha384",this.ctxPtr=void 0===e?t._vscf_sha384_new():e}static newAndUseCContext(e){return new r(t._vscf_sha384_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_sha384_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 48}get DIGEST_LEN(){return 48}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return 128}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_sha384_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_sha384_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_sha384_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}static hash(_){e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);const i=this.DIGEST_LEN,a=t._vsc_buffer_new_with_capacity(i);try{t._vscf_sha384_hash(c,a);const e=t._vsc_buffer_bytes(a),_=t._vsc_buffer_len(a);return t.HEAPU8.slice(e,e+_)}finally{t._free(s),t._free(c),t._vsc_buffer_delete(a)}}hash(e){return r.hash(e)}start(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_sha384_start(this.ctxPtr)}update(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_sha384_update(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}finish(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.DIGEST_LEN,r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_sha384_finish(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}}return r}}(),ur=function(){if(Se)return ze;Se=1;const e=A_();return ze=(t,_)=>{class r{constructor(e){this.name="Sha512",this.ctxPtr=void 0===e?t._vscf_sha512_new():e}static newAndUseCContext(e){return new r(t._vscf_sha512_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_sha512_delete(this.ctxPtr),this.ctxPtr=null)}static get DIGEST_LEN(){return 64}get DIGEST_LEN(){return 64}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return 128}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_sha512_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_sha512_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_sha512_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}static hash(_){e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);const i=this.DIGEST_LEN,a=t._vsc_buffer_new_with_capacity(i);try{t._vscf_sha512_hash(c,a);const e=t._vsc_buffer_bytes(a),_=t._vsc_buffer_len(a);return t.HEAPU8.slice(e,e+_)}finally{t._free(s),t._free(c),t._vsc_buffer_delete(a)}}hash(e){return r.hash(e)}start(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_sha512_start(this.ctxPtr)}update(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_sha512_update(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}finish(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.DIGEST_LEN,r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_sha512_finish(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}}return r}}(),dr=function(){if(Re)return Le;Re=1;const e=A_();return Le=(t,_)=>{class r{constructor(e){this.name="Aes256Gcm",this.ctxPtr=void 0===e?t._vscf_aes256_gcm_new():e}static newAndUseCContext(e){return new r(t._vscf_aes256_gcm_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_aes256_gcm_delete(this.ctxPtr),this.ctxPtr=null)}static get NONCE_LEN(){return 12}get NONCE_LEN(){return 12}static get KEY_LEN(){return 32}get KEY_LEN(){return 32}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return 256}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return 16}static get AUTH_TAG_LEN(){return 16}get AUTH_TAG_LEN(){return 16}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_aes256_gcm_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_aes256_gcm_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_aes256_gcm_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}encrypt(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.encryptedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_aes256_gcm_encrypt(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}encryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_encrypted_len(this.ctxPtr,_),r}preciseEncryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_precise_encrypted_len(this.ctxPtr,_),r}decrypt(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.decryptedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_aes256_gcm_decrypt(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}decryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_decrypted_len(this.ctxPtr,_),r}setNonce(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("nonce",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_aes256_gcm_set_nonce(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}setKey(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_aes256_gcm_set_key(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}startEncryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_aes256_gcm_start_encryption(this.ctxPtr)}startDecryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_aes256_gcm_start_decryption(this.ctxPtr)}update(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);const i=this.outLen(_.length),a=t._vsc_buffer_new_with_capacity(i);try{t._vscf_aes256_gcm_update(this.ctxPtr,c,a);const e=t._vsc_buffer_bytes(a),_=t._vsc_buffer_len(a);return t.HEAPU8.slice(e,e+_)}finally{t._free(s),t._free(c),t._vsc_buffer_delete(a)}}outLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_out_len(this.ctxPtr,_),r}encryptedOutLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_encrypted_out_len(this.ctxPtr,_),r}decryptedOutLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_decrypted_out_len(this.ctxPtr,_),r}finish(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.outLen(0),s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_aes256_gcm_finish(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}authEncrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r),e.ensureByteArray("authData",s);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=s.length*s.BYTES_PER_ELEMENT,l=t._malloc(o);t.HEAP8.set(s,l);const f=t._vsc_data_ctx_size(),u=t._malloc(f);t._vsc_data(u,l,o);const d=this.authEncryptedLen(r.length),v=t._vsc_buffer_new_with_capacity(d),h=this.AUTH_TAG_LEN,p=t._vsc_buffer_new_with_capacity(h);try{const e=t._vscf_aes256_gcm_auth_encrypt(this.ctxPtr,a,u,v,p);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(v),s=t._vsc_buffer_len(v),n=t.HEAPU8.slice(r,r+s),c=t._vsc_buffer_bytes(p),i=t._vsc_buffer_len(p);return{out:n,tag:t.HEAPU8.slice(c,c+i)}}finally{t._free(c),t._free(a),t._free(l),t._free(u),t._vsc_buffer_delete(v),t._vsc_buffer_delete(p)}}authEncryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_auth_encrypted_len(this.ctxPtr,_),r}authDecrypt(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r),e.ensureByteArray("authData",s),e.ensureByteArray("tag",n);const c=r.length*r.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(r,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=s.length*s.BYTES_PER_ELEMENT,f=t._malloc(l);t.HEAP8.set(s,f);const u=t._vsc_data_ctx_size(),d=t._malloc(u);t._vsc_data(d,f,l);const v=n.length*n.BYTES_PER_ELEMENT,h=t._malloc(v);t.HEAP8.set(n,h);const p=t._vsc_data_ctx_size(),y=t._malloc(p);t._vsc_data(y,h,v);const P=this.authDecryptedLen(r.length),x=t._vsc_buffer_new_with_capacity(P);try{const e=t._vscf_aes256_gcm_auth_decrypt(this.ctxPtr,o,d,y,x);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(x),s=t._vsc_buffer_len(x);return t.HEAPU8.slice(r,r+s)}finally{t._free(i),t._free(o),t._free(f),t._free(d),t._free(h),t._free(y),t._vsc_buffer_delete(x)}}authDecryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_gcm_auth_decrypted_len(this.ctxPtr,_),r}setAuthData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("authData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_aes256_gcm_set_auth_data(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}finishAuthEncryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.outLen(0),s=t._vsc_buffer_new_with_capacity(r),n=this.AUTH_TAG_LEN,c=t._vsc_buffer_new_with_capacity(n);try{const e=t._vscf_aes256_gcm_finish_auth_encryption(this.ctxPtr,s,c);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s),i=t.HEAPU8.slice(r,r+n),a=t._vsc_buffer_bytes(c),o=t._vsc_buffer_len(c);return{out:i,tag:t.HEAPU8.slice(a,a+o)}}finally{t._vsc_buffer_delete(s),t._vsc_buffer_delete(c)}}finishAuthDecryption(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("tag",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.outLen(0),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_aes256_gcm_finish_auth_decryption(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}}return r}}(),vr=function(){if(Ye)return Be;Ye=1;const e=A_();return Be=(t,_)=>{class r{constructor(e){this.name="Aes256Cbc",this.ctxPtr=void 0===e?t._vscf_aes256_cbc_new():e}static newAndUseCContext(e){return new r(t._vscf_aes256_cbc_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_aes256_cbc_delete(this.ctxPtr),this.ctxPtr=null)}static get NONCE_LEN(){return 16}get NONCE_LEN(){return 16}static get KEY_LEN(){return 32}get KEY_LEN(){return 32}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return 256}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return 16}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_aes256_cbc_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_aes256_cbc_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_aes256_cbc_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}encrypt(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.encryptedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_aes256_cbc_encrypt(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}encryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_cbc_encrypted_len(this.ctxPtr,_),r}preciseEncryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_cbc_precise_encrypted_len(this.ctxPtr,_),r}decrypt(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.decryptedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_aes256_cbc_decrypt(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}decryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_cbc_decrypted_len(this.ctxPtr,_),r}setNonce(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("nonce",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_aes256_cbc_set_nonce(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}setKey(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_aes256_cbc_set_key(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}startEncryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_aes256_cbc_start_encryption(this.ctxPtr)}startDecryption(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_aes256_cbc_start_decryption(this.ctxPtr)}update(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);const i=this.outLen(_.length),a=t._vsc_buffer_new_with_capacity(i);try{t._vscf_aes256_cbc_update(this.ctxPtr,c,a);const e=t._vsc_buffer_bytes(a),_=t._vsc_buffer_len(a);return t.HEAPU8.slice(e,e+_)}finally{t._free(s),t._free(c),t._vsc_buffer_delete(a)}}outLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_cbc_out_len(this.ctxPtr,_),r}encryptedOutLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_cbc_encrypted_out_len(this.ctxPtr,_),r}decryptedOutLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_aes256_cbc_decrypted_out_len(this.ctxPtr,_),r}finish(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.outLen(0),s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_aes256_cbc_finish(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}}return r}}(),hr=function(){if(Ue)return He;Ue=1;const e=A_();return He=(t,_)=>{class r{constructor(e){this.name="Asn1rd",this.ctxPtr=void 0===e?t._vscf_asn1rd_new():e}static newAndUseCContext(e){return new r(t._vscf_asn1rd_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_asn1rd_delete(this.ctxPtr),this.ctxPtr=null)}reset(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_asn1rd_reset(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}leftLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_left_len(this.ctxPtr),_}hasError(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_has_error(this.ctxPtr),!!_}status(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_asn1rd_status(this.ctxPtr);_.FoundationError.handleStatusCode(r)}getTag(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_get_tag(this.ctxPtr),_}getLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_get_len(this.ctxPtr),_}getDataLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_get_data_len(this.ctxPtr),_}readTag(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("tag",_),r=t._vscf_asn1rd_read_tag(this.ctxPtr,_),r}readContextTag(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("tag",_),r=t._vscf_asn1rd_read_context_tag(this.ctxPtr,_),r}readInt(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_int(this.ctxPtr),_}readInt8(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_int8(this.ctxPtr),_}readInt16(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_int16(this.ctxPtr),_}readInt32(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_int32(this.ctxPtr),_}readInt64(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_int64(this.ctxPtr),_}readUint(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_uint(this.ctxPtr),_}readUint8(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_uint8(this.ctxPtr),_}readUint16(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_uint16(this.ctxPtr),_}readUint32(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_uint32(this.ctxPtr),_}readUint64(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_uint64(this.ctxPtr),_}readBool(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_bool(this.ctxPtr),!!_}readNull(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_asn1rd_read_null(this.ctxPtr)}readNullOptional(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_asn1rd_read_null_optional(this.ctxPtr)}readOctetStr(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_asn1rd_read_octet_str(this.ctxPtr)}readBitstringAsOctetStr(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_asn1rd_read_bitstring_as_octet_str(this.ctxPtr)}readUtf8Str(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_asn1rd_read_utf8_str(this.ctxPtr)}readOid(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_asn1rd_read_oid(this.ctxPtr)}readData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",_),t._vscf_asn1rd_read_data(this.ctxPtr,_)}readSequence(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_sequence(this.ctxPtr),_}readSet(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1rd_read_set(this.ctxPtr),_}mbedtlsHasError(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("code",_),r=t._vscf_asn1rd_mbedtls_has_error(this.ctxPtr,_),!!r}readTagData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("tag",_),t._vscf_asn1rd_read_tag_data(this.ctxPtr,_)}}return r}}(),pr=function(){if(De)return Me;De=1;const e=A_();return Me=(t,_)=>{class r{constructor(e){this.name="Asn1wr",this.ctxPtr=void 0===e?t._vscf_asn1wr_new():e}static newAndUseCContext(e){return new r(t._vscf_asn1wr_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_asn1wr_delete(this.ctxPtr),this.ctxPtr=null)}reset(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("outLen",r),t._vscf_asn1wr_reset(this.ctxPtr,_,r)}finish(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureBoolean("doNotAdjust",_),r=t._vscf_asn1wr_finish(this.ctxPtr,_),r}bytes(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1wr_bytes(this.ctxPtr),_}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1wr_len(this.ctxPtr),_}writtenLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1wr_written_len(this.ctxPtr),_}unwrittenLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1wr_unwritten_len(this.ctxPtr),_}hasError(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1wr_has_error(this.ctxPtr),!!_}status(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_asn1wr_status(this.ctxPtr);_.FoundationError.handleStatusCode(r)}reserve(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",_),r=t._vscf_asn1wr_reserve(this.ctxPtr,_),r}writeTag(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("tag",_),r=t._vscf_asn1wr_write_tag(this.ctxPtr,_),r}writeContextTag(_,r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("tag",_),e.ensureNumber("len",r),s=t._vscf_asn1wr_write_context_tag(this.ctxPtr,_,r),s}writeLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",_),r=t._vscf_asn1wr_write_len(this.ctxPtr,_),r}writeInt(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_int(this.ctxPtr,_),r}writeInt8(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_int8(this.ctxPtr,_),r}writeInt16(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_int16(this.ctxPtr,_),r}writeInt32(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_int32(this.ctxPtr,_),r}writeInt64(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_int64(this.ctxPtr,_),r}writeUint(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_uint(this.ctxPtr,_),r}writeUint8(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_uint8(this.ctxPtr,_),r}writeUint16(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_uint16(this.ctxPtr,_),r}writeUint32(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_uint32(this.ctxPtr,_),r}writeUint64(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("value",_),r=t._vscf_asn1wr_write_uint64(this.ctxPtr,_),r}writeBool(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureBoolean("value",_),r=t._vscf_asn1wr_write_bool(this.ctxPtr,_),r}writeNull(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_asn1wr_write_null(this.ctxPtr),_}writeOctetStr(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("value",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_asn1wr_write_octet_str(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}writeOctetStrAsBitstring(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("value",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_asn1wr_write_octet_str_as_bitstring(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}writeData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_asn1wr_write_data(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}writeUtf8Str(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("value",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_asn1wr_write_utf8_str(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}writeOid(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("value",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_asn1wr_write_oid(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}writeSequence(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",_),r=t._vscf_asn1wr_write_sequence(this.ctxPtr,_),r}writeSet(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",_),r=t._vscf_asn1wr_write_set(this.ctxPtr,_),r}mbedtlsHasError(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("code",_),r=t._vscf_asn1wr_mbedtls_has_error(this.ctxPtr,_),!!r}writeTagData(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_),e.ensureNumber("tag",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);let a;t._vsc_data(i,n,s);try{a=t._vscf_asn1wr_write_tag_data(this.ctxPtr,i,r)}finally{t._free(n),t._free(i)}}static getCurrentElementLen(e,_){let r;return r=t._vscf_asn1wr_get_current_element_len(e,_),r}getCurrentElementLen(e,t){return r.getCurrentElementLen(e,t)}static swapElementsOfSet(_,r,s,n){e.ensureNumber("toLen",r),e.ensureNumber("fromLen",n),t._vscf_asn1wr_swap_elements_of_set(_,r,s,n)}swapElementsOfSet(e,t,_,s){return r.swapElementsOfSet(e,t,_,s)}static secondElementOfSetIsLess(_,r,s,n){let c;return e.ensureNumber("firstLen",r),e.ensureNumber("secondLen",n),c=t._vscf_asn1wr_second_element_of_set_is_less(_,r,s,n),!!c}secondElementOfSetIsLess(e,t,_,s){return r.secondElementOfSetIsLess(e,t,_,s)}sortElementsOfSet(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",_),t._vscf_asn1wr_sort_elements_of_set(this.ctxPtr,_)}}return r}}(),yr=function(){if(Ge)return Oe;Ge=1;const e=A_();return Oe=(t,_)=>{class r{constructor(e){this.name="RsaPublicKey",this.ctxPtr=void 0===e?t._vscf_rsa_public_key_new():e}static newAndUseCContext(e){return new r(t._vscf_rsa_public_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_rsa_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_public_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_rsa_public_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_public_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_public_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_public_key_is_valid(this.ctxPtr),!!_}keyExponent(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_public_key_key_exponent(this.ctxPtr),_}}return r}}(),Pr=function(){if(qe)return Ve;qe=1;const e=A_();return Ve=(t,_)=>{class r{constructor(e){this.name="RsaPrivateKey",this.ctxPtr=void 0===e?t._vscf_rsa_private_key_new():e}static newAndUseCContext(e){return new r(t._vscf_rsa_private_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_rsa_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_private_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_rsa_private_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_private_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_private_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_rsa_private_key_is_valid(this.ctxPtr),!!_}extractPublicKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_rsa_private_key_extract_public_key(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}}return r}}(),xr=function(){if(Xe)return je;Xe=1;const e=A_();return je=(t,_)=>{class r{constructor(e){this.name="Rsa",this.ctxPtr=void 0===e?t._vscf_rsa_new():e}static newAndUseCContext(e){return new r(t._vscf_rsa_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_rsa_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_rsa_release_random(this.ctxPtr),t._vscf_rsa_use_random(this.ctxPtr,r.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_rsa_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_rsa_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_rsa_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_rsa_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_rsa_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}canEncrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_rsa_can_encrypt(this.ctxPtr,r.ctxPtr,s),!!n}encryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_rsa_encrypted_len(this.ctxPtr,r.ctxPtr,s),n}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.encryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_rsa_encrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canDecrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_rsa_can_decrypt(this.ctxPtr,r.ctxPtr,s),!!n}decryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_rsa_decrypted_len(this.ctxPtr,r.ctxPtr,s),n}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.decryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_rsa_decrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canSign(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_rsa_can_sign(this.ctxPtr,r.ctxPtr),!!s}signatureLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_rsa_signature_len(this.ctxPtr,r.ctxPtr),s}signHash(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(n,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=this.signatureLen(r),f=t._vsc_buffer_new_with_capacity(l);try{const e=t._vscf_rsa_sign_hash(this.ctxPtr,r.ctxPtr,s,o,f);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(f),c=t._vsc_buffer_len(f);return t.HEAPU8.slice(n,n+c)}finally{t._free(i),t._free(o),t._vsc_buffer_delete(f)}}canVerify(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_rsa_can_verify(this.ctxPtr,r.ctxPtr),!!s}verifyHash(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("digest",n),e.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(n,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=c.length*c.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(c,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);try{return!!t._vscf_rsa_verify_hash(this.ctxPtr,r.ctxPtr,s,l,v)}finally{t._free(a),t._free(l),t._free(u),t._free(v)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_rsa_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}generateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("bitlen",r);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_rsa_generate_key(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}}return r}}(),gr=function(){if(Ze)return We;Ze=1;const e=A_();return We=(t,_)=>{class r{constructor(e){this.name="EccPublicKey",this.ctxPtr=void 0===e?t._vscf_ecc_public_key_new():e}static newAndUseCContext(e){return new r(t._vscf_ecc_public_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_ecc_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_public_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_ecc_public_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_public_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_public_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_public_key_is_valid(this.ctxPtr),!!_}}return r}}(),mr=function(){if(Qe)return $e;Qe=1;const e=A_();return $e=(t,_)=>{class r{constructor(e){this.name="EccPrivateKey",this.ctxPtr=void 0===e?t._vscf_ecc_private_key_new():e}static newAndUseCContext(e){return new r(t._vscf_ecc_private_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_ecc_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_private_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_ecc_private_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_private_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_private_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_private_key_is_valid(this.ctxPtr),!!_}extractPublicKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_ecc_private_key_extract_public_key(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}}return r}}(),kr=function(){if(et)return Je;et=1;const e=A_();return Je=(t,_)=>{class r{constructor(e){this.name="Ecc",this.ctxPtr=void 0===e?t._vscf_ecc_new():e}static newAndUseCContext(e){return new r(t._vscf_ecc_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_ecc_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_ecc_release_random(this.ctxPtr),t._vscf_ecc_use_random(this.ctxPtr,r.ctxPtr)}set ecies(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("ecies",r,_.Ecies),t._vscf_ecc_release_ecies(this.ctxPtr),t._vscf_ecc_use_ecies(this.ctxPtr,r.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ecc_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ecc_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ecc_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ecc_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ecc_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}canEncrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ecc_can_encrypt(this.ctxPtr,r.ctxPtr,s),!!n}encryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ecc_encrypted_len(this.ctxPtr,r.ctxPtr,s),n}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.encryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ecc_encrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canDecrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ecc_can_decrypt(this.ctxPtr,r.ctxPtr,s),!!n}decryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ecc_decrypted_len(this.ctxPtr,r.ctxPtr,s),n}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.decryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ecc_decrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canSign(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_ecc_can_sign(this.ctxPtr,r.ctxPtr),!!s}signatureLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_ecc_signature_len(this.ctxPtr,r.ctxPtr),s}signHash(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(n,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=this.signatureLen(r),f=t._vsc_buffer_new_with_capacity(l);try{const e=t._vscf_ecc_sign_hash(this.ctxPtr,r.ctxPtr,s,o,f);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(f),c=t._vsc_buffer_len(f);return t.HEAPU8.slice(n,n+c)}finally{t._free(i),t._free(o),t._vsc_buffer_delete(f)}}canVerify(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_ecc_can_verify(this.ctxPtr,r.ctxPtr),!!s}verifyHash(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("digest",n),e.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(n,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=c.length*c.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(c,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);try{return!!t._vscf_ecc_verify_hash(this.ctxPtr,r.ctxPtr,s,l,v)}finally{t._free(a),t._free(l),t._free(u),t._free(v)}}computeSharedKey(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=this.sharedKeyLen(s),c=t._vsc_buffer_new_with_capacity(n);try{const e=t._vscf_ecc_compute_shared_key(this.ctxPtr,r.ctxPtr,s.ctxPtr,c);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(c),i=t._vsc_buffer_len(c);return t.HEAPU8.slice(n,n+i)}finally{t._vsc_buffer_delete(c)}}sharedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_ecc_shared_key_len(this.ctxPtr,r.ctxPtr),s}kemSharedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_ecc_kem_shared_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulatedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_ecc_kem_encapsulated_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulate(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=this.kemSharedKeyLen(r),n=t._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(r),i=t._vsc_buffer_new_with_capacity(c);try{const e=t._vscf_ecc_kem_encapsulate(this.ctxPtr,r.ctxPtr,n,i);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n),a=t.HEAPU8.slice(s,s+c),o=t._vsc_buffer_bytes(i),l=t._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:t.HEAPU8.slice(o,o+l)}}finally{t._vsc_buffer_delete(n),t._vsc_buffer_delete(i)}}kemDecapsulate(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("encapsulatedKey",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.kemSharedKeyLen(s),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ecc_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(r,r+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_ecc_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}static writeSignature(r,s){e.ensureClass("r",r,_.MbedtlsMpi),e.ensureClass("s",s,_.MbedtlsMpi);const n=t._vsc_buffer_new_with_capacity(0);try{t._vscf_ecc_write_signature(r.ctxPtr,s.ctxPtr,n);const e=t._vsc_buffer_bytes(n),_=t._vsc_buffer_len(n);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(n)}}writeSignature(e,t){return r.writeSignature(e,t)}static readSignature(r,s,n){e.ensureByteArray("signature",r),e.ensureClass("r",s,_.MbedtlsMpi),e.ensureClass("s",n,_.MbedtlsMpi);const c=r.length*r.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(r,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);try{const e=t._vscf_ecc_read_signature(o,s.ctxPtr,n.ctxPtr);_.FoundationError.handleStatusCode(e)}finally{t._free(i),t._free(o)}}readSignature(e,t,_){return r.readSignature(e,t,_)}generateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ecc_generate_key(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}produceAlgInfoForKey(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_ecc_produce_alg_info_for_key(this.ctxPtr,r.ctxPtr),_.FoundationInterface.newAndTakeCContext(s)}}return r}}(),Nr=function(){if(_t)return tt;_t=1;const e=A_();return tt=(t,_)=>{class r{constructor(e){this.name="EntropyAccumulator",this.ctxPtr=void 0===e?t._vscf_entropy_accumulator_new():e}static newAndUseCContext(e){return new r(t._vscf_entropy_accumulator_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_entropy_accumulator_delete(this.ctxPtr),this.ctxPtr=null)}static get SOURCES_MAX(){return 15}get SOURCES_MAX(){return 15}isStrong(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_entropy_accumulator_is_strong(this.ctxPtr),!!_}gather(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",r);const s=r,n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_entropy_accumulator_gather(this.ctxPtr,r,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_entropy_accumulator_setup_defaults(this.ctxPtr)}addSource(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("source",r,"Foundation.EntropySource",_.FoundationInterfaceTag.ENTROPY_SOURCE,_.FoundationInterface),e.ensureNumber("threshold",s),t._vscf_entropy_accumulator_add_source(this.ctxPtr,r.ctxPtr,s)}}return r}}(),wr=function(){if(st)return rt;st=1;const e=A_();return rt=(t,_)=>{class r{constructor(e){this.name="CtrDrbg",this.ctxPtr=void 0===e?t._vscf_ctr_drbg_new():e}static newAndUseCContext(e){return new r(t._vscf_ctr_drbg_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_ctr_drbg_delete(this.ctxPtr),this.ctxPtr=null)}set entropySource(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("entropySource",r,"Foundation.EntropySource",_.FoundationInterfaceTag.ENTROPY_SOURCE,_.FoundationInterface),t._vscf_ctr_drbg_release_entropy_source(this.ctxPtr),t._vscf_ctr_drbg_use_entropy_source(this.ctxPtr,r.ctxPtr)}static get RESEED_INTERVAL(){return 1e4}get RESEED_INTERVAL(){return 1e4}static get ENTROPY_LEN(){return 48}get ENTROPY_LEN(){return 48}random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",r);const s=r,n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_ctr_drbg_random(this.ctxPtr,r,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}reseed(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_ctr_drbg_reseed(this.ctxPtr);_.FoundationError.handleStatusCode(r)}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_ctr_drbg_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}enablePredictionResistance(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_ctr_drbg_enable_prediction_resistance(this.ctxPtr)}setReseedInterval(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("interval",_),t._vscf_ctr_drbg_set_reseed_interval(this.ctxPtr,_)}setEntropyLen(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",_),t._vscf_ctr_drbg_set_entropy_len(this.ctxPtr,_)}}return r}}(),Ir=function(){if(ct)return nt;ct=1;const e=A_();return nt=(t,_)=>{class r{constructor(e){this.name="Hmac",this.ctxPtr=void 0===e?t._vscf_hmac_new():e}static newAndUseCContext(e){return new r(t._vscf_hmac_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_hmac_delete(this.ctxPtr),this.ctxPtr=null)}set hash(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("hash",r,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),t._vscf_hmac_release_hash(this.ctxPtr),t._vscf_hmac_use_hash(this.ctxPtr,r.ctxPtr)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hmac_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hmac_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_hmac_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}digestLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hmac_digest_len(this.ctxPtr),_}mac(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",_),e.ensureByteArray("data",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r.length*r.BYTES_PER_ELEMENT,o=t._malloc(a);t.HEAP8.set(r,o);const l=t._vsc_data_ctx_size(),f=t._malloc(l);t._vsc_data(f,o,a);const u=this.digestLen(),d=t._vsc_buffer_new_with_capacity(u);try{t._vscf_hmac_mac(this.ctxPtr,i,f,d);const e=t._vsc_buffer_bytes(d),_=t._vsc_buffer_len(d);return t.HEAPU8.slice(e,e+_)}finally{t._free(n),t._free(i),t._free(o),t._free(f),t._vsc_buffer_delete(d)}}start(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_hmac_start(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}update(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_hmac_update(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}finish(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.digestLen(),r=t._vsc_buffer_new_with_capacity(_);try{t._vscf_hmac_finish(this.ctxPtr,r);const e=t._vsc_buffer_bytes(r),_=t._vsc_buffer_len(r);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(r)}}reset(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_hmac_reset(this.ctxPtr)}}return r}}(),Er=function(){if(at)return it;at=1;const e=A_();return it=(t,_)=>{class r{constructor(e){this.name="Hkdf",this.ctxPtr=void 0===e?t._vscf_hkdf_new():e}static newAndUseCContext(e){return new r(t._vscf_hkdf_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_hkdf_delete(this.ctxPtr),this.ctxPtr=null)}set hash(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("hash",r,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),t._vscf_hkdf_release_hash(this.ctxPtr),t._vscf_hkdf_use_hash(this.ctxPtr,r.ctxPtr)}static get HASH_COUNTER_MAX(){return 255}get HASH_COUNTER_MAX(){return 255}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hkdf_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hkdf_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_hkdf_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}derive(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_),e.ensureNumber("keyLen",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r,o=t._vsc_buffer_new_with_capacity(a);try{t._vscf_hkdf_derive(this.ctxPtr,i,r,o);const e=t._vsc_buffer_bytes(o),_=t._vsc_buffer_len(o);return t.HEAPU8.slice(e,e+_)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}reset(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("salt",_),e.ensureNumber("iterationCount",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);try{t._vscf_hkdf_reset(this.ctxPtr,i,r)}finally{t._free(n),t._free(i)}}setInfo(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("info",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_hkdf_set_info(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}}return r}}(),br=function(){if(lt)return ot;lt=1;const e=A_();return ot=(t,_)=>{class r{constructor(e){this.name="Kdf1",this.ctxPtr=void 0===e?t._vscf_kdf1_new():e}static newAndUseCContext(e){return new r(t._vscf_kdf1_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_kdf1_delete(this.ctxPtr),this.ctxPtr=null)}set hash(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("hash",r,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),t._vscf_kdf1_release_hash(this.ctxPtr),t._vscf_kdf1_use_hash(this.ctxPtr,r.ctxPtr)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_kdf1_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_kdf1_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_kdf1_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}derive(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_),e.ensureNumber("keyLen",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r,o=t._vsc_buffer_new_with_capacity(a);try{t._vscf_kdf1_derive(this.ctxPtr,i,r,o);const e=t._vsc_buffer_bytes(o),_=t._vsc_buffer_len(o);return t.HEAPU8.slice(e,e+_)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}}return r}}(),Ar=function(){if(ut)return ft;ut=1;const e=A_();return ft=(t,_)=>{class r{constructor(e){this.name="Kdf2",this.ctxPtr=void 0===e?t._vscf_kdf2_new():e}static newAndUseCContext(e){return new r(t._vscf_kdf2_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_kdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hash(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("hash",r,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),t._vscf_kdf2_release_hash(this.ctxPtr),t._vscf_kdf2_use_hash(this.ctxPtr,r.ctxPtr)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_kdf2_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_kdf2_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_kdf2_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}derive(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_),e.ensureNumber("keyLen",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r,o=t._vsc_buffer_new_with_capacity(a);try{t._vscf_kdf2_derive(this.ctxPtr,i,r,o);const e=t._vsc_buffer_bytes(o),_=t._vsc_buffer_len(o);return t.HEAPU8.slice(e,e+_)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}}return r}}(),Cr=function(){if(vt)return dt;vt=1;const e=A_();return dt=(t,_)=>{class r{constructor(e){this.name="FakeRandom",this.ctxPtr=void 0===e?t._vscf_fake_random_new():e}static newAndUseCContext(e){return new r(t._vscf_fake_random_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_fake_random_delete(this.ctxPtr),this.ctxPtr=null)}random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",r);const s=r,n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_fake_random_random(this.ctxPtr,r,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}reseed(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_fake_random_reseed(this.ctxPtr);_.FoundationError.handleStatusCode(r)}isStrong(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_fake_random_is_strong(this.ctxPtr),!!_}gather(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",r);const s=r,n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_fake_random_gather(this.ctxPtr,r,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}setupSourceByte(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_fake_random_setup_source_byte(this.ctxPtr,_)}setupSourceData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("dataSource",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_fake_random_setup_source_data(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}}return r}}(),Fr=function(){if(pt)return ht;pt=1;const e=A_();return ht=(t,_)=>{class r{constructor(e){this.name="Pkcs5Pbkdf2",this.ctxPtr=void 0===e?t._vscf_pkcs5_pbkdf2_new():e}static newAndUseCContext(e){return new r(t._vscf_pkcs5_pbkdf2_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_pkcs5_pbkdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hmac(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("hmac",r,"Foundation.Mac",_.FoundationInterfaceTag.MAC,_.FoundationInterface),t._vscf_pkcs5_pbkdf2_release_hmac(this.ctxPtr),t._vscf_pkcs5_pbkdf2_use_hmac(this.ctxPtr,r.ctxPtr)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_pkcs5_pbkdf2_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_pkcs5_pbkdf2_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_pkcs5_pbkdf2_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}derive(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_),e.ensureNumber("keyLen",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=r,o=t._vsc_buffer_new_with_capacity(a);try{t._vscf_pkcs5_pbkdf2_derive(this.ctxPtr,i,r,o);const e=t._vsc_buffer_bytes(o),_=t._vsc_buffer_len(o);return t.HEAPU8.slice(e,e+_)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}reset(_,r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("salt",_),e.ensureNumber("iterationCount",r);const s=_.length*_.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(_,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);try{t._vscf_pkcs5_pbkdf2_reset(this.ctxPtr,i,r)}finally{t._free(n),t._free(i)}}setInfo(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("info",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_pkcs5_pbkdf2_set_info(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_pkcs5_pbkdf2_setup_defaults(this.ctxPtr)}}return r}}(),Tr=function(){if(Pt)return yt;Pt=1;const e=A_();return yt=(t,_)=>{class r{constructor(e){this.name="Pkcs5Pbes2",this.ctxPtr=void 0===e?t._vscf_pkcs5_pbes2_new():e}static newAndUseCContext(e){return new r(t._vscf_pkcs5_pbes2_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_pkcs5_pbes2_delete(this.ctxPtr),this.ctxPtr=null)}set kdf(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("kdf",r,"Foundation.SaltedKdf",_.FoundationInterfaceTag.SALTED_KDF,_.FoundationInterface),t._vscf_pkcs5_pbes2_release_kdf(this.ctxPtr),t._vscf_pkcs5_pbes2_use_kdf(this.ctxPtr,r.ctxPtr)}set cipher(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("cipher",r,"Foundation.Cipher",_.FoundationInterfaceTag.CIPHER,_.FoundationInterface),t._vscf_pkcs5_pbes2_release_cipher(this.ctxPtr),t._vscf_pkcs5_pbes2_use_cipher(this.ctxPtr,r.ctxPtr)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_pkcs5_pbes2_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_pkcs5_pbes2_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_pkcs5_pbes2_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}encrypt(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.encryptedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_pkcs5_pbes2_encrypt(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}encryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_pkcs5_pbes2_encrypted_len(this.ctxPtr,_),r}preciseEncryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_pkcs5_pbes2_precise_encrypted_len(this.ctxPtr,_),r}decrypt(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=this.decryptedLen(r.length),o=t._vsc_buffer_new_with_capacity(a);try{const e=t._vscf_pkcs5_pbes2_decrypt(this.ctxPtr,i,o);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(o),s=t._vsc_buffer_len(o);return t.HEAPU8.slice(r,r+s)}finally{t._free(n),t._free(i),t._vsc_buffer_delete(o)}}decryptedLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_pkcs5_pbes2_decrypted_len(this.ctxPtr,_),r}reset(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("pwd",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_pkcs5_pbes2_reset(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}}return r}}(),Kr=function(){if(gt)return xt;gt=1;const e=A_();return xt=(t,_)=>{class r{constructor(e){this.name="SeedEntropySource",this.ctxPtr=void 0===e?t._vscf_seed_entropy_source_new():e}static newAndUseCContext(e){return new r(t._vscf_seed_entropy_source_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_seed_entropy_source_delete(this.ctxPtr),this.ctxPtr=null)}static get GATHER_LEN_MAX(){return 48}get GATHER_LEN_MAX(){return 48}isStrong(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_seed_entropy_source_is_strong(this.ctxPtr),!!_}gather(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("len",r);const s=r,n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_seed_entropy_source_gather(this.ctxPtr,r,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}resetSeed(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("seed",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_seed_entropy_source_reset_seed(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}moveForward(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_seed_entropy_source_move_forward(this.ctxPtr)}}return r}}(),zr=function(){if(kt)return mt;kt=1;const e=A_();return mt=(t,_)=>{class r{constructor(e){this.name="KeyMaterialRng",this.ctxPtr=void 0===e?t._vscf_key_material_rng_new():e}static newAndUseCContext(e){return new r(t._vscf_key_material_rng_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_key_material_rng_delete(this.ctxPtr),this.ctxPtr=null)}static get KEY_MATERIAL_LEN_MIN(){return 32}get KEY_MATERIAL_LEN_MIN(){return 32}static get KEY_MATERIAL_LEN_MAX(){return 512}get KEY_MATERIAL_LEN_MAX(){return 512}random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",r);const s=r,n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_key_material_rng_random(this.ctxPtr,r,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}reseed(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_key_material_rng_reseed(this.ctxPtr);_.FoundationError.handleStatusCode(r)}resetKeyMaterial(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("keyMaterial",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_key_material_rng_reset_key_material(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}}return r}}(),Sr=function(){if(wt)return Nt;wt=1;const e=A_();return Nt=(t,_)=>{class r{constructor(e){this.name="RawPublicKey",this.ctxPtr=void 0===e?t._vscf_raw_public_key_new():e}static newAndUseCContext(e){return new r(t._vscf_raw_public_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_raw_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_public_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_raw_public_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_public_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_public_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_public_key_is_valid(this.ctxPtr),!!_}data(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_raw_public_key_data(this.ctxPtr)}}return r}}(),Lr=function(){if(Et)return It;Et=1;const e=A_();return It=(t,_)=>{class r{constructor(e){this.name="RawPrivateKey",this.ctxPtr=void 0===e?t._vscf_raw_private_key_new():e}static newAndUseCContext(e){return new r(t._vscf_raw_private_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_raw_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_private_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_raw_private_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_private_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_private_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_private_key_is_valid(this.ctxPtr),!!_}extractPublicKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_raw_private_key_extract_public_key(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}data(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_raw_private_key_data(this.ctxPtr)}hasPublicKey(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_raw_private_key_has_public_key(this.ctxPtr),!!_}setPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawPublicKey",r,_.RawPublicKey),t._vscf_raw_private_key_set_public_key(this.ctxPtr,r.ctxPtr)}getPublicKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_raw_private_key_get_public_key(this.ctxPtr),_.RawPublicKey.newAndUseCContext(r)}}return r}}(),Rr=function(){if(At)return bt;At=1;const e=A_();return bt=(t,_)=>{class r{constructor(e){this.name="Pkcs8Serializer",this.ctxPtr=void 0===e?t._vscf_pkcs8_serializer_new():e}static newAndUseCContext(e){return new r(t._vscf_pkcs8_serializer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_pkcs8_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Writer",r,"Foundation.Asn1Writer",_.FoundationInterfaceTag.ASN1_WRITER,_.FoundationInterface),t._vscf_pkcs8_serializer_release_asn1_writer(this.ctxPtr),t._vscf_pkcs8_serializer_use_asn1_writer(this.ctxPtr,r.ctxPtr)}serializedPublicKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey),s=t._vscf_pkcs8_serializer_serialized_public_key_len(this.ctxPtr,r.ctxPtr),s}serializePublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey);const s=this.serializedPublicKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_pkcs8_serializer_serialize_public_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}serializedPrivateKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey),s=t._vscf_pkcs8_serializer_serialized_private_key_len(this.ctxPtr,r.ctxPtr),s}serializePrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey);const s=this.serializedPrivateKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_pkcs8_serializer_serialize_private_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_pkcs8_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_pkcs8_serializer_serialize_public_key_inplace(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}serializePrivateKeyInplace(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_pkcs8_serializer_serialize_private_key_inplace(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}}return r}}(),Br=function(){if(Ft)return Ct;Ft=1;const e=A_();return Ct=(t,_)=>{class r{constructor(e){this.name="Sec1Serializer",this.ctxPtr=void 0===e?t._vscf_sec1_serializer_new():e}static newAndUseCContext(e){return new r(t._vscf_sec1_serializer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_sec1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Writer",r,"Foundation.Asn1Writer",_.FoundationInterfaceTag.ASN1_WRITER,_.FoundationInterface),t._vscf_sec1_serializer_release_asn1_writer(this.ctxPtr),t._vscf_sec1_serializer_use_asn1_writer(this.ctxPtr,r.ctxPtr)}serializedPublicKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey),s=t._vscf_sec1_serializer_serialized_public_key_len(this.ctxPtr,r.ctxPtr),s}serializePublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey);const s=this.serializedPublicKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_sec1_serializer_serialize_public_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}serializedPrivateKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey),s=t._vscf_sec1_serializer_serialized_private_key_len(this.ctxPtr,r.ctxPtr),s}serializePrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey);const s=this.serializedPrivateKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_sec1_serializer_serialize_private_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_sec1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_sec1_serializer_serialize_public_key_inplace(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}serializePrivateKeyInplace(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_sec1_serializer_serialize_private_key_inplace(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}static isEcKey(r){let s;return e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_sec1_serializer_is_ec_key(r.ctxPtr),!!s}isEcKey(e){return r.isEcKey(e)}}return r}}(),Yr=function(){if(Kt)return Tt;Kt=1;const e=A_();return Tt=(t,_)=>{class r{constructor(e){this.name="KeyAsn1Serializer",this.ctxPtr=void 0===e?t._vscf_key_asn1_serializer_new():e}static newAndUseCContext(e){return new r(t._vscf_key_asn1_serializer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_key_asn1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Writer",r,"Foundation.Asn1Writer",_.FoundationInterfaceTag.ASN1_WRITER,_.FoundationInterface),t._vscf_key_asn1_serializer_release_asn1_writer(this.ctxPtr),t._vscf_key_asn1_serializer_use_asn1_writer(this.ctxPtr,r.ctxPtr)}serializedPublicKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey),s=t._vscf_key_asn1_serializer_serialized_public_key_len(this.ctxPtr,r.ctxPtr),s}serializePublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey);const s=this.serializedPublicKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_key_asn1_serializer_serialize_public_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}serializedPrivateKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey),s=t._vscf_key_asn1_serializer_serialized_private_key_len(this.ctxPtr,r.ctxPtr),s}serializePrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey);const s=this.serializedPrivateKeyLen(r),n=t._vsc_buffer_new_with_capacity(s);try{const e=t._vscf_key_asn1_serializer_serialize_private_key(this.ctxPtr,r.ctxPtr,n);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n);return t.HEAPU8.slice(s,s+c)}finally{t._vsc_buffer_delete(n)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_key_asn1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("publicKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_key_asn1_serializer_serialize_public_key_inplace(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}serializePrivateKeyInplace(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("privateKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_key_asn1_serializer_serialize_private_key_inplace(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}}return r}}(),Hr=function(){if(St)return zt;St=1;const e=A_();return zt=(t,_)=>{class r{constructor(e){this.name="KeyAsn1Deserializer",this.ctxPtr=void 0===e?t._vscf_key_asn1_deserializer_new():e}static newAndUseCContext(e){return new r(t._vscf_key_asn1_deserializer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_key_asn1_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Reader",r,"Foundation.Asn1Reader",_.FoundationInterfaceTag.ASN1_READER,_.FoundationInterface),t._vscf_key_asn1_deserializer_release_asn1_reader(this.ctxPtr),t._vscf_key_asn1_deserializer_use_asn1_reader(this.ctxPtr,r.ctxPtr)}deserializePublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("publicKeyData",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_key_asn1_deserializer_deserialize_public_key(this.ctxPtr,i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}deserializePrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("privateKeyData",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_key_asn1_deserializer_deserialize_private_key(this.ctxPtr,i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_key_asn1_deserializer_setup_defaults(this.ctxPtr)}deserializePublicKeyInplace(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_key_asn1_deserializer_deserialize_public_key_inplace(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(n)}finally{t._free(s)}}deserializePrivateKeyInplace(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_key_asn1_deserializer_deserialize_private_key_inplace(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(n)}finally{t._free(s)}}deserializePkcs8PrivateKeyInplace(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("seqLeftLen",r),e.ensureNumber("version",s);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_key_asn1_deserializer_deserialize_pkcs8_private_key_inplace(this.ctxPtr,r,s,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(i)}finally{t._free(c)}}deserializeSec1PrivateKeyInplace(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("seqLeftLen",r),e.ensureNumber("version",s),e.ensureImplementInterface("algInfo",n,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const c=t._vscf_error_ctx_size(),i=t._malloc(c);let a;t._vscf_error_reset(i);try{a=t._vscf_key_asn1_deserializer_deserialize_sec1_private_key_inplace(this.ctxPtr,r,s,n.ctxPtr,i);const e=t._vscf_error_status(i);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(a)}finally{t._free(i)}}}return r}}(),Ur=function(){if(Rt)return Lt;Rt=1;const e=A_();return Lt=(t,_)=>{class r{constructor(e){this.name="Ed25519",this.ctxPtr=void 0===e?t._vscf_ed25519_new():e}static newAndUseCContext(e){return new r(t._vscf_ed25519_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_ed25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_ed25519_release_random(this.ctxPtr),t._vscf_ed25519_use_random(this.ctxPtr,r.ctxPtr)}set ecies(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("ecies",r,_.Ecies),t._vscf_ed25519_release_ecies(this.ctxPtr),t._vscf_ed25519_use_ecies(this.ctxPtr,r.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ed25519_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ed25519_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ed25519_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ed25519_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_ed25519_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}canEncrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ed25519_can_encrypt(this.ctxPtr,r.ctxPtr,s),!!n}encryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ed25519_encrypted_len(this.ctxPtr,r.ctxPtr,s),n}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.encryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ed25519_encrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canDecrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ed25519_can_decrypt(this.ctxPtr,r.ctxPtr,s),!!n}decryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_ed25519_decrypted_len(this.ctxPtr,r.ctxPtr,s),n}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.decryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ed25519_decrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canSign(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_ed25519_can_sign(this.ctxPtr,r.ctxPtr),!!s}signatureLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_ed25519_signature_len(this.ctxPtr,r.ctxPtr),s}signHash(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(n,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=this.signatureLen(r),f=t._vsc_buffer_new_with_capacity(l);try{const e=t._vscf_ed25519_sign_hash(this.ctxPtr,r.ctxPtr,s,o,f);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(f),c=t._vsc_buffer_len(f);return t.HEAPU8.slice(n,n+c)}finally{t._free(i),t._free(o),t._vsc_buffer_delete(f)}}canVerify(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_ed25519_can_verify(this.ctxPtr,r.ctxPtr),!!s}verifyHash(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("digest",n),e.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(n,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=c.length*c.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(c,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);try{return!!t._vscf_ed25519_verify_hash(this.ctxPtr,r.ctxPtr,s,l,v)}finally{t._free(a),t._free(l),t._free(u),t._free(v)}}computeSharedKey(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=this.sharedKeyLen(s),c=t._vsc_buffer_new_with_capacity(n);try{const e=t._vscf_ed25519_compute_shared_key(this.ctxPtr,r.ctxPtr,s.ctxPtr,c);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(c),i=t._vsc_buffer_len(c);return t.HEAPU8.slice(n,n+i)}finally{t._vsc_buffer_delete(c)}}sharedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_ed25519_shared_key_len(this.ctxPtr,r.ctxPtr),s}kemSharedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_ed25519_kem_shared_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulatedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_ed25519_kem_encapsulated_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulate(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=this.kemSharedKeyLen(r),n=t._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(r),i=t._vsc_buffer_new_with_capacity(c);try{const e=t._vscf_ed25519_kem_encapsulate(this.ctxPtr,r.ctxPtr,n,i);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n),a=t.HEAPU8.slice(s,s+c),o=t._vsc_buffer_bytes(i),l=t._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:t.HEAPU8.slice(o,o+l)}}finally{t._vsc_buffer_delete(n),t._vsc_buffer_delete(i)}}kemDecapsulate(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("encapsulatedKey",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.kemSharedKeyLen(s),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_ed25519_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(r,r+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_ed25519_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}generateKey(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_ed25519_generate_key(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(n)}finally{t._free(s)}}}return r}}(),Mr=function(){if(Yt)return Bt;Yt=1;const e=A_();return Bt=(t,_)=>{class r{constructor(e){this.name="Curve25519",this.ctxPtr=void 0===e?t._vscf_curve25519_new():e}static newAndUseCContext(e){return new r(t._vscf_curve25519_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_curve25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_curve25519_release_random(this.ctxPtr),t._vscf_curve25519_use_random(this.ctxPtr,r.ctxPtr)}set ecies(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("ecies",r,_.Ecies),t._vscf_curve25519_release_ecies(this.ctxPtr),t._vscf_curve25519_use_ecies(this.ctxPtr,r.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_curve25519_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_curve25519_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_curve25519_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_curve25519_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_curve25519_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}canEncrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_curve25519_can_encrypt(this.ctxPtr,r.ctxPtr,s),!!n}encryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_curve25519_encrypted_len(this.ctxPtr,r.ctxPtr,s),n}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.encryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_curve25519_encrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canDecrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_curve25519_can_decrypt(this.ctxPtr,r.ctxPtr,s),!!n}decryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_curve25519_decrypted_len(this.ctxPtr,r.ctxPtr,s),n}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.decryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_curve25519_decrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}computeSharedKey(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=this.sharedKeyLen(s),c=t._vsc_buffer_new_with_capacity(n);try{const e=t._vscf_curve25519_compute_shared_key(this.ctxPtr,r.ctxPtr,s.ctxPtr,c);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(c),i=t._vsc_buffer_len(c);return t.HEAPU8.slice(n,n+i)}finally{t._vsc_buffer_delete(c)}}sharedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_curve25519_shared_key_len(this.ctxPtr,r.ctxPtr),s}kemSharedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_curve25519_kem_shared_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulatedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_curve25519_kem_encapsulated_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulate(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=this.kemSharedKeyLen(r),n=t._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(r),i=t._vsc_buffer_new_with_capacity(c);try{const e=t._vscf_curve25519_kem_encapsulate(this.ctxPtr,r.ctxPtr,n,i);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n),a=t.HEAPU8.slice(s,s+c),o=t._vsc_buffer_bytes(i),l=t._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:t.HEAPU8.slice(o,o+l)}}finally{t._vsc_buffer_delete(n),t._vsc_buffer_delete(i)}}kemDecapsulate(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("encapsulatedKey",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.kemSharedKeyLen(s),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_curve25519_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(r,r+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_curve25519_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}generateKey(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_curve25519_generate_key(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(n)}finally{t._free(s)}}}return r}}(),Dr=function(){if(Ut)return Ht;Ut=1;const e=A_();return Ht=(t,_)=>{class r{constructor(e){this.name="Falcon",this.ctxPtr=void 0===e?t._vscf_falcon_new():e}static newAndUseCContext(e){return new r(t._vscf_falcon_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_falcon_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_falcon_release_random(this.ctxPtr),t._vscf_falcon_use_random(this.ctxPtr,r.ctxPtr)}static get SEED_LEN(){return 48}get SEED_LEN(){return 48}static get LOGN_512(){return 9}get LOGN_512(){return 9}static get LOGN_1024(){return 10}get LOGN_1024(){return 10}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_falcon_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_falcon_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_falcon_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_falcon_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_falcon_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_falcon_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_falcon_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_falcon_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}canSign(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_falcon_can_sign(this.ctxPtr,r.ctxPtr),!!s}signatureLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_falcon_signature_len(this.ctxPtr,r.ctxPtr),s}signHash(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(n,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=this.signatureLen(r),f=t._vsc_buffer_new_with_capacity(l);try{const e=t._vscf_falcon_sign_hash(this.ctxPtr,r.ctxPtr,s,o,f);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(f),c=t._vsc_buffer_len(f);return t.HEAPU8.slice(n,n+c)}finally{t._free(i),t._free(o),t._vsc_buffer_delete(f)}}canVerify(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_falcon_can_verify(this.ctxPtr,r.ctxPtr),!!s}verifyHash(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("digest",n),e.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(n,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=c.length*c.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(c,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);try{return!!t._vscf_falcon_verify_hash(this.ctxPtr,r.ctxPtr,s,l,v)}finally{t._free(a),t._free(l),t._free(u),t._free(v)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_falcon_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}generateKey(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_falcon_generate_key(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(n)}finally{t._free(s)}}}return r}}(),Or=function(){if(Dt)return Mt;Dt=1;const e=A_();return Mt=(t,_)=>{class r{constructor(e){this.name="Round5",this.ctxPtr=void 0===e?t._vscf_round5_new():e}static newAndUseCContext(e){return new r(t._vscf_round5_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_round5_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_round5_release_random(this.ctxPtr),t._vscf_round5_use_random(this.ctxPtr,r.ctxPtr)}static get SEED_LEN(){return 48}get SEED_LEN(){return 48}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_round5_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_round5_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_round5_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_round5_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_round5_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}kemSharedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface),s=t._vscf_round5_kem_shared_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulatedKeyLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_round5_kem_encapsulated_key_len(this.ctxPtr,r.ctxPtr),s}kemEncapsulate(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=this.kemSharedKeyLen(r),n=t._vsc_buffer_new_with_capacity(s),c=this.kemEncapsulatedKeyLen(r),i=t._vsc_buffer_new_with_capacity(c);try{const e=t._vscf_round5_kem_encapsulate(this.ctxPtr,r.ctxPtr,n,i);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(n),c=t._vsc_buffer_len(n),a=t.HEAPU8.slice(s,s+c),o=t._vsc_buffer_bytes(i),l=t._vsc_buffer_len(i);return{sharedKey:a,encapsulatedKey:t.HEAPU8.slice(o,o+l)}}finally{t._vsc_buffer_delete(n),t._vsc_buffer_delete(i)}}kemDecapsulate(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("encapsulatedKey",r),e.ensureImplementInterface("privateKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=r.length*r.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(r,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.kemSharedKeyLen(s),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_round5_kem_decapsulate(this.ctxPtr,a,s.ctxPtr,l);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(r,r+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_round5_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}generateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_round5_generate_key(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}}return r}}(),Gr=function(){if(Gt)return Ot;Gt=1;const e=A_();return Ot=(t,_)=>{class r{constructor(e){this.name="CompoundKeyAlgInfo",this.ctxPtr=void 0===e?t._vscf_compound_key_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_compound_key_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_compound_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_key_alg_info_alg_id(this.ctxPtr),_}cipherAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_key_alg_info_cipher_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}signerAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_key_alg_info_signer_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),Vr=function(){if(qt)return Vt;qt=1;const e=A_();return Vt=(t,_)=>{class r{constructor(e){this.name="CompoundPublicKey",this.ctxPtr=void 0===e?t._vscf_compound_public_key_new():e}static newAndUseCContext(e){return new r(t._vscf_compound_public_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_compound_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_public_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_public_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_public_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_public_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_public_key_is_valid(this.ctxPtr),!!_}cipherKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_public_key_cipher_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}signerKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_public_key_signer_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),qr=function(){if(Xt)return jt;Xt=1;const e=A_();return jt=(t,_)=>{class r{constructor(e){this.name="CompoundPrivateKey",this.ctxPtr=void 0===e?t._vscf_compound_private_key_new():e}static newAndUseCContext(e){return new r(t._vscf_compound_private_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_compound_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_private_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_private_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_private_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_private_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_private_key_is_valid(this.ctxPtr),!!_}extractPublicKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_private_key_extract_public_key(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}cipherKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_private_key_cipher_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}signerKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_private_key_signer_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),jr=function(){if(Zt)return Wt;Zt=1;const e=A_();return Wt=(t,_)=>{class r{constructor(e){this.name="CompoundKeyAlg",this.ctxPtr=void 0===e?t._vscf_compound_key_alg_new():e}static newAndUseCContext(e){return new r(t._vscf_compound_key_alg_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_compound_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_compound_key_alg_release_random(this.ctxPtr),t._vscf_compound_key_alg_use_random(this.ctxPtr,r.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_compound_key_alg_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_compound_key_alg_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_compound_key_alg_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_compound_key_alg_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_compound_key_alg_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_compound_key_alg_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_compound_key_alg_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_compound_key_alg_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}canEncrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_compound_key_alg_can_encrypt(this.ctxPtr,r.ctxPtr,s),!!n}encryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_compound_key_alg_encrypted_len(this.ctxPtr,r.ctxPtr,s),n}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.encryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_compound_key_alg_encrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canDecrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_compound_key_alg_can_decrypt(this.ctxPtr,r.ctxPtr,s),!!n}decryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_compound_key_alg_decrypted_len(this.ctxPtr,r.ctxPtr,s),n}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.decryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_compound_key_alg_decrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canSign(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_compound_key_alg_can_sign(this.ctxPtr,r.ctxPtr),!!s}signatureLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_compound_key_alg_signature_len(this.ctxPtr,r.ctxPtr),s}signHash(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(n,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=this.signatureLen(r),f=t._vsc_buffer_new_with_capacity(l);try{const e=t._vscf_compound_key_alg_sign_hash(this.ctxPtr,r.ctxPtr,s,o,f);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(f),c=t._vsc_buffer_len(f);return t.HEAPU8.slice(n,n+c)}finally{t._free(i),t._free(o),t._vsc_buffer_delete(f)}}canVerify(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_compound_key_alg_can_verify(this.ctxPtr,r.ctxPtr),!!s}verifyHash(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("digest",n),e.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(n,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=c.length*c.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(c,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);try{return!!t._vscf_compound_key_alg_verify_hash(this.ctxPtr,r.ctxPtr,s,l,v)}finally{t._free(a),t._free(l),t._free(u),t._free(v)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_compound_key_alg_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}makeKey(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("cipherKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureImplementInterface("signerKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_compound_key_alg_make_key(this.ctxPtr,r.ctxPtr,s.ctxPtr,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}}return r}}(),Xr=function(){if(Qt)return $t;Qt=1;const e=A_();return $t=(t,_)=>{class r{constructor(e){this.name="HybridKeyAlgInfo",this.ctxPtr=void 0===e?t._vscf_hybrid_key_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_hybrid_key_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_hybrid_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_key_alg_info_alg_id(this.ctxPtr),_}firstKeyAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_key_alg_info_first_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}secondKeyAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_key_alg_info_second_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),Wr=function(){if(e_)return Jt;e_=1;const e=A_();return Jt=(t,_)=>{class r{constructor(e){this.name="HybridPublicKey",this.ctxPtr=void 0===e?t._vscf_hybrid_public_key_new():e}static newAndUseCContext(e){return new r(t._vscf_hybrid_public_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_hybrid_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_public_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_public_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_public_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_public_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_public_key_is_valid(this.ctxPtr),!!_}firstKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_public_key_first_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}secondKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_public_key_second_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),Zr=function(){if(__)return t_;__=1;const e=A_();return t_=(t,_)=>{class r{constructor(e){this.name="HybridPrivateKey",this.ctxPtr=void 0===e?t._vscf_hybrid_private_key_new():e}static newAndUseCContext(e){return new r(t._vscf_hybrid_private_key_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_hybrid_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_private_key_alg_id(this.ctxPtr),_}algInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_private_key_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_private_key_len(this.ctxPtr),_}bitlen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_private_key_bitlen(this.ctxPtr),_}isValid(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hybrid_private_key_is_valid(this.ctxPtr),!!_}extractPublicKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_private_key_extract_public_key(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}firstKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_private_key_first_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}secondKey(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hybrid_private_key_second_key(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),$r=function(){if(s_)return r_;s_=1;const e=A_();return r_=(t,_)=>{class r{constructor(e){this.name="HybridKeyAlg",this.ctxPtr=void 0===e?t._vscf_hybrid_key_alg_new():e}static newAndUseCContext(e){return new r(t._vscf_hybrid_key_alg_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_hybrid_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_hybrid_key_alg_release_random(this.ctxPtr),t._vscf_hybrid_key_alg_use_random(this.ctxPtr,r.ctxPtr)}set cipher(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("cipher",r,"Foundation.CipherAuth",_.FoundationInterfaceTag.CIPHER_AUTH,_.FoundationInterface),t._vscf_hybrid_key_alg_release_cipher(this.ctxPtr),t._vscf_hybrid_key_alg_use_cipher(this.ctxPtr,r.ctxPtr)}set hash(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("hash",r,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),t._vscf_hybrid_key_alg_release_hash(this.ctxPtr),t._vscf_hybrid_key_alg_use_hash(this.ctxPtr,r.ctxPtr)}static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return!0}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return!0}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return!0}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return!0}generateEphemeralKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("key",r,"Foundation.Key",_.FoundationInterfaceTag.KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_hybrid_key_alg_generate_ephemeral_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}importPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPublicKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_hybrid_key_alg_import_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPublicKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_hybrid_key_alg_export_public_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPublicKey.newAndTakeCContext(c)}finally{t._free(n)}}importPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("rawKey",r,_.RawPrivateKey);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_hybrid_key_alg_import_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}exportPrivateKey(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_hybrid_key_alg_export_private_key(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.RawPrivateKey.newAndTakeCContext(c)}finally{t._free(n)}}canEncrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_hybrid_key_alg_can_encrypt(this.ctxPtr,r.ctxPtr,s),!!n}encryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_hybrid_key_alg_encrypted_len(this.ctxPtr,r.ctxPtr,s),n}encrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.encryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_hybrid_key_alg_encrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canDecrypt(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_hybrid_key_alg_can_decrypt(this.ctxPtr,r.ctxPtr,s),!!n}decryptedLen(r,s){let n;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureNumber("dataLen",s),n=t._vscf_hybrid_key_alg_decrypted_len(this.ctxPtr,r.ctxPtr,s),n}decrypt(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("data",s);const n=s.length*s.BYTES_PER_ELEMENT,c=t._malloc(n);t.HEAP8.set(s,c);const i=t._vsc_data_ctx_size(),a=t._malloc(i);t._vsc_data(a,c,n);const o=this.decryptedLen(r,s.length),l=t._vsc_buffer_new_with_capacity(o);try{const e=t._vscf_hybrid_key_alg_decrypt(this.ctxPtr,r.ctxPtr,a,l);_.FoundationError.handleStatusCode(e);const s=t._vsc_buffer_bytes(l),n=t._vsc_buffer_len(l);return t.HEAPU8.slice(s,s+n)}finally{t._free(c),t._free(a),t._vsc_buffer_delete(l)}}canSign(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_hybrid_key_alg_can_sign(this.ctxPtr,r.ctxPtr),!!s}signatureLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),s=t._vscf_hybrid_key_alg_signature_len(this.ctxPtr,r.ctxPtr),s}signHash(r,s,n){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureByteArray("digest",n);const c=n.length*n.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(n,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);const l=this.signatureLen(r),f=t._vsc_buffer_new_with_capacity(l);try{const e=t._vscf_hybrid_key_alg_sign_hash(this.ctxPtr,r.ctxPtr,s,o,f);_.FoundationError.handleStatusCode(e);const n=t._vsc_buffer_bytes(f),c=t._vsc_buffer_len(f);return t.HEAPU8.slice(n,n+c)}finally{t._free(i),t._free(o),t._vsc_buffer_delete(f)}}canVerify(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),s=t._vscf_hybrid_key_alg_can_verify(this.ctxPtr,r.ctxPtr),!!s}verifyHash(r,s,n,c){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",_.FoundationInterfaceTag.PUBLIC_KEY,_.FoundationInterface),e.ensureByteArray("digest",n),e.ensureByteArray("signature",c);const i=n.length*n.BYTES_PER_ELEMENT,a=t._malloc(i);t.HEAP8.set(n,a);const o=t._vsc_data_ctx_size(),l=t._malloc(o);t._vsc_data(l,a,i);const f=c.length*c.BYTES_PER_ELEMENT,u=t._malloc(f);t.HEAP8.set(c,u);const d=t._vsc_data_ctx_size(),v=t._malloc(d);t._vsc_data(v,u,f);try{return!!t._vscf_hybrid_key_alg_verify_hash(this.ctxPtr,r.ctxPtr,s,l,v)}finally{t._free(a),t._free(l),t._free(u),t._free(v)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_hybrid_key_alg_setup_defaults(this.ctxPtr);_.FoundationError.handleStatusCode(r)}makeKey(r,s){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("firstKey",r,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface),e.ensureImplementInterface("secondKey",s,"Foundation.PrivateKey",_.FoundationInterfaceTag.PRIVATE_KEY,_.FoundationInterface);const n=t._vscf_error_ctx_size(),c=t._malloc(n);let i;t._vscf_error_reset(c);try{i=t._vscf_hybrid_key_alg_make_key(this.ctxPtr,r.ctxPtr,s.ctxPtr,c);const e=t._vscf_error_status(c);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(i)}finally{t._free(c)}}static configCipher(r,s,n){e.ensureImplementInterface("cipher",r,"Foundation.Cipher",_.FoundationInterfaceTag.CIPHER,_.FoundationInterface),e.ensureImplementInterface("hash",s,"Foundation.Hash",_.FoundationInterfaceTag.HASH,_.FoundationInterface),e.ensureByteArray("sharedKey",n);const c=n.length*n.BYTES_PER_ELEMENT,i=t._malloc(c);t.HEAP8.set(n,i);const a=t._vsc_data_ctx_size(),o=t._malloc(a);t._vsc_data(o,i,c);try{t._vscf_hybrid_key_alg_config_cipher(r.ctxPtr,s.ctxPtr,o)}finally{t._free(i),t._free(o)}}configCipher(e,t,_){return r.configCipher(e,t,_)}}return r}}(),Qr=function(){if(c_)return n_;c_=1;const e=A_();return n_=(t,_)=>{class r{constructor(e){this.name="SimpleAlgInfo",this.ctxPtr=void 0===e?t._vscf_simple_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_simple_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_simple_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_simple_alg_info_alg_id(this.ctxPtr),_}}return r}}(),Jr=function(){if(a_)return i_;a_=1;const e=A_();return i_=(t,_)=>{class r{constructor(e){this.name="HashBasedAlgInfo",this.ctxPtr=void 0===e?t._vscf_hash_based_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_hash_based_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_hash_based_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_hash_based_alg_info_alg_id(this.ctxPtr),_}hashAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_hash_based_alg_info_hash_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),es=function(){if(l_)return o_;l_=1;const e=A_();return o_=(t,_)=>{class r{constructor(e){this.name="CipherAlgInfo",this.ctxPtr=void 0===e?t._vscf_cipher_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_cipher_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_cipher_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_cipher_alg_info_alg_id(this.ctxPtr),_}nonce(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_cipher_alg_info_nonce(this.ctxPtr)}}return r}}(),ts=function(){if(u_)return f_;u_=1;const e=A_();return f_=(t,_)=>{class r{constructor(e){this.name="SaltedKdfAlgInfo",this.ctxPtr=void 0===e?t._vscf_salted_kdf_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_salted_kdf_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_salted_kdf_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_salted_kdf_alg_info_alg_id(this.ctxPtr),_}hashAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_salted_kdf_alg_info_hash_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}salt(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_salted_kdf_alg_info_salt(this.ctxPtr)}iterationCount(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_salted_kdf_alg_info_iteration_count(this.ctxPtr),_}}return r}}(),_s=function(){if(v_)return d_;v_=1;const e=A_();return d_=(t,_)=>{class r{constructor(e){this.name="PbeAlgInfo",this.ctxPtr=void 0===e?t._vscf_pbe_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_pbe_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_pbe_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_pbe_alg_info_alg_id(this.ctxPtr),_}kdfAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_pbe_alg_info_kdf_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}cipherAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_pbe_alg_info_cipher_alg_info(this.ctxPtr),_.FoundationInterface.newAndUseCContext(r)}}return r}}(),rs=function(){if(p_)return h_;p_=1;const e=A_();return h_=(t,_)=>{class r{constructor(e){this.name="EccAlgInfo",this.ctxPtr=void 0===e?t._vscf_ecc_alg_info_new():e}static newAndUseCContext(e){return new r(t._vscf_ecc_alg_info_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_ecc_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_alg_info_alg_id(this.ctxPtr),_}keyId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_alg_info_key_id(this.ctxPtr),_}domainId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_ecc_alg_info_domain_id(this.ctxPtr),_}}return r}}(),ss=function(){if(P_)return y_;P_=1;const e=A_();return y_=(t,_)=>{class r{constructor(e){this.name="AlgInfoDerSerializer",this.ctxPtr=void 0===e?t._vscf_alg_info_der_serializer_new():e}static newAndUseCContext(e){return new r(t._vscf_alg_info_der_serializer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_alg_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Writer",r,"Foundation.Asn1Writer",_.FoundationInterfaceTag.ASN1_WRITER,_.FoundationInterface),t._vscf_alg_info_der_serializer_release_asn1_writer(this.ctxPtr),t._vscf_alg_info_der_serializer_use_asn1_writer(this.ctxPtr,r.ctxPtr)}serializedLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_len(this.ctxPtr,r.ctxPtr),s}serialize(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=this.serializedLen(r),n=t._vsc_buffer_new_with_capacity(s);try{t._vscf_alg_info_der_serializer_serialize(this.ctxPtr,r.ctxPtr,n);const e=t._vsc_buffer_bytes(n),_=t._vsc_buffer_len(n);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(n)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_alg_info_der_serializer_setup_defaults(this.ctxPtr)}static isAlgRequireNullParams(e){let _;return _=t._vscf_alg_info_der_serializer_is_alg_require_null_params(e),!!_}isAlgRequireNullParams(e){return r.isAlgRequireNullParams(e)}serializedSimpleAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_simple_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeSimpleAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_simple_alg_info(this.ctxPtr,r.ctxPtr),s}serializedKdfAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_kdf_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeKdfAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_kdf_alg_info(this.ctxPtr,r.ctxPtr),s}serializedHkdfAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_hkdf_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeHkdfAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_hkdf_alg_info(this.ctxPtr,r.ctxPtr),s}serializedHmacAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_hmac_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeHmacAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_hmac_alg_info(this.ctxPtr,r.ctxPtr),s}serializedCipherAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_cipher_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeCipherAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_cipher_alg_info(this.ctxPtr,r.ctxPtr),s}serializedPbkdf2AlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_pbkdf2_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializePbkdf2AlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_pbkdf2_alg_info(this.ctxPtr,r.ctxPtr),s}serializedPbes2AlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_pbes2_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializePbes2AlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_pbes2_alg_info(this.ctxPtr,r.ctxPtr),s}serializedEccAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_ecc_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeEccAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_ecc_alg_info(this.ctxPtr,r.ctxPtr),s}serializedCompoundKeyAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_compound_key_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeCompoundKeyAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_compound_key_alg_info(this.ctxPtr,r.ctxPtr),s}serializedHybridKeyAlgInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialized_hybrid_key_alg_info_len(this.ctxPtr,r.ctxPtr),s}serializeHybridKeyAlgInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_hybrid_key_alg_info(this.ctxPtr,r.ctxPtr),s}serializeInplace(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface),s=t._vscf_alg_info_der_serializer_serialize_inplace(this.ctxPtr,r.ctxPtr),s}}return r}}(),ns=function(){if(g_)return x_;g_=1;const e=A_();return x_=(t,_)=>{class r{constructor(e){this.name="AlgInfoDerDeserializer",this.ctxPtr=void 0===e?t._vscf_alg_info_der_deserializer_new():e}static newAndUseCContext(e){return new r(t._vscf_alg_info_der_deserializer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_alg_info_der_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Reader",r,"Foundation.Asn1Reader",_.FoundationInterfaceTag.ASN1_READER,_.FoundationInterface),t._vscf_alg_info_der_deserializer_release_asn1_reader(this.ctxPtr),t._vscf_alg_info_der_deserializer_use_asn1_reader(this.ctxPtr,r.ctxPtr)}deserialize(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_alg_info_der_deserializer_deserialize(this.ctxPtr,i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_alg_info_der_deserializer_setup_defaults(this.ctxPtr)}deserializeSimpleAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_simple_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeKdfAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_kdf_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeHkdfAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_hkdf_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeHmacAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_hmac_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeCipherAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_cipher_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializePbkdf2AlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_pbkdf2_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializePbes2AlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_pbes2_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeEccAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_ecc_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeCompoundKeyAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_compound_key_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeHybridKeyAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_alg_info_der_deserializer_deserialize_hybrid_key_alg_info(this.ctxPtr,r,n);const e=t._vscf_error_status(n);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(c)}finally{t._free(n)}}deserializeInplace(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=t._vscf_error_ctx_size(),s=t._malloc(r);let n;t._vscf_error_reset(s);try{n=t._vscf_alg_info_der_deserializer_deserialize_inplace(this.ctxPtr,s);const e=t._vscf_error_status(s);return _.FoundationError.handleStatusCode(e),_.FoundationInterface.newAndTakeCContext(n)}finally{t._free(s)}}}return r}}(),cs=function(){if(k_)return m_;k_=1;const e=A_();return m_=(t,_)=>{class r{constructor(e){this.name="MessageInfoDerSerializer",this.ctxPtr=void 0===e?t._vscf_message_info_der_serializer_new():e}static newAndUseCContext(e){return new r(t._vscf_message_info_der_serializer_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_message_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Reader",r,"Foundation.Asn1Reader",_.FoundationInterfaceTag.ASN1_READER,_.FoundationInterface),t._vscf_message_info_der_serializer_release_asn1_reader(this.ctxPtr),t._vscf_message_info_der_serializer_use_asn1_reader(this.ctxPtr,r.ctxPtr)}set asn1Writer(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("asn1Writer",r,"Foundation.Asn1Writer",_.FoundationInterfaceTag.ASN1_WRITER,_.FoundationInterface),t._vscf_message_info_der_serializer_release_asn1_writer(this.ctxPtr),t._vscf_message_info_der_serializer_use_asn1_writer(this.ctxPtr,r.ctxPtr)}static get PREFIX_LEN(){return 32}get PREFIX_LEN(){return 32}serializedLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialized_len(this.ctxPtr,r.ctxPtr),s}serialize(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=this.serializedLen(r),n=t._vsc_buffer_new_with_capacity(s);try{t._vscf_message_info_der_serializer_serialize(this.ctxPtr,r.ctxPtr,n);const e=t._vsc_buffer_bytes(n),_=t._vsc_buffer_len(n);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(n)}}readPrefix(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);let i;t._vsc_data(c,s,r);try{i=t._vscf_message_info_der_serializer_read_prefix(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}deserialize(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_message_info_der_serializer_deserialize(this.ctxPtr,i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.MessageInfo.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}serializedFooterLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfoFooter",r,_.MessageInfoFooter),s=t._vscf_message_info_der_serializer_serialized_footer_len(this.ctxPtr,r.ctxPtr),s}serializeFooter(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfoFooter",r,_.MessageInfoFooter);const s=this.serializedFooterLen(r),n=t._vsc_buffer_new_with_capacity(s);try{t._vscf_message_info_der_serializer_serialize_footer(this.ctxPtr,r.ctxPtr,n);const e=t._vsc_buffer_bytes(n),_=t._vsc_buffer_len(n);return t.HEAPU8.slice(e,e+_)}finally{t._vsc_buffer_delete(n)}}deserializeFooter(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=t._malloc(s);t.HEAP8.set(r,n);const c=t._vsc_data_ctx_size(),i=t._malloc(c);t._vsc_data(i,n,s);const a=t._vscf_error_ctx_size(),o=t._malloc(a);let l;t._vscf_error_reset(o);try{l=t._vscf_message_info_der_serializer_deserialize_footer(this.ctxPtr,i,o);const e=t._vscf_error_status(o);return _.FoundationError.handleStatusCode(e),_.MessageInfoFooter.newAndTakeCContext(l)}finally{t._free(n),t._free(i),t._free(o)}}setupDefaults(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_message_info_der_serializer_setup_defaults(this.ctxPtr)}serializedCustomParamsLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("customParams",r,_.MessageInfoCustomParams),s=t._vscf_message_info_der_serializer_serialized_custom_params_len(this.ctxPtr,r.ctxPtr),s}serializeCustomParams(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("customParams",r,_.MessageInfoCustomParams),s=t._vscf_message_info_der_serializer_serialize_custom_params(this.ctxPtr,r.ctxPtr),s}serializedFooterInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("footerInfo",r,_.FooterInfo),s=t._vscf_message_info_der_serializer_serialized_footer_info_len(this.ctxPtr,r.ctxPtr),s}serializeFooterInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("footerInfo",r,_.FooterInfo),s=t._vscf_message_info_der_serializer_serialize_footer_info(this.ctxPtr,r.ctxPtr),s}serializeSignedDataInfoInternal(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("signedDataInfo",r,_.SignedDataInfo),s=t._vscf_message_info_der_serializer_serialize_signed_data_info_internal(this.ctxPtr,r.ctxPtr),s}serializedKeyRecipientInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("keyRecipientInfo",r,_.KeyRecipientInfo),s=t._vscf_message_info_der_serializer_serialized_key_recipient_info_len(this.ctxPtr,r.ctxPtr),s}serializeKeyRecipientInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("keyRecipientInfo",r,_.KeyRecipientInfo),s=t._vscf_message_info_der_serializer_serialize_key_recipient_info(this.ctxPtr,r.ctxPtr),s}serializedPasswordRecipientInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("passwordRecipientInfo",r,_.PasswordRecipientInfo),s=t._vscf_message_info_der_serializer_serialized_password_recipient_info_len(this.ctxPtr,r.ctxPtr),s}serializePasswordRecipientInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("passwordRecipientInfo",r,_.PasswordRecipientInfo),s=t._vscf_message_info_der_serializer_serialize_password_recipient_info(this.ctxPtr,r.ctxPtr),s}serializedRecipientInfosLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialized_recipient_infos_len(this.ctxPtr,r.ctxPtr),s}serializeRecipientInfos(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialize_recipient_infos(this.ctxPtr,r.ctxPtr),s}serializedEncryptedContentInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialized_encrypted_content_info_len(this.ctxPtr,r.ctxPtr),s}serializeEncryptedContentInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialize_encrypted_content_info(this.ctxPtr,r.ctxPtr),s}serializedEnvelopedDataLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialized_enveloped_data_len(this.ctxPtr,r.ctxPtr),s}serializeEnvelopedData(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialize_enveloped_data(this.ctxPtr,r.ctxPtr),s}serializedCmsContentInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialized_cms_content_info_len(this.ctxPtr,r.ctxPtr),s}serializeCmsContentInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo),s=t._vscf_message_info_der_serializer_serialize_cms_content_info_(this.ctxPtr,r.ctxPtr),s}serializedSignerInfosLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfoFooter",r,_.MessageInfoFooter),s=t._vscf_message_info_der_serializer_serialized_signer_infos_len(this.ctxPtr,r.ctxPtr),s}serializeSignerInfos(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfoFooter",r,_.MessageInfoFooter),s=t._vscf_message_info_der_serializer_serialize_signer_infos(this.ctxPtr,r.ctxPtr),s}serializedSignerInfoLen(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("signerInfo",r,_.SignerInfo),s=t._vscf_message_info_der_serializer_serialized_signer_info_len(this.ctxPtr,r.ctxPtr),s}serializeSignerInfo(r){let s;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("signerInfo",r,_.SignerInfo),s=t._vscf_message_info_der_serializer_serialize_signer_info(this.ctxPtr,r.ctxPtr),s}deserializeCustomParams(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("customParams",r,_.MessageInfoCustomParams);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_custom_params(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeCipherKdf(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_cipher_kdf(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeCipherPadding(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_cipher_padding(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeFooterInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_footer_info(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeSignedDataInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_signed_data_info(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeKeyRecipientInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_key_recipient_info(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializePasswordRecipientInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_password_recipient_info(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeRecipientInfos(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_recipient_infos(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeEncryptedContentInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_encrypted_content_info(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeEnvelopedData(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_enveloped_data(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeCmsContentInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfo",r,_.MessageInfo);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_cms_content_info(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeSignerInfos(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfoFooter",r,_.MessageInfoFooter);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_signer_infos(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}deserializeSignerInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("messageInfoFooter",r,_.MessageInfoFooter);const s=t._vscf_error_ctx_size(),n=t._malloc(s);let c;t._vscf_error_reset(n);try{c=t._vscf_message_info_der_serializer_deserialize_signer_info(this.ctxPtr,r.ctxPtr,n);const e=t._vscf_error_status(n);_.FoundationError.handleStatusCode(e)}finally{t._free(n)}}}return r}}(),is=function(){if(w_)return N_;w_=1;const e=A_();return N_=(t,_)=>{class r{constructor(e){this.name="RandomPadding",this.ctxPtr=void 0===e?t._vscf_random_padding_new():e}static newAndUseCContext(e){return new r(t._vscf_random_padding_shallow_copy(e))}static newAndTakeCContext(e){return new r(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(t._vscf_random_padding_delete(this.ctxPtr),this.ctxPtr=null)}set random(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("random",r,"Foundation.Random",_.FoundationInterfaceTag.RANDOM,_.FoundationInterface),t._vscf_random_padding_release_random(this.ctxPtr),t._vscf_random_padding_use_random(this.ctxPtr,r.ctxPtr)}static get PADDING_SIZE_LEN(){return 4}get PADDING_SIZE_LEN(){return 4}static get PADDING_LEN_MIN(){return 5}get PADDING_LEN_MIN(){return 5}algId(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_random_padding_alg_id(this.ctxPtr),_}produceAlgInfo(){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),r=t._vscf_random_padding_produce_alg_info(this.ctxPtr),_.FoundationInterface.newAndTakeCContext(r)}restoreAlgInfo(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",_.FoundationInterfaceTag.ALG_INFO,_.FoundationInterface);const s=t._vscf_random_padding_restore_alg_info(this.ctxPtr,r.ctxPtr);_.FoundationError.handleStatusCode(s)}configure(r){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureClass("params",r,_.PaddingParams),t._vscf_random_padding_configure(this.ctxPtr,r.ctxPtr)}paddedDataLen(_){let r;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureNumber("dataLen",_),r=t._vscf_random_padding_padded_data_len(this.ctxPtr,_),r}len(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_random_padding_len(this.ctxPtr),_}lenMax(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_random_padding_len_max(this.ctxPtr),_}startDataProcessing(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_random_padding_start_data_processing(this.ctxPtr)}processData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);try{t._vscf_random_padding_process_data(this.ctxPtr,c)}finally{t._free(s),t._free(c)}}finishDataProcessing(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.len(),s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_random_padding_finish_data_processing(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}startPaddedDataProcessing(){e.ensureNotNull("this.ctxPtr",this.ctxPtr),t._vscf_random_padding_start_padded_data_processing(this.ctxPtr)}processPaddedData(_){e.ensureNotNull("this.ctxPtr",this.ctxPtr),e.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=t._malloc(r);t.HEAP8.set(_,s);const n=t._vsc_data_ctx_size(),c=t._malloc(n);t._vsc_data(c,s,r);const i=_.length,a=t._vsc_buffer_new_with_capacity(i);try{t._vscf_random_padding_process_padded_data(this.ctxPtr,c,a);const e=t._vsc_buffer_bytes(a),_=t._vsc_buffer_len(a);return t.HEAPU8.slice(e,e+_)}finally{t._free(s),t._free(c),t._vsc_buffer_delete(a)}}finishPaddedDataProcessingOutLen(){let _;return e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=t._vscf_random_padding_finish_padded_data_processing_out_len(this.ctxPtr),_}finishPaddedDataProcessing(){e.ensureNotNull("this.ctxPtr",this.ctxPtr);const r=this.finishPaddedDataProcessingOutLen(),s=t._vsc_buffer_new_with_capacity(r);try{const e=t._vscf_random_padding_finish_padded_data_processing(this.ctxPtr,s);_.FoundationError.handleStatusCode(e);const r=t._vsc_buffer_bytes(s),n=t._vsc_buffer_len(s);return t.HEAPU8.slice(r,r+n)}finally{t._vsc_buffer_delete(s)}}}return r}}();return I_=_=>new Promise((r,s)=>{e(_).then(e=>{const _={};_.FoundationInterfaceTag=t(e,_),_.FoundationInterface=g(e,_),_.FoundationImplTag=k(e,_),_.FoundationError=b_(e,_),_.Asn1Tag=C_(e,_),_.AlgId=F_(e,_),_.OidId=T_(e,_),_.GroupMsgType=K_(e,_),_.CipherState=z_(e,_),_.Oid=S_(e,_),_.Base64=L_(e,_),_.Pem=R_(e,_),_.MessageInfo=B_(e,_),_.KeyRecipientInfo=Y_(e,_),_.KeyRecipientInfoList=H_(e,_),_.PasswordRecipientInfo=U_(e,_),_.PasswordRecipientInfoList=M_(e,_),_.AlgFactory=D_(e,_),_.KeyAlgFactory=O_(e,_),_.Ecies=G_(e,_),_.RecipientCipher=V_(e,_),_.MessageInfoCustomParams=q_(e,_),_.KeyProvider=j_(e,_),_.Signer=X_(e,_),_.Verifier=W_(e,_),_.BrainkeyClient=Z_(e,_),_.BrainkeyServer=$_(e,_),_.GroupSessionMessage=Q_(e,_),_.GroupSessionTicket=J_(e,_),_.GroupSession=er(e,_),_.MessageInfoEditor=tr(e,_),_.SignerInfo=_r(e,_),_.SignerInfoList=rr(e,_),_.MessageInfoFooter=sr(e,_),_.SignedDataInfo=nr(e,_),_.FooterInfo=cr(e,_),_.KeyInfo=ir(e,_),_.PaddingParams=ar(e,_),_.Sha224=or(e,_),_.Sha256=lr(e,_),_.Sha384=fr(e,_),_.Sha512=ur(e,_),_.Aes256Gcm=dr(e,_),_.Aes256Cbc=vr(e,_),_.Asn1rd=hr(e,_),_.Asn1wr=pr(e,_),_.RsaPublicKey=yr(e,_),_.RsaPrivateKey=Pr(e,_),_.Rsa=xr(e,_),_.EccPublicKey=gr(e,_),_.EccPrivateKey=mr(e,_),_.Ecc=kr(e,_),_.EntropyAccumulator=Nr(e,_),_.CtrDrbg=wr(e,_),_.Hmac=Ir(e,_),_.Hkdf=Er(e,_),_.Kdf1=br(e,_),_.Kdf2=Ar(e,_),_.FakeRandom=Cr(e,_),_.Pkcs5Pbkdf2=Fr(e,_),_.Pkcs5Pbes2=Tr(e,_),_.SeedEntropySource=Kr(e,_),_.KeyMaterialRng=zr(e,_),_.RawPublicKey=Sr(e,_),_.RawPrivateKey=Lr(e,_),_.Pkcs8Serializer=Rr(e,_),_.Sec1Serializer=Br(e,_),_.KeyAsn1Serializer=Yr(e,_),_.KeyAsn1Deserializer=Hr(e,_),_.Ed25519=Ur(e,_),_.Curve25519=Mr(e,_),_.Falcon=Dr(e,_),_.Round5=Or(e,_),_.CompoundKeyAlgInfo=Gr(e,_),_.CompoundPublicKey=Vr(e,_),_.CompoundPrivateKey=qr(e,_),_.CompoundKeyAlg=jr(e,_),_.HybridKeyAlgInfo=Xr(e,_),_.HybridPublicKey=Wr(e,_),_.HybridPrivateKey=Zr(e,_),_.HybridKeyAlg=$r(e,_),_.SimpleAlgInfo=Qr(e,_),_.HashBasedAlgInfo=Jr(e,_),_.CipherAlgInfo=es(e,_),_.SaltedKdfAlgInfo=ts(e,_),_.PbeAlgInfo=_s(e,_),_.EccAlgInfo=rs(e,_),_.AlgInfoDerSerializer=ss(e,_),_.AlgInfoDerDeserializer=ns(e,_),_.MessageInfoDerSerializer=cs(e,_),_.RandomPadding=is(e,_),r(_)}).catch(e=>{s(e)})})}(),F_=e(C_);export{F_ as default};