Skip to main content

No project description provided

Project description

Testcases

sprig-aes

Library and CLI to encrypt and decrypt text using AES CBC mode.

Note that the implementation is ported from:

  1. http://masterminds.github.io/sprig/crypto.html#encryptaes
  2. http://masterminds.github.io/sprig/crypto.html#decryptaes

Installation

Typical installation using pip:

pip install sprig-aes

This will install the sprig_aes library and sprig-aes CLI.

Note that as per version 0.6.0, users may install self-contained Python zipapps (CLI-only) using the following command:

pip install shiv
make zipapp
mv sprig-aes.pyz ~/.local/bin/sprig-aes

Using The Library

from sprig_aes import sprig_encrypt_aes
from sprig_aes import sprig_decrypt_aes

key = "6Jsv61H7fbkeIkRvUpnZ98fu"
enc_text = sprig_encrypt_aes("a secret message", key)
dec_text = sprig_decrypt_aes(enc_text, key)

Using The CLI

enc_text=$(sprig-aes encrypt 'a secret message' --key 6Jsv61H7fbkeIkRvUpnZ98fu)
sprig-aes decrypt "$enc_text" --key 6Jsv61H7fbkeIkRvUpnZ98fu

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

sprig_aes-0.6.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sprig_aes-0.6.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file sprig_aes-0.6.0.tar.gz.

File metadata

  • Download URL: sprig_aes-0.6.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for sprig_aes-0.6.0.tar.gz
Algorithm Hash digest
SHA256 dc4137c3fcba1541c39c608740e20ab0765c768b49d193fffe25391384553db3
MD5 0aa3d8b356b53a21abdbc1aab17b74dc
BLAKE2b-256 3b1ffea30cd2948186eaca9417f2bbcdbf93cc289cb9d625ef9ca681969f1e32

See more details on using hashes here.

File details

Details for the file sprig_aes-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: sprig_aes-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for sprig_aes-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fdaf46fc6b5a094bbc435add491fbe17bfb036fd2e2697f446c24fab8fb0b65
MD5 f32e4559b09e49ed1d6c2e23a4c7cc3d
BLAKE2b-256 ec660d92c106b0c54207f767bd65b7acc7e3f6851a8fe2137abbf94be94e5acf

See more details on using hashes here.

Supported by

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