java.lang.Object
java.lang.Enum<MessageDigestAlgorithm>
io.github.astrapi69.crypt.api.algorithm.MessageDigestAlgorithm
- All Implemented Interfaces:
Algorithm
,Serializable
,Comparable<MessageDigestAlgorithm>
,Constable
The enum
MessageDigestAlgorithm
provides all the algorithm names that can be specified
when generating an instance of MessageDigest
. For more info see:
https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#messagedigest-algorithms-
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 MD2 algorithmThe enum constant for MD5 algorithmThe enum constant for SHA-1 algorithmThe enum constant for SHA-256 algorithmThe enum constant for SHA-384 algorithmThe enum constant for SHA-512/224 algorithmThe enum constant for SHA-512/256 algorithmThe enum constant for SHA3-224 algorithmThe enum constant for SHA3-256 algorithmThe enum constant for SHA3-384 algorithmThe enum constant for SHA3-512 algorithmThe enum constant 'UNKNOWN' if the MessageDigest algorithm is unknown -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The string constant SHA3_224_ALGORITHM_NAMEstatic final String
The string constant SHA3_256_ALGORITHM_NAMEstatic final String
The string constant SHA3_384_ALGORITHM_NAMEstatic final String
The string constant SHA3_512_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 MessageDigestAlgorithm
Returns the enum constant of this class with the specified name.static MessageDigestAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MD2
The enum constant for MD2 algorithm -
MD5
The enum constant for MD5 algorithm -
SHA_1
The enum constant for SHA-1 algorithm -
SHA_256
The enum constant for SHA-256 algorithm -
SHA_384
The enum constant for SHA-384 algorithm -
SHA_512_224
The enum constant for SHA-512/224 algorithm -
SHA_512_256
The enum constant for SHA-512/256 algorithm -
SHA3_224
The enum constant for SHA3-224 algorithm -
SHA3_256
The enum constant for SHA3-256 algorithm -
SHA3_384
The enum constant for SHA3-384 algorithm -
SHA3_512
The enum constant for SHA3-512 algorithm -
UNKNOWN
The enum constant 'UNKNOWN' if the MessageDigest algorithm is unknown
-
-
Field Details
-
SHA3_224_ALGORITHM_NAME
The string constant SHA3_224_ALGORITHM_NAME- See Also:
-
SHA3_256_ALGORITHM_NAME
The string constant SHA3_256_ALGORITHM_NAME- See Also:
-
SHA3_384_ALGORITHM_NAME
The string constant SHA3_384_ALGORITHM_NAME- See Also:
-
SHA3_512_ALGORITHM_NAME
The string constant 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
-