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.43.tar.gz
(18.2 kB
view hashes)
Built Distribution
baseblock-0.1.43-py3-none-any.whl
(21.1 kB
view hashes)
Close
Hashes for baseblock-0.1.43-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 032f7f5cfe2927319ae6448a9c6fb8e07517abc5d82dfd5ee522c6c3d22f1da8 |
|
MD5 | 0a34ee5572df7f82818abfa08192c08d |
|
BLAKE2b-256 | 1ef2bfc34ac525b7ccbeffdfd818123a4099861d588669ef9a6b5dfcde9f8534 |