From e474a9902644a7977d1b68c84898ae242824a018 Mon Sep 17 00:00:00 2001 From: aluykx Date: Tue, 3 Nov 2020 10:37:19 -0800 Subject: [PATCH] Removing final RegistryTest.java dependency on deprecated class AeadKeyTemplates. PiperOrigin-RevId: 340475813 --- java_src/src/test/java/com/google/crypto/tink/BUILD.bazel | 2 +- .../src/test/java/com/google/crypto/tink/RegistryTest.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/java_src/src/test/java/com/google/crypto/tink/BUILD.bazel b/java_src/src/test/java/com/google/crypto/tink/BUILD.bazel index 16f85e97bd..f158f5fd08 100644 --- a/java_src/src/test/java/com/google/crypto/tink/BUILD.bazel +++ b/java_src/src/test/java/com/google/crypto/tink/BUILD.bazel @@ -218,7 +218,7 @@ java_test( "//src/main/java/com/google/crypto/tink:public_key_verify", "//src/main/java/com/google/crypto/tink:registry_cluster", "//src/main/java/com/google/crypto/tink/aead:aead_config", - "//src/main/java/com/google/crypto/tink/aead:aead_key_templates", + "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_key_manager", "//src/main/java/com/google/crypto/tink/aead:aes_eax_key_manager", "//src/main/java/com/google/crypto/tink/config:tink_config", "//src/main/java/com/google/crypto/tink/mac:mac_config", diff --git a/java_src/src/test/java/com/google/crypto/tink/RegistryTest.java b/java_src/src/test/java/com/google/crypto/tink/RegistryTest.java index 9a4e00aada..a3954cdde6 100644 --- a/java_src/src/test/java/com/google/crypto/tink/RegistryTest.java +++ b/java_src/src/test/java/com/google/crypto/tink/RegistryTest.java @@ -23,7 +23,7 @@ import static org.junit.Assert.fail; import com.google.crypto.tink.aead.AeadConfig; -import com.google.crypto.tink.aead.AeadKeyTemplates; +import com.google.crypto.tink.aead.AesCtrHmacAeadKeyManager; import com.google.crypto.tink.aead.AesEaxKeyManager; import com.google.crypto.tink.config.TinkConfig; import com.google.crypto.tink.mac.MacConfig; @@ -447,9 +447,8 @@ public void testGetPrimitive_Hmac_shouldWork() throws Exception { @Test public void testGetPrimitives_CustomManager_shouldWork() throws Exception { // Create a keyset. - KeyTemplate template2 = AeadKeyTemplates.AES128_CTR_HMAC_SHA256; KeyData key1 = Registry.newKeyData(AesEaxKeyManager.aes128EaxTemplate()); - KeyData key2 = Registry.newKeyData(template2); + KeyData key2 = Registry.newKeyData(AesCtrHmacAeadKeyManager.aes128CtrHmacSha256Template()); KeysetHandle keysetHandle = KeysetHandle.fromKeyset( Keyset.newBuilder()