jsdsi.util
Class DigestAlgoEnum

java.lang.Object
  extended byjsdsi.util.AlgorithmEnum
      extended byjsdsi.util.DigestAlgoEnum
All Implemented Interfaces:
java.io.Serializable

public class DigestAlgoEnum
extends AlgorithmEnum

Experimental class and as such may be removed without warning.

Enum class for MessageDigest algorythms.

Version:
$Revision: 1.2 $ $Date: 2004/11/08 12:08:08 $
Author:
Sean Radford
See Also:
Serialized Form

Field Summary
static DigestAlgoEnum MD2
          The MD2 message digest algorithm as defined in RFC 1319.
static DigestAlgoEnum MD5
          The MD5 message digest algorithm as defined in RFC 1321.
static DigestAlgoEnum SHA1
          The Secure Hash Algorithm, as defined in Secure Hash Standard, NIST FIPS 180-1.
static DigestAlgoEnum SHA256
          256-bit hash function intended to provide 128 bits of security against collision attacks.
static DigestAlgoEnum SHA384
          384 byte SHA
static DigestAlgoEnum SHA512
          512-bit hash function intended to provide 256 bits of security.
 
Constructor Summary
protected DigestAlgoEnum(java.lang.String jdkName, java.lang.String spkiName)
           
protected DigestAlgoEnum(java.lang.String jdkName, java.lang.String spkiName, java.lang.String jdkSigName)
           
 
Method Summary
static DigestAlgoEnum fromJdk(java.lang.String jdkName)
          Given a JDK name for a MessageDigest algorythm, return its DigestAlgoEnum
static DigestAlgoEnum fromJdkSignature(java.lang.String jdkName)
          Given a name for a MessageDigest algorythm from a JDK Signature, return its DigestAlgoEnum
static DigestAlgoEnum fromSpki(java.lang.String spkiName)
          Given a SPKI name for a MessageDigest algorythm, return its DigestAlgoEnum
 java.lang.String jdkSignatureName()
          Returns the name of this digest when part of a JDK Signature algorythm
 
Methods inherited from class jsdsi.util.AlgorithmEnum
equals, hashCode, jdkName, spkiName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MD2

public static final DigestAlgoEnum MD2
The MD2 message digest algorithm as defined in RFC 1319.


MD5

public static final DigestAlgoEnum MD5
The MD5 message digest algorithm as defined in RFC 1321.


SHA1

public static final DigestAlgoEnum SHA1
The Secure Hash Algorithm, as defined in Secure Hash Standard, NIST FIPS 180-1.


SHA256

public static final DigestAlgoEnum SHA256
256-bit hash function intended to provide 128 bits of security against collision attacks.


SHA384

public static final DigestAlgoEnum SHA384
384 byte SHA


SHA512

public static final DigestAlgoEnum SHA512
512-bit hash function intended to provide 256 bits of security.

Constructor Detail

DigestAlgoEnum

protected DigestAlgoEnum(java.lang.String jdkName,
                         java.lang.String spkiName)
Parameters:
jdkName -
spkiName -

DigestAlgoEnum

protected DigestAlgoEnum(java.lang.String jdkName,
                         java.lang.String spkiName,
                         java.lang.String jdkSigName)
Parameters:
jdkName -
spkiName -
Method Detail

fromJdk

public static DigestAlgoEnum fromJdk(java.lang.String jdkName)
Given a JDK name for a MessageDigest algorythm, return its DigestAlgoEnum

Parameters:
jdkName - JDK name
Returns:
the DigestAlgoEnum

fromJdkSignature

public static DigestAlgoEnum fromJdkSignature(java.lang.String jdkName)
Given a name for a MessageDigest algorythm from a JDK Signature, return its DigestAlgoEnum

Parameters:
jdkName - JDK name
Returns:
the DigestAlgoEnum
Throws:
JsdsiRuntimeException - on error

fromSpki

public static DigestAlgoEnum fromSpki(java.lang.String spkiName)
Given a SPKI name for a MessageDigest algorythm, return its DigestAlgoEnum

Parameters:
spkiName - SPKI name
Returns:
the DigestAlgoEnum
Throws:
JsdsiRuntimeException - on error

jdkSignatureName

public java.lang.String jdkSignatureName()
Returns the name of this digest when part of a JDK Signature algorythm

Returns:
the name


Copyright © 2002-2006 JSDSI. All Rights Reserved.