export declare function generateSessionKey(): Uint8Array; export declare function encrypt(data: unknown, key: Uint8Array): Promise<{ n: string; c: string; z?: boolean; }>; export declare function decrypt(encrypted: { n: string; c: string; z?: boolean; }, key: Uint8Array): Promise; export declare function isEncrypted(msg: unknown): msg is { n: string; c: string; z?: boolean; }; export declare function encodeKey(key: Uint8Array): string; export declare function decodeKey(encodedKey: string): Uint8Array; export declare function parseMessage(data: string, sessionKey: Uint8Array | null): Promise | null>; export declare function encryptAndSend(ws: { send: (data: string) => void; readyState: number; }, msg: unknown, sessionKey: Uint8Array | null): Promise;