File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
2
+ from kmsencryption import lib
3
+
2
4
import click
3
5
import sys
4
6
5
- from kmsencryption import lib
6
-
7
7
8
8
@click .group (context_settings = {"help_option_names" : ['-h' , '--help' ]})
9
9
def main ():
Original file line number Diff line number Diff line change 4
4
import json
5
5
import os
6
6
7
+
7
8
def get_key_provider (cmk_arn , profile ):
8
9
if cmk_arn :
9
10
kms_kwargs = dict (key_ids = [cmk_arn ])
Original file line number Diff line number Diff line change 3
3
4
4
setup (
5
5
name = 'kms-encryption-toolbox' ,
6
- version = '0.0.14 ' ,
6
+ version = '0.1.0 ' ,
7
7
url = 'https://github.com/ApplauseOSS/kms-encryption-toolbox' ,
8
8
license = 'Applause' ,
9
9
description = 'Encryption toolbox to be used with the Amazon Key Management Service for securing your deployment secrets. It encapsulates the aws-encryption-sdk package to expose cmdline actions.' ,
15
15
'cffi>=1.10.0' ,
16
16
'aws-encryption-sdk>=1.2.0' ,
17
17
'click>=6.6' ,
18
- 'attrs>=16.3.0,<17.0.0' ,
19
18
'cryptography>=1.8.1'
20
19
],
21
20
entry_points = {
Original file line number Diff line number Diff line change 3
3
kms_key_provider = aws_encryption_sdk .KMSMasterKeyProvider (key_ids = [
4
4
'arn:aws:kms:us-east-1:873559269338:key/1e1a6a81-93e0-4b9a-954b-cc09802bf3ce'
5
5
])
6
- import pdb ; pdb .set_trace ()
7
6
my_plaintext = 'This is some super secret data! Yup, sure is!'
8
7
9
8
my_ciphertext , encryptor_header = aws_encryption_sdk .encrypt (
16
15
key_provider = kms_key_provider
17
16
)
18
17
19
- assert my_plaintext == decrypted_plaintext
18
+ assert my_plaintext == decrypted_plaintext . decode ( 'ascii' )
20
19
assert encryptor_header .encryption_context == decryptor_header .encryption_context
21
20
You can’t perform that action at this time.
0 commit comments