Enum MacAlgorithm

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      HmacMD5
      The enum constant for HmacMD5 algorithm.
      HmacSHA1
      The enum constant for HmacSHA1 algorithm.
      HmacSHA224
      The enum constant for HmacSHA224 algorithm.
      HmacSHA256
      The enum constant for HmacSHA256 algorithm.
      HmacSHA384
      The enum constant for HmacSHA384 algorithm.
      HmacSHA512
      The enum constant for HmacSHA512 algorithm.
      PBEWithHmacMD5
      The enum constant for PBEWithHmacMD5 algorithm.
      PBEWithHmacSHA1
      The enum constant for PBEWithHmacSHA1 algorithm.
      PBEWithHmacSHA224
      The enum constant for PBEWithHmacSHA224 algorithm.
      PBEWithHmacSHA256
      The enum constant for PBEWithHmacSHA256 algorithm.
      PBEWithHmacSHA384
      The enum constant for PBEWithHmacSHA384 algorithm.
      PBEWithHmacSHA512
      The enum constant for PBEWithHmacSHA512 algorithm.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HMAC
      The Constant HMAC.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()
      Gets the algorithm for encryption or decryption.
      static MacAlgorithm valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MacAlgorithm[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • HmacMD5

        public static final MacAlgorithm HmacMD5
        The enum constant for HmacMD5 algorithm.
      • HmacSHA1

        public static final MacAlgorithm HmacSHA1
        The enum constant for HmacSHA1 algorithm.
      • HmacSHA224

        public static final MacAlgorithm HmacSHA224
        The enum constant for HmacSHA224 algorithm.
      • HmacSHA256

        public static final MacAlgorithm HmacSHA256
        The enum constant for HmacSHA256 algorithm.
      • HmacSHA384

        public static final MacAlgorithm HmacSHA384
        The enum constant for HmacSHA384 algorithm.
      • HmacSHA512

        public static final MacAlgorithm HmacSHA512
        The enum constant for HmacSHA512 algorithm.
      • PBEWithHmacMD5

        public static final MacAlgorithm PBEWithHmacMD5
        The enum constant for PBEWithHmacMD5 algorithm.
      • PBEWithHmacSHA1

        public static final MacAlgorithm PBEWithHmacSHA1
        The enum constant for PBEWithHmacSHA1 algorithm.
      • PBEWithHmacSHA224

        public static final MacAlgorithm PBEWithHmacSHA224
        The enum constant for PBEWithHmacSHA224 algorithm.
      • PBEWithHmacSHA256

        public static final MacAlgorithm PBEWithHmacSHA256
        The enum constant for PBEWithHmacSHA256 algorithm.
      • PBEWithHmacSHA384

        public static final MacAlgorithm PBEWithHmacSHA384
        The enum constant for PBEWithHmacSHA384 algorithm.
      • PBEWithHmacSHA512

        public static final MacAlgorithm PBEWithHmacSHA512
        The enum constant for PBEWithHmacSHA512 algorithm.
    • Method Detail

      • values

        public static MacAlgorithm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MacAlgorithm c : MacAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MacAlgorithm valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Gets the algorithm for encryption or decryption.
        Specified by:
        getAlgorithm in interface Algorithm
        Returns:
        the algorithm