Enum KeyMasterHashingAlgorithm
- java.lang.Object
-
- java.lang.Enum<KeyMasterHashingAlgorithm>
-
- com.caplin.keymaster.KeyMasterHashingAlgorithm
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<KeyMasterHashingAlgorithm>
public enum KeyMasterHashingAlgorithm extends java.lang.Enum<KeyMasterHashingAlgorithm>
Defines the hashing algorithms that can be used by KeyMaster when signing tokens.The type of hashing algorithm used by KeyMaster must also be defined in the Liberator (see the signing-algorithm option of the add-sigkey configuration item in the Caplin Liberator Administration Guide). The Liberator uses this algorithm when determining whether a received token is valid. See also Digital signature algorithm in the Caplin KeyMaster Overview.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MD5
Defines the MD5 hash algorithm.RIPEMD160
Defines the RipeMD160 hash algorithm.SHA1
Defines the SHA1 hash algorithm.SHA256
Defines the SHA256 hash algorithm.SHA384
Defines the SHA384 hash algorithm.SHA512
Specifies the use of the SHA512 hash algorithm.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlgorithmName()
static KeyMasterHashingAlgorithm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static KeyMasterHashingAlgorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MD5
public static final KeyMasterHashingAlgorithm MD5
Defines the MD5 hash algorithm.Note: MD5 can produce hash collisions.
-
SHA256
public static final KeyMasterHashingAlgorithm SHA256
Defines the SHA256 hash algorithm.This hashing algorithm is only supported by Liberator release 4.5.7 and above.
-
SHA384
public static final KeyMasterHashingAlgorithm SHA384
Defines the SHA384 hash algorithm.This hashing algorithm is only supported by Liberator release 4.5.13 and above.
-
SHA512
public static final KeyMasterHashingAlgorithm SHA512
Specifies the use of the SHA512 hash algorithm.This hashing algorithm is only supported by Liberator release 4.5.13 and above.
-
RIPEMD160
public static final KeyMasterHashingAlgorithm RIPEMD160
Defines the RipeMD160 hash algorithm.This hashing algorithm is only supported by Liberator release 4.5.13 and above.
-
SHA1
public static final KeyMasterHashingAlgorithm SHA1
Defines the SHA1 hash algorithm.This hashing algorithm is only supported by Liberator release 4.5.13 and above.
-
-
Method Detail
-
values
public static KeyMasterHashingAlgorithm[] 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 (KeyMasterHashingAlgorithm c : KeyMasterHashingAlgorithm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyMasterHashingAlgorithm 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
-
getAlgorithmName
public java.lang.String getAlgorithmName()
-
-