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.41.tar.gz
(18.1 kB
view hashes)
Built Distribution
baseblock-0.1.41-py3-none-any.whl
(21.0 kB
view hashes)
Close
Hashes for baseblock-0.1.41-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07f130875c9c3b38194732934b7c9b96aa0aa32c5cc7fa1fbba35ada581113df |
|
MD5 | aff7d093fbbdb65cbe04811b16d2e45f |
|
BLAKE2b-256 | c81e5f9e6b578325cf21d665c3f9edc5c6668a58070c0310079e7f63a9ebe331 |