@Test public void testHmacMd5Hex() throws IOException { assertEquals("80070713463e7749b90c2dc24911e275", HmacUtils.hmacMd5Hex(STANDARD_KEY_STRING, "The quick brown fox jumps over the lazy dog")); assertEquals("750c783e6ab0b503eaa86e310a5db738", HmacUtils.hmacMd5Hex("Jefe", "what do ya want for nothing?")); assertEquals( "750c783e6ab0b503eaa86e310a5db738", HmacUtils.hmacMd5Hex("Jefe".getBytes(), new ByteArrayInputStream("what do ya want for nothing?".getBytes()))); }
public static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest) { return Hex.encodeHexString(hmacMd5(key, valueToDigest)); }
HmacUtils { public static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest) { return Hex.encodeHexString(hmacMd5(key, valueToDigest)); } }
HmacUtils { public static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest) { return Hex.encodeHexString(hmacMd5(key, valueToDigest)); }  }
HmacUtils { public static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest) { return Hex.encodeHexString(hmacMd5(key, valueToDigest)); }  static Mac getHmacMd5(final byte[] key); static Mac getHmacSha1(final byte[] key); static Mac getHmacSha256(final byte[] key); static Mac getHmacSha384(final byte[] key); static Mac getHmacSha512(final byte[] key); static Mac getInitializedMac(final HmacAlgorithms algorithm, final byte[] key); static Mac getInitializedMac(final String algorithm, final byte[] key); static byte[] hmacMd5(final byte[] key, final byte[] valueToDigest); static byte[] hmacMd5(final byte[] key, final InputStream valueToDigest); static byte[] hmacMd5(final String key, final String valueToDigest); static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest); static String hmacMd5Hex(final byte[] key, final InputStream valueToDigest); static String hmacMd5Hex(final String key, final String valueToDigest); static byte[] hmacSha1(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha1(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha1(final String key, final String valueToDigest); static String hmacSha1Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha1Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha1Hex(final String key, final String valueToDigest); static byte[] hmacSha256(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha256(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha256(final String key, final String valueToDigest); static String hmacSha256Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha256Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha256Hex(final String key, final String valueToDigest); static byte[] hmacSha384(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha384(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha384(final String key, final String valueToDigest); static String hmacSha384Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha384Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha384Hex(final String key, final String valueToDigest); static byte[] hmacSha512(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha512(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha512(final String key, final String valueToDigest); static String hmacSha512Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha512Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha512Hex(final String key, final String valueToDigest); static Mac updateHmac(final Mac mac, final byte[] valueToDigest); static Mac updateHmac(final Mac mac, final InputStream valueToDigest); static Mac updateHmac(final Mac mac, final String valueToDigest); }
HmacUtils { public static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest) { return Hex.encodeHexString(hmacMd5(key, valueToDigest)); }  static Mac getHmacMd5(final byte[] key); static Mac getHmacSha1(final byte[] key); static Mac getHmacSha256(final byte[] key); static Mac getHmacSha384(final byte[] key); static Mac getHmacSha512(final byte[] key); static Mac getInitializedMac(final HmacAlgorithms algorithm, final byte[] key); static Mac getInitializedMac(final String algorithm, final byte[] key); static byte[] hmacMd5(final byte[] key, final byte[] valueToDigest); static byte[] hmacMd5(final byte[] key, final InputStream valueToDigest); static byte[] hmacMd5(final String key, final String valueToDigest); static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest); static String hmacMd5Hex(final byte[] key, final InputStream valueToDigest); static String hmacMd5Hex(final String key, final String valueToDigest); static byte[] hmacSha1(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha1(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha1(final String key, final String valueToDigest); static String hmacSha1Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha1Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha1Hex(final String key, final String valueToDigest); static byte[] hmacSha256(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha256(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha256(final String key, final String valueToDigest); static String hmacSha256Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha256Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha256Hex(final String key, final String valueToDigest); static byte[] hmacSha384(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha384(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha384(final String key, final String valueToDigest); static String hmacSha384Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha384Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha384Hex(final String key, final String valueToDigest); static byte[] hmacSha512(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha512(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha512(final String key, final String valueToDigest); static String hmacSha512Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha512Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha512Hex(final String key, final String valueToDigest); static Mac updateHmac(final Mac mac, final byte[] valueToDigest); static Mac updateHmac(final Mac mac, final InputStream valueToDigest); static Mac updateHmac(final Mac mac, final String valueToDigest);  }