@Test public void testInvalidKeyMaterial() throws Exception { Key valid = TestUtil.createKey( TestUtil.createAesSivKeyData(64), 42, KeyStatusType.ENABLED, OutputPrefixType.TINK); Key invalid = TestUtil.createKey( TestUtil.createAesCtrHmacAeadKeyData( Random.randBytes(16), 12, Random.randBytes(16), 16), 43, KeyStatusType.ENABLED, OutputPrefixType.RAW); KeysetHandle keysetHandle = TestUtil.createKeysetHandle(TestUtil.createKeyset(valid, invalid)); try { DeterministicAeadFactory.getPrimitive(keysetHandle); fail("Expected GeneralSecurityException"); } catch (GeneralSecurityException e) { assertExceptionContains(e, "com.google.crypto.tink.DeterministicAead not supported"); } keysetHandle = TestUtil.createKeysetHandle(TestUtil.createKeyset(invalid, valid)); try { DeterministicAeadFactory.getPrimitive(keysetHandle); fail("Expected GeneralSecurityException"); } catch (GeneralSecurityException e) { assertExceptionContains(e, "com.google.crypto.tink.DeterministicAead not supported"); } }
@Deprecated public static DeterministicAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }
DeterministicAeadFactory { @Deprecated public static DeterministicAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); } }
DeterministicAeadFactory { @Deprecated public static DeterministicAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }  }
DeterministicAeadFactory { @Deprecated public static DeterministicAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }  @Deprecated static DeterministicAead getPrimitive(KeysetHandle keysetHandle); @Deprecated static DeterministicAead getPrimitive(
      KeysetHandle keysetHandle, final KeyManager<DeterministicAead> keyManager); }
DeterministicAeadFactory { @Deprecated public static DeterministicAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }  @Deprecated static DeterministicAead getPrimitive(KeysetHandle keysetHandle); @Deprecated static DeterministicAead getPrimitive(
      KeysetHandle keysetHandle, final KeyManager<DeterministicAead> keyManager);  }