Library and CLI to encrypt and decrypt text using AES CBC mode.
Note that the implementation is ported from:
- http://masterminds.github.io/sprig/crypto.html#encryptaes
- http://masterminds.github.io/sprig/crypto.html#decryptaes
pip install sprig-aes
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)
enc_text=$(sprig-aes encrypt 'a secret message' --key 6Jsv61H7fbkeIkRvUpnZ98fu)
sprig-aes decrypt "$enc_text" --key 6Jsv61H7fbkeIkRvUpnZ98fu