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.

Source Distribution

encryptedsocket-0.12.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

encryptedsocket-0.12.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file encryptedsocket-0.12.0.tar.gz.

File metadata

  • Download URL: encryptedsocket-0.12.0.tar.gz
  • Upload date:
  • Size: 4.2 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

Hashes for encryptedsocket-0.12.0.tar.gz
Algorithm Hash digest
SHA256 90ee4f1c8cb9fd9da5999fdd939c24e9a7b8bf5d03a4d31ad19b1bf037785f9a
MD5 3661eada4e1bcdda1bd25537b687039d
BLAKE2b-256 1a4af869af3456bc339a02c1f8ce3211147497534ed7747362f2e0b1ce92edbb

See more details on using hashes here.

File details

Details for the file encryptedsocket-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: encryptedsocket-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 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

Hashes for encryptedsocket-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b53cac6c8070e058585e5c074ebe3539c10feb37a88c385e28cbe38427cc844
MD5 f3a4630d968e31581d19f71ccdc02909
BLAKE2b-256 1ca5d83423b714e44e324b3c5c61bd5edd197774efb1f4afc02397f7f6ee766f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page