@Test public void testBasicAesCtrHmacStreamingAead() 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.createAesCtrHmacStreamingKeyData( keyValue, derivedKeySize, ciphertextSegmentSize), 42, KeyStatusType.ENABLED, OutputPrefixType.RAW))); StreamingAead streamingAead = new StreamingAeadWrapper().wrap(Registry.getPrimitives(keysetHandle, StreamingAead.class)); StreamingTestUtil.testEncryptionAndDecryption(streamingAead); }
@Override public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives) throws GeneralSecurityException { return new StreamingAeadHelper(primitives); }
StreamingAeadWrapper implements PrimitiveWrapper<StreamingAead, StreamingAead> { @Override public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives) throws GeneralSecurityException { return new StreamingAeadHelper(primitives); } }
StreamingAeadWrapper implements PrimitiveWrapper<StreamingAead, StreamingAead> { @Override public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives) throws GeneralSecurityException { return new StreamingAeadHelper(primitives); } StreamingAeadWrapper(); }
StreamingAeadWrapper implements PrimitiveWrapper<StreamingAead, StreamingAead> { @Override public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives) throws GeneralSecurityException { return new StreamingAeadHelper(primitives); } StreamingAeadWrapper(); @Override StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives); @Override Class<StreamingAead> getPrimitiveClass(); @Override Class<StreamingAead> getInputPrimitiveClass(); static void register(); }
StreamingAeadWrapper implements PrimitiveWrapper<StreamingAead, StreamingAead> { @Override public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives) throws GeneralSecurityException { return new StreamingAeadHelper(primitives); } StreamingAeadWrapper(); @Override StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives); @Override Class<StreamingAead> getPrimitiveClass(); @Override Class<StreamingAead> getInputPrimitiveClass(); static void register();  }