- All Implemented Interfaces:
Algorithm
,Serializable
,Comparable<MacAlgorithm>
,Constable
The enum
MacAlgorithm
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-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe enum constant for HmacSHA224 algorithm.The enum constant for HmacSHA256 algorithm.The enum constant for HmacSHA384 algorithm.The enum constant for HmacSHA512 algorithm.The enum constant for HmacSHA512 algorithm.The enum constant for HmacSHA512 algorithm.The enum constant for HmacMD5 algorithm.The enum constant for HmacSHA1 algorithm.The enum constant for HmacSHA224 algorithm.The enum constant for HmacSHA256 algorithm.The enum constant for HmacSHA384 algorithm.The enum constant for HmacSHA512 algorithm.The enum constant for PBEWithHmacMD5 algorithm.The enum constant for PBEWithHmacSHA1 algorithm.The enum constant for PBEWithHmacSHA224 algorithm.The enum constant for PBEWithHmacSHA256 algorithm.The enum constant for PBEWithHmacSHA384 algorithm.The enum constant for PBEWithHmacSHA512 algorithm.The enum constant 'UNKNOWN' if the mac algorithm is unknown -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The string constant H_MAC_MD5_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA1_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA224_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA256_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA3_224_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA3_256_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA3_384_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA3_512_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA384_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA512_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA512_ALGORITHM_NAMEstatic final String
The string constant H_MAC_SHA512_ALGORITHM_NAMEstatic final String
The Constant HMAC.static final String
The string constant PBE_WITH_HMAC_MD5_ALGORITHM_NAMEstatic final String
The string constant PBE_WITH_HMAC_SHA1_ALGORITHM_NAMEstatic final String
The string constant PBE_WITH_HMAC_SHA224_ALGORITHM_NAMEstatic final String
The string constant PBE_WITH_HMAC_SHA256_ALGORITHM_NAMEstatic final String
The string constant PBE_WITH_HMAC_SHA384_ALGORITHM_NAMEstatic final String
The string constant PBE_WITH_HMAC_SHA512_ALGORITHM_NAMEFields inherited from interface io.github.astrapi69.crypt.api.algorithm.Algorithm
UNKNOWN_ALGORITHM_NAME
-
Method Summary
Modifier and TypeMethodDescriptionGets the algorithm for encryption or decryptionstatic MacAlgorithm
Returns the enum constant of this class with the specified name.static MacAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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. -
H_MAC_SHA512_224
The enum constant for HmacSHA512 algorithm. -
H_MAC_SHA512_256
The enum constant for HmacSHA512 algorithm. -
H_MAC_SHA3_224
The enum constant for HmacSHA224 algorithm. -
H_MAC_SHA3_256
The enum constant for HmacSHA256 algorithm. -
H_MAC_SHA3_384
The enum constant for HmacSHA384 algorithm. -
H_MAC_SHA3_512
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. -
UNKNOWN
The enum constant 'UNKNOWN' if the mac algorithm is unknown
-
-
Field Details
-
HMAC
The Constant HMAC.- See Also:
-
PBE_WITH_HMAC_MD5_ALGORITHM_NAME
The string constant PBE_WITH_HMAC_MD5_ALGORITHM_NAME- See Also:
-
PBE_WITH_HMAC_SHA1_ALGORITHM_NAME
The string constant PBE_WITH_HMAC_SHA1_ALGORITHM_NAME- See Also:
-
PBE_WITH_HMAC_SHA224_ALGORITHM_NAME
The string constant PBE_WITH_HMAC_SHA224_ALGORITHM_NAME- See Also:
-
PBE_WITH_HMAC_SHA256_ALGORITHM_NAME
The string constant PBE_WITH_HMAC_SHA256_ALGORITHM_NAME- See Also:
-
PBE_WITH_HMAC_SHA384_ALGORITHM_NAME
The string constant PBE_WITH_HMAC_SHA384_ALGORITHM_NAME- See Also:
-
PBE_WITH_HMAC_SHA512_ALGORITHM_NAME
The string constant PBE_WITH_HMAC_SHA512_ALGORITHM_NAME- See Also:
-
H_MAC_MD5_ALGORITHM_NAME
The string constant H_MAC_MD5_ALGORITHM_NAME- See Also:
-
H_MAC_SHA1_ALGORITHM_NAME
The string constant H_MAC_SHA1_ALGORITHM_NAME- See Also:
-
H_MAC_SHA224_ALGORITHM_NAME
The string constant H_MAC_SHA224_ALGORITHM_NAME- See Also:
-
H_MAC_SHA256_ALGORITHM_NAME
The string constant H_MAC_SHA256_ALGORITHM_NAME- See Also:
-
H_MAC_SHA384_ALGORITHM_NAME
The string constant H_MAC_SHA384_ALGORITHM_NAME- See Also:
-
H_MAC_SHA512_ALGORITHM_NAME
The string constant H_MAC_SHA512_ALGORITHM_NAME- See Also:
-
H_MAC_SHA512_224_ALGORITHM_NAME
The string constant H_MAC_SHA512_ALGORITHM_NAME- See Also:
-
H_MAC_SHA512_256_ALGORITHM_NAME
The string constant H_MAC_SHA512_ALGORITHM_NAME- See Also:
-
H_MAC_SHA3_224_ALGORITHM_NAME
The string constant H_MAC_SHA3_224_ALGORITHM_NAME- See Also:
-
H_MAC_SHA3_256_ALGORITHM_NAME
The string constant H_MAC_SHA3_256_ALGORITHM_NAME- See Also:
-
H_MAC_SHA3_384_ALGORITHM_NAME
The string constant H_MAC_SHA3_384_ALGORITHM_NAME- See Also:
-
H_MAC_SHA3_512_ALGORITHM_NAME
The string constant H_MAC_SHA3_512_ALGORITHM_NAME- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getAlgorithm
Gets the algorithm for encryption or decryption- Specified by:
getAlgorithm
in interfaceAlgorithm
- Returns:
- the algorithm
-