From b3da7fea1734f9f8f727752c8765d3fa2ec68133 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 2 Oct 2021 03:03:49 +0100 Subject: [PATCH] add todo --- src/lib/transport/Connection.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/transport/Connection.mjs b/src/lib/transport/Connection.mjs index 8b03f34..a028ddb 100644 --- a/src/lib/transport/Connection.mjs +++ b/src/lib/transport/Connection.mjs @@ -72,6 +72,7 @@ class Connection extends EventEmitter { async send(message) { // TODO: Implement a binary frame-based protocol here instead? It would be 33% more bandwidth efficient. // Perhaps ? If messages are too long, we'll have to do something about that though.... + // TODO: Consider https://devdocs.io/node/crypto#crypto.createCipheriv() - which lets us use any openssl ciphers we like - e.g. ChaCha20-Poly1305 let payload = JSON.stringify(message); payload = encrypt_bytes(this.session_key, payload);