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.37.tar.gz
(17.8 kB
view hashes)
Built Distribution
baseblock-0.1.37-py3-none-any.whl
(20.7 kB
view hashes)
Close
Hashes for baseblock-0.1.37-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f089f124f016bc85a4888475e2ab891e1bc21b642349402ac6b8983c0651e495 |
|
MD5 | 5f9d5a396b299d0a717e742ff44da738 |
|
BLAKE2b-256 | 33c323be3be3a666cd4db0dff0a9252740c4f331b933edddbe751d62a159fe73 |