From f8edfdbd3b0fa64f79a00092435feb2415393180 Mon Sep 17 00:00:00 2001 From: hornet Date: Tue, 9 Nov 2021 14:36:37 -0500 Subject: [PATCH] Deleted test files --- src/py-cli/websock/alice.py | 22 ---------------------- src/py-cli/websock/bob.py | 31 ------------------------------- 2 files changed, 53 deletions(-) delete mode 100755 src/py-cli/websock/alice.py delete mode 100755 src/py-cli/websock/bob.py diff --git a/src/py-cli/websock/alice.py b/src/py-cli/websock/alice.py deleted file mode 100755 index bad5596..0000000 --- a/src/py-cli/websock/alice.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -!/usr/bin/env python - -https://pypi.org/project/websockets/ - -@author Lachezar Todorov -""" - -import asyncio -import encrypt_decrypt - -from websockets import connect - -class Alice(): - async def messageEncrypt(uri, publicKey, message): - encryptedMessage = encrypt_decrypt.encrypt_decrypt.encryption(message, publicKey) - async with connect(uri) as websocket: - await websocket.send(encryptedMessage) - #message = await websocket.recv() - #print(message) - - #asyncio.run(hello("ws://localhost:8765")) \ No newline at end of file diff --git a/src/py-cli/websock/bob.py b/src/py-cli/websock/bob.py deleted file mode 100755 index a566bf3..0000000 --- a/src/py-cli/websock/bob.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -!/usr/bin/env python - -https://pypi.org/project/websockets/ - -@author Lachezar Todorov -""" - -import asyncio -import encrypt_decrypt -from websockets import serve - -class Bob(): - def __init__(self,privateKey): - self.pk = privateKey - - async def decrypt(websocket, path): - privateKey = "" #dummy variable to make code work, please change! - async for message in websocket: - message = await websocket.recv() - decryptedMessage = encrypt_decrypt.encrypt_decrypt.decryption(message, privateKey) - #await websocket.send(decryptedMessage) - print(decryptedMessage) - - async def messageDecrypt(privateKey): - #do something with privateKey to send it to decrypt - - async with serve(Bob.decrypt, "localhost", 8765): - await asyncio.Future() # run forever - - #asyncio.run(main()) \ No newline at end of file