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.48.tar.gz
(18.8 kB
view hashes)
Built Distribution
baseblock-0.1.48-py3-none-any.whl
(21.8 kB
view hashes)
Close
Hashes for baseblock-0.1.48-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f62f48aab0c844bad297d58109dbe7792d2f410a27fafbfbd7f348b5b7e51de6 |
|
MD5 | 6d16f81be307b863ac925ef3f79515e0 |
|
BLAKE2b-256 | f17bf68dde13a6328504008d89f4aefb54cc3f2a4452fb6894ad6b78ae2646f9 |