Skip to main content

Secured yet simple socket server-client for interprocess communications with RSA and AES-256.

Project description

Encrypted Socket

version license pyversions
donate powered made

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for encryptedsocket, version 0.13.0
Filename, size File type Python version Upload date Hashes
Filename, size encryptedsocket-0.13.0-py3-none-any.whl (17.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size encryptedsocket-0.13.0.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page