org.nhindirect.stagent.cryptography
Enum DigestAlgorithm

java.lang.Object
  extended by java.lang.Enum<DigestAlgorithm>
      extended by 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

Enum Constant Summary
SHA1
           
SHA256
           
SHA384
           
SHA512
           
 
Method Summary
static DigestAlgorithm fromString(String algorithmName, DigestAlgorithm defaultAlgorithm)
          Gets the digest algorithm from an algorithm name
static DigestAlgorithm valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DigestAlgorithm[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SHA1

public static final DigestAlgorithm SHA1

SHA256

public static final DigestAlgorithm SHA256

SHA384

public static final DigestAlgorithm SHA384

SHA512

public static final DigestAlgorithm SHA512
Method Detail

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 name
defaultAlgorithm - The default algorithm to return is a corresponding name cannot be found
Returns:
A digest algorithm enumeration object corresponding the name


Copyright © 2010-2015 NHIN Direct. All Rights Reserved.