- java.lang.Object
-
- java.lang.Enum<HashAlgorithm>
-
- io.github.astrapi69.crypto.algorithm.HashAlgorithm
-
- All Implemented Interfaces:
Algorithm
,java.io.Serializable
,java.lang.Comparable<HashAlgorithm>
public enum HashAlgorithm extends java.lang.Enum<HashAlgorithm> implements Algorithm
The enumHashAlgorithm
represents the one-way conversion hash algorithms
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SHA_1
The enum constant for SHA-1 algorithm.SHA_224
The enum constant for SHA-224 algorithm.SHA_256
The enum constant for SHA-256 algorithm.SHA_384
The enum constant for SHA-384 algorithm.SHA_512
The enum constant for SHA-512 algorithm.SHA1
The enum constant for SHA1 algorithm.SHA224
The enum constant for SHA224 algorithm.SHA256
The enum constant for SHA256 algorithm.SHA384
The enum constant for SHA384 algorithm.SHA512
The enum constant for SHA512 algorithm.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SHA
The string constant SHA that is use as prefix
-
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 HashAlgorithm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HashAlgorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SHA_1
public static final HashAlgorithm SHA_1
The enum constant for SHA-1 algorithm.
-
SHA_224
public static final HashAlgorithm SHA_224
The enum constant for SHA-224 algorithm.
-
SHA_256
public static final HashAlgorithm SHA_256
The enum constant for SHA-256 algorithm.
-
SHA_384
public static final HashAlgorithm SHA_384
The enum constant for SHA-384 algorithm.
-
SHA_512
public static final HashAlgorithm SHA_512
The enum constant for SHA-512 algorithm.
-
SHA1
public static final HashAlgorithm SHA1
The enum constant for SHA1 algorithm.
-
SHA224
public static final HashAlgorithm SHA224
The enum constant for SHA224 algorithm.
-
SHA256
public static final HashAlgorithm SHA256
The enum constant for SHA256 algorithm.
-
SHA384
public static final HashAlgorithm SHA384
The enum constant for SHA384 algorithm.
-
SHA512
public static final HashAlgorithm SHA512
The enum constant for SHA512 algorithm.
-
-
Field Detail
-
SHA
public static final java.lang.String SHA
The string constant SHA that is use as prefix- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static HashAlgorithm[] 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 (HashAlgorithm c : HashAlgorithm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HashAlgorithm 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()
Description copied from interface:Algorithm
Gets the algorithm for encryption or decryption.- Specified by:
getAlgorithm
in interfaceAlgorithm
- Returns:
- the algorithm
-
-