test_class.declarator: HMAC_TEST_VECTORS = {
      new MacTestVector(
          "HMACSHA1",
          "816aa4c3ee066310ac1e6666cf830c375355c3c8ba18cfe1f50a48c988b46272",
          "220248f5e6d7a49335b3f91374f18bb8b0ff5e8b9a5853f3cfb293855d78301d837a0a2eb9e4f056f06c08361"
              + "bd07180ee802651e69726c28910d2baef379606815dcbab01d0dc7acb0ba8e65a2928130da0522f2b2b3d05260"
              + "885cf1c64f14ca3145313c685b0274bf6a1cb38e4f99895c6a8cc72fbe0e52c01766fede78a1a",
          "17cb2e9e98b748b5ae0f7078ea5519e5"),
      new MacTestVector(
          "HMACSHA256",
          "6f35628d65813435534b5d67fbdb54cb33403d04e843103e6399f806cb5df95febbdd61236f33245",
          "752cff52e4b90768558e5369e75d97c69643509a5e5904e0a386cbe4d0970ef73f918f675945a9aefe26daea27"
              + "587e8dc909dd56fd0468805f834039b345f855cfe19c44b55af241fff3ffcd8045cd5c288e6c4e284c3720570b"
              + "58e4d47b8feeedc52fd1401f698a209fccfa3b4c0d9a797b046a2759f82a54c41ccd7b5f592b",
          "05d1243e6465ed9620c9aec1c351a186"),
      new MacTestVector(
          "HMACSHA384",
          "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
          "4869205468657265",
          "afd03944d84895626b0825f4ab46907f15f9dadbe4101ec682aa034c7cebc59cfaea9ea9076ede7f4af152e8b2fa9cb6"),
      new MacTestVector(
          "HMACSHA512",
          "726374c4b8df517510db9159b730f93431e0cd468d4f3821eab0edb93abd0fba46ab4f1ef35d54fec3d85fa89e"
              + "f72ff3d35f22cf5ab69e205c10afcdf4aaf11338dbb12073474fddb556e60b8ee52f91163ba314303ee0c910e6"
              + "4e87fbf302214edbe3f2",
          "ac939659dc5f668c9969c0530422e3417a462c8b665e8db25a883a625f7aa59b89c5ad0ece5712ca17442d1798"
              + "c6dea25d82c5db260cb59c75ae650be56569c1bd2d612cc57e71315917f116bbfa65a0aeb8af7840ee83d3e710"
              + "1c52cf652d2773531b7a6bdd690b846a741816c860819270522a5b0cdfa1d736c501c583d916",
          "bd3d2df6f9d284b421a43e5f9cb94bc4ff88a88243f1f0133bad0fb1791f6569"),
    }
test_class.modifier: private static final
test_class.original_string: private static final MacTestVector[] HMAC_TEST_VECTORS = {
      new MacTestVector(
          "HMACSHA1",
          "816aa4c3ee066310ac1e6666cf830c375355c3c8ba18cfe1f50a48c988b46272",
          "220248f5e6d7a49335b3f91374f18bb8b0ff5e8b9a5853f3cfb293855d78301d837a0a2eb9e4f056f06c08361"
              + "bd07180ee802651e69726c28910d2baef379606815dcbab01d0dc7acb0ba8e65a2928130da0522f2b2b3d05260"
              + "885cf1c64f14ca3145313c685b0274bf6a1cb38e4f99895c6a8cc72fbe0e52c01766fede78a1a",
          "17cb2e9e98b748b5ae0f7078ea5519e5"),
      new MacTestVector(
          "HMACSHA256",
          "6f35628d65813435534b5d67fbdb54cb33403d04e843103e6399f806cb5df95febbdd61236f33245",
          "752cff52e4b90768558e5369e75d97c69643509a5e5904e0a386cbe4d0970ef73f918f675945a9aefe26daea27"
              + "587e8dc909dd56fd0468805f834039b345f855cfe19c44b55af241fff3ffcd8045cd5c288e6c4e284c3720570b"
              + "58e4d47b8feeedc52fd1401f698a209fccfa3b4c0d9a797b046a2759f82a54c41ccd7b5f592b",
          "05d1243e6465ed9620c9aec1c351a186"),
      new MacTestVector(
          "HMACSHA384",
          "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
          "4869205468657265",
          "afd03944d84895626b0825f4ab46907f15f9dadbe4101ec682aa034c7cebc59cfaea9ea9076ede7f4af152e8b2fa9cb6"),
      new MacTestVector(
          "HMACSHA512",
          "726374c4b8df517510db9159b730f93431e0cd468d4f3821eab0edb93abd0fba46ab4f1ef35d54fec3d85fa89e"
              + "f72ff3d35f22cf5ab69e205c10afcdf4aaf11338dbb12073474fddb556e60b8ee52f91163ba314303ee0c910e6"
              + "4e87fbf302214edbe3f2",
          "ac939659dc5f668c9969c0530422e3417a462c8b665e8db25a883a625f7aa59b89c5ad0ece5712ca17442d1798"
              + "c6dea25d82c5db260cb59c75ae650be56569c1bd2d612cc57e71315917f116bbfa65a0aeb8af7840ee83d3e710"
              + "1c52cf652d2773531b7a6bdd690b846a741816c860819270522a5b0cdfa1d736c501c583d916",
          "bd3d2df6f9d284b421a43e5f9cb94bc4ff88a88243f1f0133bad0fb1791f6569"),
    };
