test_class.declarator: KDF_KEY_SIZE = 16
test_class.modifier: private static final
test_class.original_string: private static final int KDF_KEY_SIZE = 16;
test_class.type: int
test_class.var_name: KDF_KEY_SIZE
test_class.declarator: AES_KEY_SIZE = 16
test_class.modifier: private static final
test_class.original_string: private static final int AES_KEY_SIZE = 16;
test_class.type: int
test_class.var_name: AES_KEY_SIZE
test_class.file: java_src/src/test/java/com/google/crypto/tink/streamingaead/StreamingAeadWrapperTest.java
test_class.identifier: StreamingAeadWrapperTest
test_case.body: @Test
    public void testMultipleKeys() throws Exception {
      byte[] primaryKeyValue = Random.randBytes(KDF_KEY_SIZE);
      byte[] otherKeyValue = Random.randBytes(KDF_KEY_SIZE);
      byte[] anotherKeyValue = Random.randBytes(KDF_KEY_SIZE);
      int derivedKeySize = AES_KEY_SIZE;
  
      Key primaryKey =
          TestUtil.createKey(
              TestUtil.createAesGcmHkdfStreamingKeyData(primaryKeyValue, derivedKeySize, 512),
              42,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
      // Another key with a smaller segment size than the primary key
      Key otherKey =
          TestUtil.createKey(
              TestUtil.createAesCtrHmacStreamingKeyData(otherKeyValue, derivedKeySize, 256),
              43,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
      // Another key with a larger segment size than the primary key
      Key anotherKey =
          TestUtil.createKey(
              TestUtil.createAesGcmHkdfStreamingKeyData(anotherKeyValue, derivedKeySize, 1024),
              72,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
  
      KeysetHandle keysetHandle =
          TestUtil.createKeysetHandle(TestUtil.createKeyset(primaryKey, otherKey, anotherKey));
      StreamingAead streamingAead =
          new StreamingAeadWrapper().wrap(Registry.getPrimitives(keysetHandle, StreamingAead.class));
  
      StreamingAead primaryAead =
          new StreamingAeadWrapper()
              .wrap(
                  Registry.getPrimitives(
                      TestUtil.createKeysetHandle(TestUtil.createKeyset(primaryKey)),
                      StreamingAead.class));
      StreamingAead otherAead =
          new StreamingAeadWrapper()
              .wrap(
                  Registry.getPrimitives(
                      TestUtil.createKeysetHandle(TestUtil.createKeyset(otherKey)),
                      StreamingAead.class));
      StreamingAead anotherAead =
          new StreamingAeadWrapper()
              .wrap(
                  Registry.getPrimitives(
                      TestUtil.createKeysetHandle(TestUtil.createKeyset(anotherKey)),
                      StreamingAead.class));
  
      StreamingTestUtil.testEncryptionAndDecryption(streamingAead, streamingAead);
      StreamingTestUtil.testEncryptionAndDecryption(streamingAead, primaryAead);
      StreamingTestUtil.testEncryptionAndDecryption(primaryAead, streamingAead);
      StreamingTestUtil.testEncryptionAndDecryption(otherAead, streamingAead);
      StreamingTestUtil.testEncryptionAndDecryption(anotherAead, streamingAead);
      StreamingTestUtil.testEncryptionAndDecryption(primaryAead, primaryAead);
      StreamingTestUtil.testEncryptionAndDecryption(otherAead, otherAead);
      StreamingTestUtil.testEncryptionAndDecryption(anotherAead, anotherAead);
      try {
        StreamingTestUtil.testEncryptionAndDecryption(otherAead, primaryAead);
        fail("No matching key, should have thrown an exception");
      } catch (IOException expected) {
        assertExceptionContains(expected, "No matching key");
      }
      try {
        StreamingTestUtil.testEncryptionAndDecryption(anotherAead, primaryAead);
        fail("No matching key, should have thrown an exception");
      } catch (IOException expected) {
        assertExceptionContains(expected, "No matching key");
      }
    }
test_case.class_method_signature: StreamingAeadWrapperTest.testMultipleKeys()
test_case.full_signature: @Test public void testMultipleKeys()
test_case.identifier: testMultipleKeys
test_case.invocations: randBytes randBytes randBytes createKey createAesGcmHkdfStreamingKeyData createKey createAesCtrHmacStreamingKeyData createKey createAesGcmHkdfStreamingKeyData createKeysetHandle createKeyset wrap getPrimitives wrap getPrimitives createKeysetHandle createKeyset wrap getPrimitives createKeysetHandle createKeyset wrap getPrimitives createKeysetHandle createKeyset testEncryptionAndDecryption testEncryptionAndDecryption testEncryptionAndDecryption testEncryptionAndDecryption testEncryptionAndDecryption testEncryptionAndDecryption testEncryptionAndDecryption testEncryptionAndDecryption testEncryptionAndDecryption fail assertExceptionContains testEncryptionAndDecryption fail assertExceptionContains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultipleKeys()
focal_class.file: java_src/src/main/java/com/google/crypto/tink/streamingaead/StreamingAeadWrapper.java
focal_class.identifier: StreamingAeadWrapper
focal_class.interfaces: implements PrimitiveWrapper<StreamingAead, StreamingAead>
focal_class.class_method_signature: StreamingAeadWrapper.StreamingAeadWrapper()
focal_class.full_signature:   StreamingAeadWrapper()
focal_class.identifier: StreamingAeadWrapper
focal_class.parameters: ()
focal_class.signature:  StreamingAeadWrapper()
focal_class.class_method_signature: StreamingAeadWrapper.wrap(final PrimitiveSet<StreamingAead> primitives)
focal_class.full_signature: @Override public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives)
focal_class.identifier: wrap
focal_class.modifiers: @Override public
focal_class.parameters: (final PrimitiveSet<StreamingAead> primitives)
focal_class.return: StreamingAead
focal_class.signature: StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives)
focal_class.class_method_signature: StreamingAeadWrapper.getPrimitiveClass()
focal_class.full_signature: @Override public Class<StreamingAead> getPrimitiveClass()
focal_class.identifier: getPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<StreamingAead>
focal_class.signature: Class<StreamingAead> getPrimitiveClass()
focal_class.class_method_signature: StreamingAeadWrapper.getInputPrimitiveClass()
focal_class.full_signature: @Override public Class<StreamingAead> getInputPrimitiveClass()
focal_class.identifier: getInputPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<StreamingAead>
focal_class.signature: Class<StreamingAead> getInputPrimitiveClass()
focal_class.class_method_signature: StreamingAeadWrapper.register()
focal_class.full_signature: public static void register()
focal_class.identifier: register
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void register()
focal_method.body: @Override
    public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives)
        throws GeneralSecurityException {
      return new StreamingAeadHelper(primitives);
    }
focal_method.class_method_signature: StreamingAeadWrapper.wrap(final PrimitiveSet<StreamingAead> primitives)
focal_method.full_signature: @Override public StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives)
focal_method.identifier: wrap
focal_method.modifiers: @Override public
focal_method.parameters: (final PrimitiveSet<StreamingAead> primitives)
focal_method.return: StreamingAead
focal_method.signature: StreamingAead wrap(final PrimitiveSet<StreamingAead> primitives)