Skip to content

Commit 5a364b9

Browse files
committed
docs: adjust wording
1 parent 341c5b9 commit 5a364b9

17 files changed

+34
-33
lines changed

examples/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ you can find these examples in [`examples/src/master_key_provider`](./src/master
8787

8888
## Legacy
8989

90-
This section includes older examples, including examples of using master keys and master key providers in Java and Python.
90+
This section includes older examples,
91+
including examples of using master keys and master key providers in Java and Python.
9192
You can use them as a reference,
9293
but we recommend looking at the newer examples, which explain the preferred ways of using this library.
9394
You can find these examples in [`examples/src/legacy`](./src/legacy).

examples/src/file_streaming_defaults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def run(aws_kms_cmk, source_plaintext_filename):
5454
for segment in encryptor:
5555
ciphertext.write(segment)
5656

57-
# Verify that the ciphertext and plaintext are different.
57+
# Demonstrate that the ciphertext and plaintext are different.
5858
assert not filecmp.cmp(source_plaintext_filename, ciphertext_filename)
5959

6060
# Open the files you want to work with.
@@ -78,5 +78,5 @@ def run(aws_kms_cmk, source_plaintext_filename):
7878
for segment in decryptor:
7979
decrypted.write(segment)
8080

81-
# Verify that the decrypted plaintext is identical to the original plaintext.
81+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
8282
assert filecmp.cmp(source_plaintext_filename, decrypted_filename)

examples/src/in_memory_streaming_defaults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def run(aws_kms_cmk, source_plaintext):
4949
for segment in encryptor:
5050
ciphertext.write(segment)
5151

52-
# Verify that the ciphertext and plaintext are different.
52+
# Demonstrate that the ciphertext and plaintext are different.
5353
assert ciphertext.getvalue() != source_plaintext
5454

5555
# Reset the ciphertext stream position so that we can read from the beginning.
@@ -75,5 +75,5 @@ def run(aws_kms_cmk, source_plaintext):
7575
for segment in decryptor:
7676
decrypted.write(segment)
7777

78-
# Verify that the decrypted plaintext is identical to the original plaintext.
78+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
7979
assert decrypted.getvalue() == source_plaintext

examples/src/keyring/aws_kms/custom_client_supplier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def run(aws_kms_cmk, source_plaintext):
9595
source=source_plaintext, encryption_context=encryption_context, keyring=keyring
9696
)
9797

98-
# Verify that the ciphertext and plaintext are different.
98+
# Demonstrate that the ciphertext and plaintext are different.
9999
assert ciphertext != source_plaintext
100100

101101
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -104,7 +104,7 @@ def run(aws_kms_cmk, source_plaintext):
104104
# because the header message includes the encryption context.
105105
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
106106

107-
# Verify that the decrypted plaintext is identical to the original plaintext.
107+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
108108
assert decrypted == source_plaintext
109109

110110
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/aws_kms/custom_kms_client_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def run(aws_kms_cmk, source_plaintext):
6868
source=source_plaintext, encryption_context=encryption_context, keyring=keyring
6969
)
7070

71-
# Verify that the ciphertext and plaintext are different.
71+
# Demonstrate that the ciphertext and plaintext are different.
7272
assert ciphertext != source_plaintext
7373

7474
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -77,7 +77,7 @@ def run(aws_kms_cmk, source_plaintext):
7777
# because the header message includes the encryption context.
7878
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
7979

80-
# Verify that the decrypted plaintext is identical to the original plaintext.
80+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
8181
assert decrypted == source_plaintext
8282

8383
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/aws_kms/discovery_decrypt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run(aws_kms_cmk, source_plaintext):
5858
source=source_plaintext, encryption_context=encryption_context, keyring=encrypt_keyring
5959
)
6060

61-
# Verify that the ciphertext and plaintext are different.
61+
# Demonstrate that the ciphertext and plaintext are different.
6262
assert ciphertext != source_plaintext
6363

6464
# Decrypt your encrypted data using the KMS discovery keyring.
@@ -67,7 +67,7 @@ def run(aws_kms_cmk, source_plaintext):
6767
# because the header message includes the encryption context.
6868
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=decrypt_keyring)
6969

70-
# Verify that the decrypted plaintext is identical to the original plaintext.
70+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
7171
assert decrypted == source_plaintext
7272

