public enum DigestAlgorithm extends Enum<DigestAlgorithm>
| Enum Constant and Description |
|---|
MD5
MD5 digest algorithm.
|
SHA1
SHA-1 digest algorithm.
|
SHA224
SHA-224 digest algorithm.
|
SHA256
SHA-256 digest algorithm.
|
SHA384
SHA-384 digest algorithm.
|
SHA512
SHA-512 digest algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
static DigestAlgorithm |
fromAsn1Id(String asn1)
Factory method: returns the Digest object corresponding to the given
algorithm id (in ASN.1 format).
|
static DigestAlgorithm |
fromBouncyCastleCode(String algorithmCode)
Factory method: returns the Digest object corresponding to the given
BouncyCastle algorithm id (e.g.
|
static DigestAlgorithm |
fromDescription(String description)
Factory method: returns the Digest object corresponding to the given text
description.
|
String |
getAsn1Id()
Returns the numeric (in text form) id of the digest algorithm.
|
String |
getBouncyCastleCode()
Returns the BouncyCastle code for the given algorithm.
|
String |
getDescription()
Returns the text description of the digest algorithm.
|
String |
toString()
Formats the object as a string.
|
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.
|
public static final DigestAlgorithm SHA1
public static final DigestAlgorithm SHA224
public static final DigestAlgorithm SHA256
public static final DigestAlgorithm SHA384
public static final DigestAlgorithm SHA512
public static final DigestAlgorithm MD5
public static DigestAlgorithm[] values()
for (DigestAlgorithm c : DigestAlgorithm.values()) System.out.println(c);
public static DigestAlgorithm valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic static DigestAlgorithm fromDescription(String description)
description - the algorithm description, e.g. "sha-1".public static DigestAlgorithm fromAsn1Id(String asn1)
asn1 - the algorithm ASN.1 code, e.g. "1.3.26.1.13".public static DigestAlgorithm fromBouncyCastleCode(String algorithmCode)
algorithmCode - the BouncyCastle algorithm code, e.g. "MD5".public String getDescription()
public String getBouncyCastleCode()
public String getAsn1Id()
public String toString()
toString in class Enum<DigestAlgorithm>Copyright © 2012-2014 Andrea Funtò. See here for terms and conditions.