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.21.tar.gz
(20.2 kB
view hashes)
Built Distribution
baseblock-0.2.21-py3-none-any.whl
(23.2 kB
view hashes)
Close
Hashes for baseblock-0.2.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe868fb6e5184f420ac2372a8e85c1af583a5e484899ae8651fbb0ae4be2a4eb |
|
MD5 | afcdb591b057f9442607b205892a09e7 |
|
BLAKE2b-256 | 7553814a2a1200bfad79fbd6fa726a0d9b5e6375bc55c5ca983dc44a54fd3445 |