Package net.glowstone.util.library
Enum Class LibraryManager.HashAlgorithm
java.lang.Object
java.lang.Enum<LibraryManager.HashAlgorithm>
net.glowstone.util.library.LibraryManager.HashAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<LibraryManager.HashAlgorithm>
,Constable
- Enclosing class:
- LibraryManager
An enum containing the supported hash algorithms.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LibraryManager.HashAlgorithm
getAlgorithm
(String name) Gets the hash algorithm corresponding to the given name.com.google.common.hash.HashFunction
The hash function for this algorithm.getName()
The name of the algorithm, used in configuration files.static LibraryManager.HashAlgorithm
Returns the enum constant of this class with the specified name.static LibraryManager.HashAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHA1
The SHA-1 hash algorithm. -
MD5
The MD5 hash algorithm.
-
-
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 hash algorithm corresponding to the given name.- Parameters:
name
- the name of the algorithm- Returns:
- the corresponding algorithm, or null if none exists
-
getFunction
public com.google.common.hash.HashFunction getFunction()The hash function for this algorithm. -
getName
The name of the algorithm, used in configuration files.
-