Secured yet simple socket server-client for interprocess communications with RSA and AES-256.
Project description
Encrypted Socket
Secured yet simple socket server-client for interprocess communications with RSA and AES-256.
Hierarchy
encryptedsocket
|---- SS()
| |---- start()
| '---- stop()
'---- SC()
'---- request()
Example
python
# You can transmit objects as long as
# both sides have access to their classes
from encryptedsocket import *
from easyrsa import *
# prepare rsa key pair
kp = EasyRSA(bits=1024).gen_key_pair()
# server
def test(data):
return f"Data:\t{data}"
functions = dict(test=test)
SS(functions=functions, key_pair=kp).start()
print("test socket server started.", flush=True)
# # Nothing is printed, you must start it from an other thread
# client
sc = SC()
for i in range(5):
print(sc.request(command="test", data=args(f"Hello, {i}!")))
for i in range(5):
print(SC().request(command="test", data=args(f"Hello, {i}!")))
print("test socket client started.", flush=True)
# # both for loops produce same result
# # while the later one uses a new key in each loop
# Data: Hello, 0!
# Data: Hello, 1!
# Data: Hello, 2!
# Data: Hello, 3!
# Data: Hello, 4!
# test socket client started.
shell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
encryptedsocket-0.7.5.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file encryptedsocket-0.7.5.tar.gz.
File metadata
- Download URL: encryptedsocket-0.7.5.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2846ec19a24b554a9d7e5d9e9eccd40fd90b3c84acd115b2330504a026af54de
|
|
| MD5 |
137ea36e2a333c69555a79e957424877
|
|
| BLAKE2b-256 |
d9e2e4be8171ea9b84124eaf6bb8bf01826590b87156ec04bf98a186e0a3e51c
|
File details
Details for the file encryptedsocket-0.7.5-py3-none-any.whl.
File metadata
- Download URL: encryptedsocket-0.7.5-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fe7aaaad6076cc012a7479c30ee87aec72f943e1e719f893142a2cb4d7ac57e
|
|
| MD5 |
061a75dfe2660159ab4d132f80696b6a
|
|
| BLAKE2b-256 |
d6c1fff69a7a8421bb8b187a5c6817d89c825094fda0c4b3df77b5368b3921e2
|