Skip to content

Scrub Python code comments #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 31, 2017
Merged

Conversation

juneb
Copy link
Contributor

@juneb juneb commented Aug 24, 2017

No description provided.

@@ -33,8 +33,8 @@ def __init__(self, **kwargs):
def _get_raw_key(self, key_id):
"""Retrieves a static, randomly generated, RSA key for the specified key id.

:param str key_id: Key ID
:returns: Wrapping key which contains the specified static key
:param str key_id: : User-defined ID for the static key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit the extra ": "

@@ -59,33 +59,36 @@ def _get_raw_key(self, key_id):


def cycle_file(key_arn, source_plaintext_filename, botocore_session=None):
"""Encrypts and then decrypts a file under both a KMS Master Key Provider and a custom static Master Key Provider.
"""Encrypts and then decrypts a file using a KMS master key provider and a custom static master
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing: The docstring for a function must be indented to the level of the contents of that function.

static_key_id = os.urandom(8)
static_master_key_provider = StaticRandomMasterKeyProvider()
static_master_key_provider.add_master_key(static_key_id)

# Add Static Master Key Provider to KMS Master Key Provider
# Create a master key provider that includes the KMS and static master key providers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We created the KMS master key on line 81. This step adds static_master_key_provider into kms_master_key_provider. It does not create a new master key provider.

@mattsb42-aws mattsb42-aws merged commit b61f2ee into aws:master Aug 31, 2017
lizroth pushed a commit that referenced this pull request Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants