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.2.24.tar.gz
(20.4 kB
view hashes)
Built Distribution
baseblock-0.2.24-py3-none-any.whl
(23.5 kB
view hashes)
Close
Hashes for baseblock-0.2.24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6b579a73880d9c309405c356859f0f53138509feffec2b50663f32e22c199c8 |
|
MD5 | 2ecd9e56a82b931ba3e11d47c67092fd |
|
BLAKE2b-256 | 6839eb9bbbfac9070e57828cf3cd1cd9141a199e8b1db3b3e211caa4d2516ca1 |