Skip to content

Commit ac28d7a

Browse files
junebmattsb42-aws
authored andcommitted
Tweak example text (aws#144)
* Tweak example text * Fix errant tab
1 parent c66d230 commit ac28d7a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

examples/src/data_key_caching_basic.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
"""Example showing basic configuration and use of data key caching."""
13+
"""Example of encryption with data key caching."""
1414
import aws_encryption_sdk
1515

1616

@@ -28,13 +28,13 @@ def encrypt_with_caching(kms_cmk_arn, max_age_in_cache, cache_capacity):
2828
# Max messages (or max bytes per) data key are optional
2929
MAX_ENTRY_MESSAGES = 100
3030

31-
# Create an encryption context.
31+
# Create an encryption context
3232
encryption_context = {"purpose": "test"}
3333

34-
# Create a master key provider for the KMS master key
34+
# Create a master key provider for the KMS customer master key (CMK)
3535
key_provider = aws_encryption_sdk.KMSMasterKeyProvider(key_ids=[kms_cmk_arn])
3636

37-
# Create a cache
37+
# Create a local cache
3838
cache = aws_encryption_sdk.LocalCryptoMaterialsCache(cache_capacity)
3939

4040
# Create a caching CMM
@@ -45,8 +45,9 @@ def encrypt_with_caching(kms_cmk_arn, max_age_in_cache, cache_capacity):
4545
max_messages_encrypted=MAX_ENTRY_MESSAGES,
4646
)
4747

48-
# When the call to encryptData specifies a caching CMM,
49-
# the encryption operation uses the data key cache
48+
# When the call to encrypt data specifies a caching CMM,
49+
# the encryption operation uses the data key cache specified
50+
# in the caching CMM
5051
encrypted_message, _header = aws_encryption_sdk.encrypt(
5152
source=my_data, materials_manager=caching_cmm, encryption_context=encryption_context
5253
)

0 commit comments

Comments
 (0)