From efb4a78247e2c95e05b34c45d134542e0c2be060 Mon Sep 17 00:00:00 2001
From: Dominik Fuhrmann <dominik.fuhrmann1@gmail.com>
Date: Fri, 27 Dec 2024 11:59:37 +0100
Subject: [PATCH] finalized communication setup

---
 communication/client.py | 2 +-
 communication/server.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/communication/client.py b/communication/client.py
index 66d8886..c86b136 100644
--- a/communication/client.py
+++ b/communication/client.py
@@ -47,7 +47,7 @@ def send_message_to_server(host, port, algorithm, key, key_length, encrypted_mes
         'algorithm': algorithm,
         'key_length': key_length,
         'key': key.hex(),
-        'encrypted_message': encrypted_message
+        'message': encrypted_message
     }
 
     # Verbindung zum Server herstellen und Daten senden
diff --git a/communication/server.py b/communication/server.py
index f7363f6..16210c2 100644
--- a/communication/server.py
+++ b/communication/server.py
@@ -59,8 +59,8 @@ def handle_client(conn, addr):
         algorithm = data['algorithm']
         key_length = data['key_length']
         key = bytes.fromhex(data['key'])
-        encrypted_message = data['encrypted_message']
-        logging.info(f"Algorithm: {algorithm}, Key Length: {key_length}")
+        encrypted_message = data['message']
+        logging.info(f"Algorithm: {algorithm}, Key Length: {key_length}, key: {key}")
     except json.JSONDecodeError as e:
         logging.error(f"Error decoding data: {e}")
         conn.close()
-- 
GitLab