Installation
You can grab the latest .whl file from repository and install it via pip or just simply type:
pip install opencrypt
If you want build from source code, then.
git clone https://github.com/EbryxLabs/opencrypt
cd opencrypt/
python setup.py install
You will have a package named opencrypt installed for your python.
Encryption / Decryption
You can encrypt / decrypt data using ebcrypt tool. (AES-256 Encryption)
For example, to encrypt you can do following:
ebcrypt <my-file.json> -e --new
# encrypts myfile.json using newly created crypto-secure key. Keys will be written to _keys file.
ebcrypt <my-file.json> -e
# encrypts using keys in AES_KEY, AES_IV environment variable.
For decryption, you'll need to have AES_KEY and AES_IV keys in your environment variables.
ebcrypt <my-file.json> -d
This is an optional step in case you want to decode your encrypted data explicitly for manual checking. Program decrypts your encrypted config file automatically.
You can get detailed help on crypto tool by typing.
ebcrypt -h
OpenSSL compatibility
Encryption done by openssl utility can be decrypted by ebcrypt utility and vice versa. For example, you can encrypt using openssl as follows.
openssl aes-256-cbc -a -e -K <hex-key> -iv <hex-iv> -in <input-file> -out <output-file>
hex-key and hex-iv should be replaced with actual keys in hex format. Using the same keys you used in openssl, you can decrypt using ebcrypt as follows.
ebcrypt <encrypted-file> -d
# AES_KEY environment variable should hold <hex-key>.
# AES_IV environment variable should hold <hex-iv>.
Similarly, you can encrypt using ebcrypt and decrypt the content using openssl, given that you're using the same keys.
Code Usage
You can also use it in your own code by importing the appropriate module.
import opencrypt
opencrypt.encrypt_file(filename, new_keys=False)
opencrypt.decrypt_file(filename, write_to_file=True, is_ciphertext=False)
Metadata
Release files for opencrypt 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opencrypt-0.5.1.tar.gz | 4.0 kB | Without provenance | Details for opencrypt-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opencrypt-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for opencrypt-0.5.1-py3-none-any.whl |
Total release size: 9.4 kB
Release files / opencrypt-0.5.1.tar.gz
| Download URL | opencrypt-0.5.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ba9e3ee1da34f5f6c9429e3df9b2369d4828822226aa2b4922c66aab996899a
|
|
BLAKE2b-256 checksum How to use checksums |
e2ec5013ae3542a426ef39ea09ad4361f369e5c34453f614f289ca22ab35d056
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Release files / opencrypt-0.5.1-py3-none-any.whl
| Download URL | opencrypt-0.5.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
731da08cfa76b16d73b252ac268a2d25c0793fd8fa7f079f754d8dc64476af3f
|
|
BLAKE2b-256 checksum How to use checksums |
8476012b1fcedfc6ab3c083953f0ed5b2af2f3acb3922ae19352a93e8c377691
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Security for opencrypt 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.