Better voice chat UI and fix bug

This commit is contained in:
2026-08-28 16:32:18 +02:00
parent e280614829
commit 4f128915d0
5 changed files with 97 additions and 75 deletions
-9
View File
@@ -17,7 +17,6 @@ export default class EnclaveWebSocket {
onOpenQueue: Array<() => void>;
private sendCounter = 0n;
private recvCounter = 0n;
public sharedSecret: Uint8Array | null = null;
private readonly handshakeReady: Promise<void>;
@@ -78,14 +77,6 @@ export default class EnclaveWebSocket {
return nonce;
}
private nextRecvNonce(): Uint8Array {
const nonce = new Uint8Array(12);
const view = new DataView(nonce.buffer);
view.setBigUint64(0, this.recvCounter, false);
this.recvCounter += 1n;
return nonce;
}
private encrypt(plaintext: Uint8Array): Uint8Array {
if (!this.sharedSecret) throw new Error("Handshake not complete");