Skip to main content

EnigmaBridge Python Client

Project description

With this repo you can use Enigma Bridge encryption service.

Installation

pip install ebclient.py

Usage

Calling processData():

from ebclient.process_data import ProcessData
from ebclient.uo import Configuration, Endpoint, SimpleRetry, UO
from ebclient.crypto_util import *

# Construct general configuration (endpoint, request config)
cfg = Configuration()
cfg.endpoint_process = Endpoint.url('https://site2.enigmabridge.com:11180')
cfg.api_key = 'API_TEST'

# UO you want to work with
uo_aes = UO(uo_id=0xee01,
            uo_type=0x4,
            enc_key=from_hex('e134567890123456789012345678901234567890123456789012345678901234'),
            mac_key=from_hex('e224262820223456789012345678901234567890123456789012345678901234'),
            configuration=cfg)

# ProcessData itself
pd = ProcessData(uo=uo_aes, config=cfg)
result = pd.call(from_hex('6bc1bee22e409f96e93d7e117393172a'))
print(from_hex('95c6bb9b6a1c3835f98cc56087a03e82') == result)

For more usage examples please refer to tests and our API documentation.

Dependencies

pip install pycrypto requests

Or to install to home directory

pip install --user pycrypto requests

If the error ImportError: No module named Crypto is thrown it’s needed to run pip with --upgrade and update pycrypto to the latest version.

Compatibility

We should be compatible with Python 2.6+ and Python 3+.

Troubleshooting

Error in installation of dependencies (cryptography, pyOpenSSL): sorry, but this version only supports 100 named groups [100-named-groups]

Solution: Install downgraded version of pycparser and pyOpenSSL:

pip install pycparser==2.13
pip install pyOpenSSL==0.13
pip install cryptography

You may need to install some deps for the python packages

yum install gcc g++ openssl-devel libffi-devel python-devel

SNI on Python < 2.7.9

TLS SNI support was added to Python. For earlier versions SNI needs to be added to Requests networking library.

pip install urllib3
pip install pyopenssl
pip install ndg-httpsclient
pip install pyasn1

Mac OSX installation

For new OSX versions (El Capitan and above) the default system python installation cannot be modified with standard means. There are some workarounds, but one can also use --user switch for pip.

pip install --user cryptography

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

ebclient-0.2.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

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

ebclient-0.2.0-py2.py3-none-any.whl (29.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ebclient-0.2.0.tar.gz.

File metadata

  • Download URL: ebclient-0.2.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for ebclient-0.2.0.tar.gz
Algorithm Hash digest
SHA256 32ededb358020cda1d745a98b84fb704cfef29eac5a66ed9a0470b89460bd6cd
MD5 bad71172729e28e8318b68746306f3c5
BLAKE2b-256 f45c10bb6a2171f216e68c2e90bf9b3b5dae6eee9ac85aeebd20f9abefe72a87

See more details on using hashes here.

File details

Details for the file ebclient-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ebclient-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for ebclient-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7849440a8b38d54724a73a802c7fc87a02cd4f40fd4d1ca516342099ad93f247
MD5 74d566600b3598d252bf0ea0be27336a
BLAKE2b-256 3c65e62c565cce27191e55100f96ba0865964147d69d56eea30a0d4b37435186

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