- java.lang.Object
-
- java.lang.Enum<MacAlgorithm>
-
- io.github.astrapi69.crypto.algorithm.MacAlgorithm
-
- All Implemented Interfaces:
Algorithm
,java.io.Serializable
,java.lang.Comparable<MacAlgorithm>
public enum MacAlgorithm extends java.lang.Enum<MacAlgorithm> implements Algorithm
The enumMacAlgorithm
contains the algorithm names that can be specified when requesting an instance of Mac. For more info see: https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#Mac
-
-
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.
-
-
-
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.
-
-
Field Detail
-
HMAC
public static final java.lang.String HMAC
The Constant HMAC.- See Also:
- Constant Field Values
-
-
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 namejava.lang.NullPointerException
- if the argument is null
-
getAlgorithm
public java.lang.String getAlgorithm()
Gets the algorithm for encryption or decryption.- Specified by:
getAlgorithm
in interfaceAlgorithm
- Returns:
- the algorithm
-
-