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.38.tar.gz
(17.8 kB
view hashes)
Built Distribution
baseblock-0.1.38-py3-none-any.whl
(20.8 kB
view hashes)
Close
Hashes for baseblock-0.1.38-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04b822c30b32553ea1f66280996960205a5664dae73e88fc43ed8e6e9ce0b8b6 |
|
MD5 | 9d932f54c37149e3626a646f04487cc0 |
|
BLAKE2b-256 | 652bd229154b295ad8f0afcce83160c5d122baac9793517fd92273ae7c9125e3 |