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/mac/MacWrapperTest.java
test_class.identifier: MacWrapperTest
test_case.body: @Test
    public void testSmallPlaintextWithRawKey() throws Exception {
      byte[] keyValue = Random.randBytes(HMAC_KEY_SIZE);
      Key primary = TestUtil.createKey(
          TestUtil.createHmacKeyData(keyValue, 16),
          42,
          KeyStatusType.ENABLED,
          OutputPrefixType.RAW);
      KeysetHandle keysetHandle = TestUtil.createKeysetHandle(
          TestUtil.createKeyset(primary));
      Mac mac = new MacWrapper().wrap(Registry.getPrimitives(keysetHandle, Mac.class));
      byte[] plaintext = "blah".getBytes("UTF-8");
      byte[] tag = mac.computeMac(plaintext);
      // no prefix
      assertEquals(16 /* TAG */, tag.length);
      try {
        mac.verifyMac(tag, plaintext);
      } catch (GeneralSecurityException e) {
        fail("Valid MAC, should not throw exception");
      }
    }
test_case.class_method_signature: MacWrapperTest.testSmallPlaintextWithRawKey()
test_case.full_signature: @Test public void testSmallPlaintextWithRawKey()
test_case.identifier: testSmallPlaintextWithRawKey
test_case.invocations: randBytes createKey createHmacKeyData createKeysetHandle createKeyset wrap getPrimitives getBytes computeMac assertEquals verifyMac fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSmallPlaintextWithRawKey()
focal_class.declarator: logger = Logger.getLogger(MacWrapper.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = Logger.getLogger(MacWrapper.class.getName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: java_src/src/main/java/com/google/crypto/tink/mac/MacWrapper.java
focal_class.identifier: MacWrapper
focal_class.interfaces: implements PrimitiveWrapper<Mac, Mac>
focal_class.class_method_signature: MacWrapper.MacWrapper()
focal_class.full_signature:   MacWrapper()
focal_class.identifier: MacWrapper
focal_class.parameters: ()
focal_class.signature:  MacWrapper()
focal_class.class_method_signature: MacWrapper.wrap(final PrimitiveSet<Mac> primitives)
focal_class.full_signature: @Override public Mac wrap(final PrimitiveSet<Mac> primitives)
focal_class.identifier: wrap
focal_class.modifiers: @Override public
focal_class.parameters: (final PrimitiveSet<Mac> primitives)
focal_class.return: Mac
focal_class.signature: Mac wrap(final PrimitiveSet<Mac> primitives)
focal_class.class_method_signature: MacWrapper.getPrimitiveClass()
focal_class.full_signature: @Override public Class<Mac> getPrimitiveClass()
focal_class.identifier: getPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<Mac>
focal_class.signature: Class<Mac> getPrimitiveClass()
focal_class.class_method_signature: MacWrapper.getInputPrimitiveClass()
focal_class.full_signature: @Override public Class<Mac> getInputPrimitiveClass()
focal_class.identifier: getInputPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<Mac>
focal_class.signature: Class<Mac> getInputPrimitiveClass()
focal_class.class_method_signature: MacWrapper.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 Mac wrap(final PrimitiveSet<Mac> primitives) throws GeneralSecurityException {
      return new WrappedMac(primitives);
    }
focal_method.class_method_signature: MacWrapper.wrap(final PrimitiveSet<Mac> primitives)
focal_method.full_signature: @Override public Mac wrap(final PrimitiveSet<Mac> primitives)
focal_method.identifier: wrap
focal_method.modifiers: @Override public
focal_method.parameters: (final PrimitiveSet<Mac> primitives)
focal_method.return: Mac
focal_method.signature: Mac wrap(final PrimitiveSet<Mac> primitives)