Skip to content

Commit

Permalink
Set KeyId parameter in AWS KMS Decrypt requests.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 534004793
Change-Id: I27f78366cb9cbff2ffe73ff35925243b6efec495
  • Loading branch information
chuckx authored and copybara-github committed May 22, 2023
1 parent 29a019c commit 7cc0ec2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
throws GeneralSecurityException {
try {
DecryptRequest req =
new DecryptRequest()// place-holder, see b/170353401. DO NOT EDIT.
new DecryptRequest().withKeyId(keyArn)
.withCiphertextBlob(ByteBuffer.wrap(ciphertext));
if (associatedData != null && associatedData.length != 0) {
req = req.addEncryptionContextEntry("associatedData", BinaryUtils.toHex(associatedData));
Expand Down

0 comments on commit 7cc0ec2

Please sign in to comment.