Utility for encrypting and decrypting secrets with the AWS KMS service
Project description
Utility for encrypting and decrypting secrets with the AWS KMS service.
Installation
pip install aws-kms-crypt
Usage
You will need to configure credentials and AWS region for boto3 to use this library. Please refer to the Boto3 Documentation for details.
import kmscrypt
# Encrypting Data
>>> result = kmscrypt.encrypt('secretp4ssw0rd!', key_id='alias/common', encryption_context={
... 'purpose': 'automation'
... })
>>> result
{
"EncryptedDataKey": "AQIDAHhyrbU/fPcQ+a8pJiYC<snip>",
"Iv": "689806fe9d571afeffa4c7c24247c766",
"EncryptedData": "YRjZDQ2KzcEAZqUy7SpWWA==",
"EncryptionContext": {
"purpose": "automation"
}
}
# Decrypting data
>>> kmscrypt.decrypt(result)
'secretp4ssw0rd!'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for aws_kms_crypt-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e5ad67810e5187da88f003ba7f03041f7687c028a7f9641a81e981fd8e4222b |
|
MD5 | 1da91dab7bb68d6a8102c7c5f99c9601 |
|
BLAKE2b-256 | 505b649c9c24b3ce24439bfc202b6f9e43e90e0c94a5d01b997413be4099f857 |