Skip to content

Commit 5b2b116

Browse files
authored
chore(examples): fix comments (#705)
1 parent 45f386e commit 5b2b116

14 files changed

+19
-33
lines changed

examples/src/aws_kms_discovery_keyring_example.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
with an encryption context. This encrypted ciphertext is then decrypted using the Discovery keyring.
2424
This example also includes some sanity checks for demonstration:
2525
1. Ciphertext and plaintext data are not the same
26-
2. Encryption context is correct in the decrypted message header
27-
3. Decrypted plaintext value matches EXAMPLE_DATA
28-
4. Decryption is only possible if the Discovery Keyring contains the correct AWS Account ID's to
26+
2. Decrypted plaintext value matches EXAMPLE_DATA
27+
3. Decryption is only possible if the Discovery Keyring contains the correct AWS Account ID's to
2928
which the KMS key used for encryption belongs
3029
These sanity checks are for demonstration in the example only. You do not need these in your code.
3130
@@ -165,8 +164,8 @@ def encrypt_and_decrypt_with_keyring(
165164
assert plaintext_bytes == EXAMPLE_DATA, \
166165
"Decrypted plaintext should be identical to the original plaintext. Invalid decryption"
167166

168-
# 11. Demonstrate that if a discovery keyring (Bob's) doesn't have the correct AWS Account ID's,
169-
# the decrypt will fail with an error message
167+
# 10. Demonstrate that if a different discovery keyring (Bob's) doesn't have the correct
168+
# AWS Account ID's, the decrypt will fail with an error message
170169
# Note that this assumes Account ID used here ('888888888888') is different than the one used
171170
# during encryption
172171
discovery_keyring_input_bob: CreateAwsKmsDiscoveryKeyringInput = \

examples/src/aws_kms_discovery_multi_keyring_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
with an encryption context. This encrypted ciphertext is then decrypted using the Discovery Multi
2323
keyring. This example also includes some sanity checks for demonstration:
2424
1. Ciphertext and plaintext data are not the same
25-
2. Encryption context is correct in the decrypted message header
26-
3. Decrypted plaintext value matches EXAMPLE_DATA
25+
2. Decrypted plaintext value matches EXAMPLE_DATA
2726
These sanity checks are for demonstration in the example only. You do not need these in your code.
2827
2928
For more information on how to use KMS Discovery keyrings, see

examples/src/aws_kms_keyring_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
decrypt data keys. This example creates a KMS Keyring and then encrypts a custom input EXAMPLE_DATA
88
with an encryption context. This example also includes some sanity checks for demonstration:
99
1. Ciphertext and plaintext data are not the same
10-
2. Encryption context is correct in the decrypted message header
11-
3. Decrypted plaintext value matches EXAMPLE_DATA
10+
2. Decrypted plaintext value matches EXAMPLE_DATA
1211
These sanity checks are for demonstration in the example only. You do not need these in your code.
1312
1413
AWS KMS keyrings can be used independently or in a multi-keyring with other keyrings

examples/src/aws_kms_mrk_discovery_keyring_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
with an encryption context. This encrypted ciphertext is then decrypted using an
2222
MRK Discovery keyring. This example also includes some sanity checks for demonstration:
2323
1. Ciphertext and plaintext data are not the same
24-
2. Encryption context is correct in the decrypted message header
25-
3. Decrypted plaintext value matches EXAMPLE_DATA
24+
2. Decrypted plaintext value matches EXAMPLE_DATA
2625
These sanity checks are for demonstration in the example only. You do not need these in your code.
2726
2827
For information about using multi-Region keys with the AWS Encryption SDK, see

examples/src/aws_kms_mrk_discovery_multi_keyring_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
with an encryption context. This encrypted ciphertext is then decrypted using an
2424
MRK Discovery Multi keyring. This example also includes some sanity checks for demonstration:
2525
1. Ciphertext and plaintext data are not the same
26-
2. Encryption context is correct in the decrypted message header
27-
3. Decrypted plaintext value matches EXAMPLE_DATA
26+
2. Decrypted plaintext value matches EXAMPLE_DATA
2827
These sanity checks are for demonstration in the example only. You do not need these in your code.
2928
3029
For information about using multi-Region keys with the AWS Encryption SDK, see

examples/src/aws_kms_mrk_keyring_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
This example creates a KMS MRK Keyring and then encrypts a custom input EXAMPLE_DATA
99
with an encryption context. This example also includes some sanity checks for demonstration:
1010
1. Ciphertext and plaintext data are not the same
11-
2. Encryption context is correct in the decrypted message header
12-
3. Decrypted plaintext value matches EXAMPLE_DATA
11+
2. Decrypted plaintext value matches EXAMPLE_DATA
1312
These sanity checks are for demonstration in the example only. You do not need these in your code.
1413
1514
AWS KMS MRK keyrings can be used independently or in a multi-keyring with other keyrings

examples/src/aws_kms_mrk_multi_keyring_example.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
Either KMS Key individually is capable of decrypting data encrypted under this keyring.
1515
This example also includes some sanity checks for demonstration:
1616
1. Ciphertext and plaintext data are not the same
17-
2. Encryption context is correct in the decrypted message header
18-
3. Decrypted plaintext value matches EXAMPLE_DATA
19-
4. Ciphertext can be decrypted using an AwsKmsMrkKeyring containing a replica of the
17+
2. Decrypted plaintext value matches EXAMPLE_DATA
18+
3. Ciphertext can be decrypted using an AwsKmsMrkKeyring containing a replica of the
2019
MRK (from the multi-keyring used for encryption) copied from the first region into
2120
the second region
2221
These sanity checks are for demonstration in the example only. You do not need these in your code.

examples/src/aws_kms_rsa_keyring_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
EXAMPLE_DATA with an encryption context. This example also includes some sanity checks for
88
demonstration:
99
1. Ciphertext and plaintext data are not the same
10-
2. Encryption context is correct in the decrypted message header
11-
3. Decrypted plaintext value matches EXAMPLE_DATA
10+
2. Decrypted plaintext value matches EXAMPLE_DATA
1211
These sanity checks are for demonstration in the example only. You do not need these in your code.
1312
1413
# For more information on how to use KMS keyrings, see

examples/src/default_cryptographic_materials_manager_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
and we use an AWS KMS Keyring for this example.
1212
This example also includes some sanity checks for demonstration:
1313
1. Ciphertext and plaintext data are not the same
14-
2. Encryption context is correct in the decrypted message header
15-
3. Decrypted plaintext value matches EXAMPLE_DATA
14+
2. Decrypted plaintext value matches EXAMPLE_DATA
1615
These sanity checks are for demonstration in the example only. You do not need these in your code.
1716
1817
For more information on Cryptographic Material Managers, see

examples/src/file_streaming_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
It then decrypts the ciphertext from `ciphertext_filename` to a new file `decrypted_filename`.
1414
This example also includes some sanity checks for demonstration:
1515
1. Ciphertext and plaintext data are not the same
16-
2. Encryption context is correct in the decrypted message header
17-
3. Decrypted plaintext value matches EXAMPLE_DATA
16+
2. Decrypted plaintext value matches EXAMPLE_DATA
1817
These sanity checks are for demonstration in the example only. You do not need these in your code.
1918
2019
For more information on how to use Raw AES keyrings, see

examples/src/migration/migration_set_commitment_policy_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
with an encryption context for the commitment policy FORBID_ENCRYPT_ALLOW_DECRYPT.
1414
This example also includes some sanity checks for demonstration:
1515
1. Ciphertext and plaintext data are not the same
16-
2. Encryption context is correct in the decrypted message header
17-
3. Decrypted plaintext value matches EXAMPLE_DATA
16+
2. Decrypted plaintext value matches EXAMPLE_DATA
1817
These sanity checks are for demonstration in the example only. You do not need these in your code.
1918
2019
For more information on setting your commitment policy, see

examples/src/raw_aes_keyring_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
This example creates a Raw AES Keyring and then encrypts a custom input EXAMPLE_DATA
1212
with an encryption context. This example also includes some sanity checks for demonstration:
1313
1. Ciphertext and plaintext data are not the same
14-
2. Encryption context is correct in the decrypted message header
15-
3. Decrypted plaintext value matches EXAMPLE_DATA
14+
2. Decrypted plaintext value matches EXAMPLE_DATA
1615
These sanity checks are for demonstration in the example only. You do not need these in your code.
1716
1817
The Raw AES keyring encrypts data by using the AES-GCM algorithm and a wrapping key that

examples/src/raw_rsa_keyring_example.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
This example creates a Raw RSA Keyring and then encrypts a custom input EXAMPLE_DATA
1616
with an encryption context. This example also includes some sanity checks for demonstration:
1717
1. Ciphertext and plaintext data are not the same
18-
2. Encryption context is correct in the decrypted message header
19-
3. Decrypted plaintext value matches EXAMPLE_DATA
20-
4. The original ciphertext is not decryptable using a keyring with a different RSA key pair
18+
2. Decrypted plaintext value matches EXAMPLE_DATA
19+
3. The original ciphertext is not decryptable using a keyring with a different RSA key pair
2120
These sanity checks are for demonstration in the example only. You do not need these in your code.
2221
2322
A Raw RSA keyring that encrypts and decrypts must include an asymmetric public key and private

examples/src/set_encryption_algorithm_suite_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
with an encryption context and the algorithm suite AES_256_GCM_HKDF_SHA512_COMMIT_KEY.
3232
This example also includes some sanity checks for demonstration:
3333
1. Ciphertext and plaintext data are not the same
34-
2. Encryption context is correct in the decrypted message header
35-
3. Decrypted plaintext value matches EXAMPLE_DATA
34+
2. Decrypted plaintext value matches EXAMPLE_DATA
3635
These sanity checks are for demonstration in the example only. You do not need these in your code.
3736
3837
For more information on how to use Raw AES keyrings, see

0 commit comments

Comments
 (0)