Skip to main content

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


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)

Uploaded Source

Built Distribution

baseblock-0.1.46-py3-none-any.whl (21.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page