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.46.tar.gz
(18.5 kB
view hashes)
Built Distribution
baseblock-0.1.46-py3-none-any.whl
(21.5 kB
view hashes)
Close
Hashes for baseblock-0.1.46-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04fadfdfb1c544861671acac947548285c832aba7a10f6b301bc4c3c084bc81d |
|
MD5 | 201fc4c475c530531900d26fcc3713e2 |
|
BLAKE2b-256 | 14a5eeb9e2af0dcd51f86cf51143e772df669439c4303726565391ad8de8fa1b |