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.14.tar.gz
(19.7 kB
view hashes)
Built Distribution
baseblock-0.2.14-py3-none-any.whl
(22.7 kB
view hashes)
Close
Hashes for baseblock-0.2.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1203812c04f69d25348030975718f53b46dc571c2651863e6401d12e9d1589db |
|
MD5 | 2ca804791d9f4f912d9676e45e2b584a |
|
BLAKE2b-256 | cb51f3d65966b66400e5081cab7b173c062e7e3d16e4e8885838b29a99a21240 |