7373
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/aws_kms/discovery_decrypt_in_region_only.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def run(aws_kms_cmk, source_plaintext):
6666
source=source_plaintext, encryption_context=encryption_context, keyring=encrypt_keyring
6767
)
6868

69-
# Verify that the ciphertext and plaintext are different.
69+
# Demonstrate that the ciphertext and plaintext are different.
7070
assert ciphertext != source_plaintext
7171

7272
# Decrypt your encrypted data using the KMS discovery keyring.
@@ -75,7 +75,7 @@ def run(aws_kms_cmk, source_plaintext):
7575
# because the header message includes the encryption context.
7676
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=decrypt_keyring)
7777

78-
# Verify that the decrypted plaintext is identical to the original plaintext.
78+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
7979
assert decrypted == source_plaintext
8080

8181
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/aws_kms/discovery_decrypt_with_preferred_regions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def run(aws_kms_cmk, source_plaintext):
8989
source=source_plaintext, encryption_context=encryption_context, keyring=encrypt_keyring
9090
)
9191

92-
# Verify that the ciphertext and plaintext are different.
92+
# Demonstrate that the ciphertext and plaintext are different.
9393
assert ciphertext != source_plaintext
9494

9595
# Decrypt your encrypted data using the KMS discovery keyring.
@@ -98,7 +98,7 @@ def run(aws_kms_cmk, source_plaintext):
9898
# because the header message includes the encryption context.
9999
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=decrypt_keyring)
100100

101-
# Verify that the decrypted plaintext is identical to the original plaintext.
101+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
102102
assert decrypted == source_plaintext
103103

104104
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/aws_kms/multiple_regions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def run(aws_kms_generator_cmk, aws_kms_additional_cmks, source_plaintext):
6666
# It should contain one EDK for each CMK.
6767
assert len(encrypt_header.encrypted_data_keys) == len(aws_kms_additional_cmks) + 1
6868

69-
# Verify that the ciphertext and plaintext are different.
69+
# Demonstrate that the ciphertext and plaintext are different.
7070
assert ciphertext != source_plaintext
7171

7272
# Decrypt your encrypted data separately using the single-CMK keyrings.
@@ -80,7 +80,7 @@ def run(aws_kms_generator_cmk, aws_kms_additional_cmks, source_plaintext):
8080
source=ciphertext, keyring=single_cmk_keyring_that_encrypted
8181
)
8282

83-
# Verify that the decrypted plaintext is identical to the original plaintext.
83+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
8484
assert decrypted_1 == source_plaintext
8585
assert decrypted_2 == source_plaintext
8686

examples/src/keyring/aws_kms/single_cmk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def run(aws_kms_cmk, source_plaintext):
4646
source=source_plaintext, encryption_context=encryption_context, keyring=keyring
4747
)
4848

49-
# Verify that the ciphertext and plaintext are different.
49+
# Demonstrate that the ciphertext and plaintext are different.
5050
assert ciphertext != source_plaintext
5151

5252
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -55,7 +55,7 @@ def run(aws_kms_cmk, source_plaintext):
5555
# because the header message includes the encryption context.
5656
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
5757

58-
# Verify that the decrypted plaintext is identical to the original plaintext.
58+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
5959
assert decrypted == source_plaintext
6060

6161
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/multi/aws_kms_with_escrow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def run(aws_kms_cmk, source_plaintext):
100100
# It should contain one EDK for KMS and one for the escrow key.
101101
assert len(encrypt_header.encrypted_data_keys) == 2
102102

103-
# Verify that the ciphertext and plaintext are different.
103+
# Demonstrate that the ciphertext and plaintext are different.
104104
assert ciphertext != source_plaintext
105105

106106
# Decrypt your encrypted data separately using the KMS keyring and the escrow decrypt keyring.
@@ -112,7 +112,7 @@ def run(aws_kms_cmk, source_plaintext):
112112
source=ciphertext, keyring=escrow_decrypt_keyring
113113
)
114114

115-
# Verify that the decrypted plaintext is identical to the original plaintext.
115+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
116116
assert decrypted_kms == source_plaintext
117117
assert decrypted_escrow == source_plaintext
118118

examples/src/keyring/raw_aes/raw_aes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run(source_plaintext):
5858
source=source_plaintext, encryption_context=encryption_context, keyring=keyring
5959
)
6060

