feat: implement end-to-end encryption for relay connections

This commit is contained in:
Mohamed Boudra
2026-02-03 13:40:44 +07:00
parent a7a39ffd01
commit 6ed70e24c7
23 changed files with 1004 additions and 115 deletions
+12
View File
@@ -0,0 +1,12 @@
import { fromByteArray, toByteArray } from "base64-js";
export function arrayBufferToBase64(buffer: ArrayBuffer): string {
return fromByteArray(new Uint8Array(buffer));
}
export function base64ToArrayBuffer(base64: string): ArrayBuffer {
const bytes = toByteArray(base64);
const out = new Uint8Array(bytes.byteLength);
out.set(bytes);
return out.buffer;
}