Skip to content

Commit 320d5c3

Browse files
committed
fixes
1 parent 8c5bb63 commit 320d5c3

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

examples/src/custom_mpl_cmm_example.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
"""
4-
Example to create a custom implementation of the ESDK-MPL ICryptographicMaterialsManager class.
4+
Example to create a custom implementation of the MPL's ICryptographicMaterialsManager class and use it with the ESDK.
5+
6+
The cryptographic materials manager (CMM) assembles the cryptographic materials that are used
7+
to encrypt and decrypt data. The cryptographic materials include plaintext and encrypted data keys,
8+
and an optional message signing key.
59
610
Cryptographic Materials Managers (CMMs) are composable; if you just want to extend the behavior of
7-
the default CMM, you can do this as demonstrated in this example. This is easy if you just want
8-
to add a small check to the CMM methods.
11+
the default CMM, you can do this as demonstrated in this example. This is the easiest approach if
12+
you are just adding a small check to the CMM methods, as in this example.
913
10-
Custom implementation of CMMs must implement get_encryption_materials and decrypt_materials.
11-
If your use case calls for fundamentally change aspects of the default CMM, you can also write
12-
your own implementation without extending a CMM.
14+
If your use case calls for fundamentally changing aspects of the default CMM, you can also write
15+
your own implementation without extending an existing CMM. The default CMM's implementation is a
16+
good reference to use if you need to write a custom CMM implementation from scratch.
17+
Custom implementations of CMMs must implement get_encryption_materials and decrypt_materials.
1318
1419
For more information on a default implementation of a CMM,
1520
please look at the default_cryptographic_materials_manager_example.py example.
21+
22+
For more information on Cryptographic Material Managers, see
23+
https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#crypt-materials-manager
1624
"""
1725

1826
from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders

0 commit comments

Comments
 (0)