Class HmacUtils


  • public class HmacUtils
    extends java.lang.Object
    HmacUtils.
    • Constructor Summary

      Constructors 
      Constructor Description
      HmacUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String hmacMd5Hex​(java.lang.String key, java.lang.String valueToDigest)
      Returns a HmacMd5 Message Authentication Code (MAC) as hex string (lowercase).
      static java.lang.String hmacSha256Hex​(java.lang.String key, java.lang.String valueToDigest)
      Returns a HmacSha256 Message Authentication Code (MAC) as hex string (lowercase).
      static java.lang.String hmacSha512Hex​(java.lang.String key, java.lang.String valueToDigest)
      Returns a HmacSha512 Message Authentication Code (MAC) as hex string (lowercase).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HmacUtils

        public HmacUtils()
    • Method Detail

      • hmacMd5Hex

        public static java.lang.String hmacMd5Hex​(java.lang.String key,
                                                  java.lang.String valueToDigest)
        Returns a HmacMd5 Message Authentication Code (MAC) as hex string (lowercase).
        Parameters:
        key - The key
        valueToDigest - The value to use to digest
        Returns:
        Message Authentication Code
      • hmacSha256Hex

        public static java.lang.String hmacSha256Hex​(java.lang.String key,
                                                     java.lang.String valueToDigest)
        Returns a HmacSha256 Message Authentication Code (MAC) as hex string (lowercase).
        Parameters:
        key - The key
        valueToDigest - The value to use to digest
        Returns:
        Message Authentication Code
      • hmacSha512Hex

        public static java.lang.String hmacSha512Hex​(java.lang.String key,
                                                     java.lang.String valueToDigest)
        Returns a HmacSha512 Message Authentication Code (MAC) as hex string (lowercase).
        Parameters:
        key - The key
        valueToDigest - The value to use to digest
        Returns:
        Message Authentication Code