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.35.tar.gz
(17.9 kB
view hashes)
Built Distribution
baseblock-0.1.35-py3-none-any.whl
(20.9 kB
view hashes)
Close
Hashes for baseblock-0.1.35-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4549efbc21cd47b10656d270b5cbc0853427a753077d2d2c7408a2bcf69730d6 |
|
MD5 | 1610e2dd25071d7f2ddb505406a07b80 |
|
BLAKE2b-256 | d08b66c2854a20e80485d9bbd65c255e230c9b51732657f996f01fa60db8ae9d |