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.11.tar.gz
(19.7 kB
view details)
Built Distribution
File details
Details for the file baseblock-0.2.11.tar.gz
.
File metadata
- Download URL: baseblock-0.2.11.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003b81199281d95fb7b787d94d44886347925039343ba84610b8fa4626fc9ead |
|
MD5 | e34f95c6cd6492c605c2d2578bbcf264 |
|
BLAKE2b-256 | 10ac1d9bde26257e6f48bb1aa1429ad33b8d9723876aec0411aa098f42945ddf |
File details
Details for the file baseblock-0.2.11-py3-none-any.whl
.
File metadata
- Download URL: baseblock-0.2.11-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d89ef0425cba12df473d5ee7eff4e698e19b7ff80ff023e357c5e612be2bb47 |
|
MD5 | 94e0e22a20c54424f10edab34d6344e6 |
|
BLAKE2b-256 | d37f4a16337b18e75d2e923f41ed5dea656cff31d9afc14ad618f713a04517e1 |