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.declarator: HMAC_KEY_SIZE = 20
test_class.modifier: private static final
test_class.original_string: private static final int HMAC_KEY_SIZE = 20;
test_class.type: int
test_class.var_name: HMAC_KEY_SIZE
test_class.file: java_src/src/test/java/com/google/crypto/tink/aead/AeadWrapperTest.java
test_class.identifier: AeadWrapperTest
test_case.body: @Test
    public void testRawKeyAsPrimary() throws Exception {
      byte[] aesCtrKeyValue = Random.randBytes(AES_KEY_SIZE);
      byte[] hmacKeyValue = Random.randBytes(HMAC_KEY_SIZE);
      int ivSize = 12;
      int tagSize = 16;
  
      Key primary =
          TestUtil.createKey(
              TestUtil.createAesCtrHmacAeadKeyData(aesCtrKeyValue, ivSize, hmacKeyValue, tagSize),
              42,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
      Key raw =
          TestUtil.createKey(
              TestUtil.createAesCtrHmacAeadKeyData(aesCtrKeyValue, ivSize, hmacKeyValue, tagSize),
              43,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
      Key legacy =
          TestUtil.createKey(
              TestUtil.createAesCtrHmacAeadKeyData(aesCtrKeyValue, ivSize, hmacKeyValue, tagSize),
              44,
              KeyStatusType.ENABLED,
              OutputPrefixType.LEGACY);
      KeysetHandle keysetHandle =
          TestUtil.createKeysetHandle(TestUtil.createKeyset(primary, raw, legacy));
      Aead aead = new AeadWrapper().wrap(Registry.getPrimitives(keysetHandle, Aead.class));
      byte[] plaintext = Random.randBytes(20);
      byte[] associatedData = Random.randBytes(20);
      byte[] ciphertext = aead.encrypt(plaintext, associatedData);
      assertArrayEquals(plaintext, aead.decrypt(ciphertext, associatedData));
      assertEquals(
          CryptoFormat.RAW_PREFIX_SIZE + plaintext.length + ivSize + tagSize, ciphertext.length);
    }
test_case.class_method_signature: AeadWrapperTest.testRawKeyAsPrimary()
test_case.full_signature: @Test public void testRawKeyAsPrimary()
test_case.identifier: testRawKeyAsPrimary
test_case.invocations: randBytes randBytes createKey createAesCtrHmacAeadKeyData createKey createAesCtrHmacAeadKeyData createKey createAesCtrHmacAeadKeyData createKeysetHandle createKeyset wrap getPrimitives randBytes randBytes encrypt assertArrayEquals decrypt assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRawKeyAsPrimary()
focal_class.declarator: logger = Logger.getLogger(AeadWrapper.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = Logger.getLogger(AeadWrapper.class.getName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: java_src/src/main/java/com/google/crypto/tink/aead/AeadWrapper.java
focal_class.identifier: AeadWrapper
focal_class.interfaces: implements PrimitiveWrapper<Aead, Aead>
focal_class.class_method_signature: AeadWrapper.AeadWrapper()
focal_class.full_signature:   AeadWrapper()
focal_class.identifier: AeadWrapper
focal_class.parameters: ()
focal_class.signature:  AeadWrapper()
focal_class.class_method_signature: AeadWrapper.wrap(final PrimitiveSet<Aead> pset)
focal_class.full_signature: @Override public Aead wrap(final PrimitiveSet<Aead> pset)
focal_class.identifier: wrap
focal_class.modifiers: @Override public
focal_class.parameters: (final PrimitiveSet<Aead> pset)
focal_class.return: Aead
focal_class.signature: Aead wrap(final PrimitiveSet<Aead> pset)
focal_class.class_method_signature: AeadWrapper.getPrimitiveClass()
focal_class.full_signature: @Override public Class<Aead> getPrimitiveClass()
focal_class.identifier: getPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<Aead>
focal_class.signature: Class<Aead> getPrimitiveClass()
focal_class.class_method_signature: AeadWrapper.getInputPrimitiveClass()
focal_class.full_signature: @Override public Class<Aead> getInputPrimitiveClass()
focal_class.identifier: getInputPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<Aead>
focal_class.signature: Class<Aead> getInputPrimitiveClass()
focal_class.class_method_signature: AeadWrapper.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 Aead wrap(final PrimitiveSet<Aead> pset) throws GeneralSecurityException {
      return new WrappedAead(pset);
    }
focal_method.class_method_signature: AeadWrapper.wrap(final PrimitiveSet<Aead> pset)
focal_method.full_signature: @Override public Aead wrap(final PrimitiveSet<Aead> pset)
focal_method.identifier: wrap
focal_method.modifiers: @Override public
focal_method.parameters: (final PrimitiveSet<Aead> pset)
focal_method.return: Aead
focal_method.signature: Aead wrap(final PrimitiveSet<Aead> pset)