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.50.tar.gz
(19.5 kB
view hashes)
Built Distribution
baseblock-0.1.50-py3-none-any.whl
(22.4 kB
view hashes)
Close
Hashes for baseblock-0.1.50-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e659868275d3e0f7a8c82e467c54646c38a6a72cf4ccf4aa015f32385f74d37c |
|
MD5 | f43f060bb665db0a087e211f80456c93 |
|
BLAKE2b-256 | 20f27a17c2664d9a9084983b026685da5d2855eb85225f44a1881a4a7a8990fc |