61-
# Verify that the ciphertext and plaintext are different.
61+
# Demonstrate that the ciphertext and plaintext are different.
6262
assert ciphertext != source_plaintext
6363

6464
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -67,7 +67,7 @@ def run(source_plaintext):
6767
# because the header message includes the encryption context.
6868
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
6969

70-
# Verify that the decrypted plaintext is identical to the original plaintext.
70+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
7171
assert decrypted == source_plaintext
7272

7373
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/raw_rsa/private_key_only.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def run(source_plaintext):
6565
source=source_plaintext, encryption_context=encryption_context, keyring=keyring
6666
)
6767

68-
# Verify that the ciphertext and plaintext are different.
68+
# Demonstrate that the ciphertext and plaintext are different.
6969
assert ciphertext != source_plaintext
7070

7171
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -74,7 +74,7 @@ def run(source_plaintext):
7474
# because the header message includes the encryption context.
7575
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
7676

77-
# Verify that the decrypted plaintext is identical to the original plaintext.
77+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
7878
assert decrypted == source_plaintext
7979

8080
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/raw_rsa/private_key_only_from_pem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def run(source_plaintext):
7878
source=source_plaintext, encryption_context=encryption_context, keyring=keyring
7979
)
8080

81-
# Verify that the ciphertext and plaintext are different.
81+
# Demonstrate that the ciphertext and plaintext are different.
8282
assert ciphertext != source_plaintext
8383

8484
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -87,7 +87,7 @@ def run(source_plaintext):
8787
# because the header message includes the encryption context.
8888
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
8989

90-
# Verify that the decrypted plaintext is identical to the original plaintext.
90+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
9191
assert decrypted == source_plaintext
9292

9393
# Verify that the encryption context used in the decrypt operation includes

examples/src/keyring/raw_rsa/public_private_key_separate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def run(source_plaintext):
9090
source=source_plaintext, encryption_context=encryption_context, keyring=public_key_keyring
9191
)
9292

93-
# Verify that the ciphertext and plaintext are different.
93+
# Demonstrate that the ciphertext and plaintext are different.
9494
assert ciphertext != source_plaintext
9595

9696
# Try to decrypt your encrypted data using the *encrypt* keyring.
@@ -111,7 +111,7 @@ def run(source_plaintext):
111111
# because the header message includes the encryption context.
112112
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=private_key_keyring)
113113

114-
# Verify that the decrypted plaintext is identical to the original plaintext.
114+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
115115
assert decrypted == source_plaintext
116116

117117
# Verify that the encryption context used in the decrypt operation includes

examples/src/onestep_defaults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def run(aws_kms_cmk, source_plaintext):
3737
source=source_plaintext, encryption_context=encryption_context, keyring=keyring
3838
)
3939

40-
# Verify that the ciphertext and plaintext are different.
40+
# Demonstrate that the ciphertext and plaintext are different.
4141
assert ciphertext != source_plaintext
4242

4343
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -46,7 +46,7 @@ def run(aws_kms_cmk, source_plaintext):
4646
# because the header message includes the encryption context.
4747
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
4848

49-
# Verify that the decrypted plaintext is identical to the original plaintext.
49+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
5050
assert decrypted == source_plaintext
5151

5252
# Verify that the encryption context used in the decrypt operation includes

examples/src/onestep_unsigned.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def run(aws_kms_cmk, source_plaintext):
5454
algorithm=AlgorithmSuite.AES_256_GCM_IV12_TAG16_HKDF_SHA256,
5555
)
5656

57-
# Verify that the ciphertext and plaintext are different.
57+
# Demonstrate that the ciphertext and plaintext are different.
5858
assert ciphertext != source_plaintext
5959

6060
# Decrypt your encrypted data using the same keyring you used on encrypt.
@@ -66,7 +66,7 @@ def run(aws_kms_cmk, source_plaintext):
6666
# because the header message includes the algorithm suite identifier.
6767
decrypted, decrypt_header = aws_encryption_sdk.decrypt(source=ciphertext, keyring=keyring)
6868

69-
# Verify that the decrypted plaintext is identical to the original plaintext.
69+
# Demonstrate that the decrypted plaintext is identical to the original plaintext.
7070
assert decrypted == source_plaintext
7171

7272
# Verify that the encryption context used in the decrypt operation includes

0 commit comments

Comments
 (0)