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.39.tar.gz
(18.0 kB
view hashes)
Built Distribution
baseblock-0.1.39-py3-none-any.whl
(20.8 kB
view hashes)
Close
Hashes for baseblock-0.1.39-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 621028e1f8afbfedf339c4da6998273bc08d7b06eb83f65ec4e644a2977d7178 |
|
MD5 | 9ac9c3a9e087669dbe29d35762c29db8 |
|
BLAKE2b-256 | f02b91a06a1ef5d6f0af7aea0f6a5ea4ba608f693035f592da55e49485e55520 |