Base Block of Common Enterprise Python Utilities
Project description
Base Block (baseblock)
Base Block of Common Enterprise Python Utilities
Crypto Base
Usage
from baseblock import CryptoBase
key = CryptoBase.generate_private_key()
The key
is used to both encrypt and decrypt text, like this:
input_text = "Hello, World!"
crypt = CryptoBase(key)
x = crypt.encrypt_str(input_text)
y = crypt.decrypt_str(x)
assert input_text == y
The key can also be stored in the environment under BASEBLOCK_CRYPTO_KEY.
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
baseblock-0.1.36.tar.gz
(17.9 kB
view details)
Built Distribution
File details
Details for the file baseblock-0.1.36.tar.gz
.
File metadata
- Download URL: baseblock-0.1.36.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79d903e0a83bf5ac02903221f8d2d3cb1a34e90bea94cf7622ea4eead4443fb8 |
|
MD5 | 7502464d921e8b9872053c21a3b1cd93 |
|
BLAKE2b-256 | 601bfc4fd9fa8e95e368da52bb26443b070895505939b5f458454da8627e2961 |
File details
Details for the file baseblock-0.1.36-py3-none-any.whl
.
File metadata
- Download URL: baseblock-0.1.36-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6761035b8cc5ae236bb298a5f8d5c07d5ede6076153b7cb2f6bee87435da7800 |
|
MD5 | 2f3ae071357b35be15b222a8b79e9a87 |
|
BLAKE2b-256 | a4167afd32fcd4be0bb32887872d942c0a90802f7ecc5bf1338b681e7c917ce5 |