org.nhindirect.stagent.cryptography
Enum DigestAlgorithm
java.lang.Object
java.lang.Enum<DigestAlgorithm>
org.nhindirect.stagent.cryptography.DigestAlgorithm
- All Implemented Interfaces:
- Serializable, Comparable<DigestAlgorithm>
public enum DigestAlgorithm
- extends Enum<DigestAlgorithm>
Enumeration of supported digest algorithms for message signatures.
- Author:
- Greg Meyer, Umesh Madan
SHA1
public static final DigestAlgorithm SHA1
SHA256
public static final DigestAlgorithm SHA256
SHA384
public static final DigestAlgorithm SHA384
SHA512
public static final DigestAlgorithm SHA512
values
public static DigestAlgorithm[] 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 (DigestAlgorithm c : DigestAlgorithm.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static DigestAlgorithm valueOf(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:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
fromString
public static DigestAlgorithm fromString(String algorithmName,
DigestAlgorithm defaultAlgorithm)
- Gets the digest algorithm from an algorithm name
- Parameters:
algorithmNam - The digest algorithm namedefaultAlgorithm - The default algorithm to return is a corresponding name cannot be found
- Returns:
- A digest algorithm enumeration object corresponding the name
Copyright © 2010-2013 NHIN Direct. All Rights Reserved.