Skip to content

Commit 4e86ec1

Browse files
Matching python wording
1 parent 1a85fb5 commit 4e86ec1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/examples/java/com/amazonaws/crypto/examples/keyring/awskms/ActLikeAwsKmsMasterKeyProvider.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ public static void run(final AwsKmsCmkId awsKmsCmk, final List<AwsKmsCmkId> awsK
9999
//
100100
// The CMK keyring reproduces the encryption behavior
101101
// and the discovery keyring reproduces the decryption behavior.
102-
// This also means that it does not matter if the CMK keyring fails on decrypt,
103-
// for example if you configured it with aliases which would work on encrypt
104-
// but fail to match any encrypted data keys on decrypt,
105-
// because the discovery keyring attempts to decrypt any AWS KMS-encrypted
106-
// data keys that it finds.
102+
// This also means that it does not matter if the CMK keyring fails to decrypt.
103+
// For example, if you configured the CMK keyring with aliases,
104+
// it works on encrypt but fails to match any encrypted data keys on decrypt
105+
// because the serialized key name is the resulting CMK ARN rather than the alias name.
106+
// However, because the discovery keyring attempts to decrypt any AWS KMS-encrypted
107+
// data keys that it finds, the message still decrypts successfully.
107108
final Keyring keyring = StandardKeyrings.multi(cmkKeyring, discoveryKeyring);
108109

109110
// Encrypt your plaintext data.

0 commit comments

Comments
 (0)