@Test public void testBasicAesGcmHkdfStreamingAead() throws Exception { byte[] keyValue = Random.randBytes(KDF_KEY_SIZE); int derivedKeySize = AES_KEY_SIZE; int ciphertextSegmentSize = 128; KeysetHandle keysetHandle = TestUtil.createKeysetHandle( TestUtil.createKeyset( TestUtil.createKey( TestUtil.createAesGcmHkdfStreamingKeyData( keyValue, derivedKeySize, ciphertextSegmentSize), 42, KeyStatusType.ENABLED, OutputPrefixType.RAW))); StreamingAead streamingAead = StreamingAeadFactory.getPrimitive(keysetHandle); StreamingTestUtil.testEncryptionAndDecryption(streamingAead); }
public static StreamingAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }
StreamingAeadFactory { public static StreamingAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); } }
StreamingAeadFactory { public static StreamingAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }  }
StreamingAeadFactory { public static StreamingAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }  static StreamingAead getPrimitive(KeysetHandle keysetHandle); static StreamingAead getPrimitive(
      KeysetHandle keysetHandle,
      final KeyManager<StreamingAead> keyManager); }
StreamingAeadFactory { public static StreamingAead getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException { return getPrimitive(keysetHandle, null); }  static StreamingAead getPrimitive(KeysetHandle keysetHandle); static StreamingAead getPrimitive(
      KeysetHandle keysetHandle,
      final KeyManager<StreamingAead> keyManager);  }