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.16.tar.gz
(19.8 kB
view hashes)
Built Distribution
baseblock-0.2.16-py3-none-any.whl
(22.8 kB
view hashes)
Close
Hashes for baseblock-0.2.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 747bbf0dd9a4b6f8a610b22203add69224f0bdcd8660a2c75cf48b9f302d9a1d |
|
MD5 | 9d91635586e83b646ee0f6e899af646e |
|
BLAKE2b-256 | d07f2521a85edf9293feac555143ab5cec38a08f4d21f6f1ad7a9b0527d5ac31 |