Metadata-Version: 2.0
Name: aws-kms-crypt
Version: 0.0.2
Summary: Utility for encrypting and decrypting secrets with the AWS KMS service
Home-page: https://github.com/sjakthol/aws-kms-crypt
Author: Sami Jaktholm
Author-email: sjakthol@outlook.com
License: MIT
Description-Content-Type: UNKNOWN
Keywords: aws kms secrets encrypt decrypt tool
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Security :: Cryptography
Requires-Dist: boto3
Requires-Dist: pycrypto

Utility for encrypting and decrypting secrets with the AWS KMS service.

Installation
============
.. code-block:: bash

    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 configuration <https://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration>`_
for details.

.. code-block:: python

    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!'



