Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 671389453
Change-Id: Iac9840a5be59b0d577410a9ee180db709c16ab19
  • Loading branch information
kluever authored and copybara-github committed Sep 5, 2024
1 parent 18eb678 commit c5fb65d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ java_library(
"@tink_java//src/main/java/com/google/crypto/tink:aead",
"@tink_java//src/main/java/com/google/crypto/tink:key_templates",
"@tink_java//src/main/java/com/google/crypto/tink:registry_cluster",
"@tink_java//src/main/java/com/google/crypto/tink:registry_configuration",
"@maven//:com_amazonaws_aws_java_sdk_core",
"@maven//:com_amazonaws_aws_java_sdk_kms",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.google.crypto.tink.Aead;
import com.google.crypto.tink.KeyTemplates;
import com.google.crypto.tink.KeysetHandle;
import com.google.crypto.tink.RegistryConfiguration;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.security.GeneralSecurityException;
Expand All @@ -50,7 +51,9 @@ private static byte[] serializeContext(Map<String, String> encryptionContext) {

public FakeAwsKms(List<String> validKeyIds) throws GeneralSecurityException {
for (String keyId : validKeyIds) {
Aead aead = KeysetHandle.generateNew(KeyTemplates.get("AES128_GCM")).getPrimitive(Aead.class);
Aead aead =
KeysetHandle.generateNew(KeyTemplates.get("AES128_GCM"))
.getPrimitive(RegistryConfiguration.get(), Aead.class);
aeads.put(keyId, aead);
}
}
Expand Down

0 comments on commit c5fb65d

Please sign in to comment.