test_class.type: MacTestVector[]
test_class.var_name: HMAC_TEST_VECTORS
test_class.file: java_src/src/test/java/com/google/crypto/tink/subtle/PrfHmacJceTest.java
test_class.identifier: PrfHmacJceTest
test_case.body: @Test
    public void testPrfUniformity() throws GeneralSecurityException {
      for (MacTestVector t : HMAC_TEST_VECTORS) {
        Prf prf = new PrfHmacJce(t.algName, new SecretKeySpec(t.key, "HMAC"));
        // We need a string of bytes identical in size to the tag output size for the given algorithm
        // so we can test cross correlation. We're not actually validating the output contents of the
        // HMAC in this function. Therefore - just feed the test tag into the HMAC.
        byte[] prBytes = prf.compute(t.tag, t.tag.length);
        TestUtil.ztestUniformString(prBytes);
        TestUtil.ztestAutocorrelationUniformString(prBytes);
        TestUtil.ztestCrossCorrelationUniformStrings(prBytes, t.tag);
      }
    }
test_case.class_method_signature: PrfHmacJceTest.testPrfUniformity()
test_case.full_signature: @Test public void testPrfUniformity()
test_case.identifier: testPrfUniformity
test_case.invocations: compute ztestUniformString ztestAutocorrelationUniformString ztestCrossCorrelationUniformStrings
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPrfUniformity()
focal_class.declarator: MIN_KEY_SIZE_IN_BYTES = 16
focal_class.modifier: static final
focal_class.original_string: static final int MIN_KEY_SIZE_IN_BYTES = 16;
focal_class.type: int
focal_class.var_name: MIN_KEY_SIZE_IN_BYTES
focal_class.declarator: localMac =
        new ThreadLocal<Mac>() {
          @Override
          protected Mac initialValue() {
            try {
              Mac mac = EngineFactory.MAC.getInstance(algorithm);
              mac.init(key);
              return mac;
            } catch (GeneralSecurityException ex) {
              throw new IllegalStateException(ex);
            }
          }
        }
focal_class.modifier: @SuppressWarnings({"Immutable", "ThreadLocalUsage"})
    private final
focal_class.original_string: @SuppressWarnings({"Immutable", "ThreadLocalUsage"})
    private final ThreadLocal<Mac> localMac =
        new ThreadLocal<Mac>() {
          @Override
          protected Mac initialValue() {
            try {
              Mac mac = EngineFactory.MAC.getInstance(algorithm);
              mac.init(key);
              return mac;
            } catch (GeneralSecurityException ex) {
              throw new IllegalStateException(ex);
            }
          }
        };
focal_class.type: ThreadLocal<Mac>
focal_class.var_name: localMac
focal_class.declarator: algorithm
focal_class.modifier: private final
focal_class.original_string: private final String algorithm;
focal_class.type: String
focal_class.var_name: algorithm
focal_class.declarator: key
focal_class.modifier: @SuppressWarnings("Immutable")  // We do not mutate the key.
    private final
focal_class.original_string: @SuppressWarnings("Immutable")  // We do not mutate the key.
    private final java.security.Key key;
focal_class.type: java.security.Key
focal_class.var_name: key
focal_class.declarator: maxOutputLength
focal_class.modifier: private final
focal_class.original_string: private final int maxOutputLength;
focal_class.type: int
focal_class.var_name: maxOutputLength
focal_class.file: java_src/src/main/java/com/google/crypto/tink/subtle/PrfHmacJce.java
focal_class.identifier: PrfHmacJce
focal_class.interfaces: implements Prf
focal_class.class_method_signature: PrfHmacJce.PrfHmacJce(String algorithm, java.security.Key key)
focal_class.full_signature: public  PrfHmacJce(String algorithm, java.security.Key key)
focal_class.identifier: PrfHmacJce
focal_class.modifiers: public
focal_class.parameters: (String algorithm, java.security.Key key)
focal_class.signature:  PrfHmacJce(String algorithm, java.security.Key key)
focal_class.class_method_signature: PrfHmacJce.compute(byte[] data, int outputLength)
focal_class.full_signature: @Override public byte[] compute(byte[] data, int outputLength)
focal_class.identifier: compute
focal_class.modifiers: @Override public
focal_class.parameters: (byte[] data, int outputLength)
focal_class.return: byte[]
focal_class.signature: byte[] compute(byte[] data, int outputLength)
focal_class.class_method_signature: PrfHmacJce.getMaxOutputLength()
focal_class.full_signature: public int getMaxOutputLength()
focal_class.identifier: getMaxOutputLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxOutputLength()
focal_method.body: @Override
    public byte[] compute(byte[] data, int outputLength) throws GeneralSecurityException {
      if (outputLength > maxOutputLength) {
        throw new InvalidAlgorithmParameterException("tag size too big");
      }
  
      localMac.get().update(data);
      return Arrays.copyOf(localMac.get().doFinal(), outputLength);
    }
focal_method.class_method_signature: PrfHmacJce.compute(byte[] data, int outputLength)
focal_method.full_signature: @Override public byte[] compute(byte[] data, int outputLength)
focal_method.identifier: compute
focal_method.invocations: update get copyOf doFinal get
focal_method.modifiers: @Override public
focal_method.parameters: (byte[] data, int outputLength)
focal_method.return: byte[]
focal_method.signature: byte[] compute(byte[] data, int outputLength)