1import{A as e,k as t}from"./vaultEncryption-BqiIr_t8.js";import{n}from"./conversationEncryption-Ky08jbXW.js";import{t as r}from"./messengerEncryption-D6mKv3kr.js";import{r as i,t as a}from"./vaultFileKeys-C8WsiZDH.js";function o(e){let t=``,n=8192;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...e.slice(r,r+n));return btoa(t)}function s(e){return Uint8Array.from(atob(e),e=>e.charCodeAt(0))}async function c(t,n){let r=await a(),{encrypted:s,iv:c}=await e(t,r),l=await i(r,n);return{ciphertext:o(new Uint8Array(s)),iv:o(c),encryptedKey:l.encryptedFileKey,keyIv:l.keyIv,senderPublicKey:l.senderPublicKey}}async function l(e,t){let n=e==null?void 0:e.trim();return n?c(n,t):void 0}async function u(e){let i=r();if(!i)return null;try{let r=await n(e.encryptedKey,e.keyIv,e.senderPublicKey,i.encryptionPrivateKey),a=s(e.ciphertext);return await t(new Uint8Array(a).buffer,s(e.iv),r)}catch{return null}}export{l as n,u as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.