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.20.tar.gz
(20.2 kB
view hashes)
Built Distribution
baseblock-0.2.20-py3-none-any.whl
(23.2 kB
view hashes)
Close
Hashes for baseblock-0.2.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4dafceb649f7206715100c97f74fa3787c17f225d114aa127d275b9d9d295ee |
|
MD5 | 43ebbb06ceadfff9fdfe96d80a25c05f |
|
BLAKE2b-256 | 5db8fb30e5d7edf9c1bad4584b7c446f7be2fa126a696b8ff52a2323b2920f60 |