@Test public void testEncrytDecrypt() throws Exception { KeysetHandle keysetHandle = KeysetHandle.generateNew(DeterministicAeadKeyTemplates.AES256_SIV); DeterministicAead aead = DeterministicAeadFactory.getPrimitive(keysetHandle); byte[] plaintext = Random.randBytes(20); byte[] associatedData = Random.randBytes(20); byte[] ciphertext = aead.encryptDeterministically(plaintext, associatedData); byte[] ciphertext2 = aead.encryptDeterministically(plaintext, associatedData); byte[] decrypted = aead.decryptDeterministically(ciphertext, associatedData); byte[] decrypted2 = aead.decryptDeterministically(ciphertext2, associatedData); assertArrayEquals(ciphertext, ciphertext2); assertArrayEquals(plaintext, decrypted); assertArrayEquals(plaintext, decrypted2); }
@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);  }