Package net.solarnetwork.web.security
Enum Class DigestAlgorithm
- All Implemented Interfaces:
Serializable,Comparable<DigestAlgorithm>,Constable
Supported algorithms for the HTTP
Digest header.- Since:
- 1.11
- Version:
- 1.1
- Author:
- matt
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic DigestAlgorithmforAlgorithmName(String name) Get aDigestAlgorithmfor a given algorithm name.Get the header algorithm name associated with the digest.static DigestAlgorithmReturns the enum constant of this class with the specified name.static DigestAlgorithm[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MD5
The MD5 algorithm. -
SHA1
The SHA1 algorithm. -
SHA256
The SHA-256 algorithm. -
SHA512
The SHA-512 algorithm.- Since:
- 1.1
-
-
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
-
getAlgorithmName
Get the header algorithm name associated with the digest.- Returns:
- The name.
-
forAlgorithmName
Get aDigestAlgorithmfor a given algorithm name.- Parameters:
name- The name to get the instance for.- Returns:
- The instance.
- Throws:
IllegalArgumentException- if the name is not supported
-