-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
No description provided.