public enum DigestAlgorithm extends Enum<DigestAlgorithm>
| Enum Constant and Description |
|---|
MD2 |
MD5 |
RIPEMD160 |
SHA1 |
SHA224 |
SHA256 |
SHA384 |
SHA512 |
| Modifier and Type | Method and Description |
|---|---|
static DigestAlgorithm |
forName(String name)
Returns the digest algorithm associated to the given JCE name.
|
static DigestAlgorithm |
forName(String name,
DigestAlgorithm defaultValue)
Returns the digest algorithm associated to the given JCE name.
|
static DigestAlgorithm |
forOID(String oid)
Returns the digest algorithm associated to the given OID.
|
static DigestAlgorithm |
forXML(String xmlName)
Returns the digest algorithm associated to the given XML url.
|
static DigestAlgorithm |
forXML(String xmlName,
DigestAlgorithm defaultValue)
Returns the digest algorithm associated to the given XML url or the default one if the algorithm does not exist.
|
String |
getJavaName()
Get the JCE algorithm name
|
String |
getName()
Get the algorithm name
|
String |
getOid()
Get the algorithm OID
|
String |
getXmlId()
Get the algorithm uri
|
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 RIPEMD160
public static final DigestAlgorithm MD2
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 forName(String name) throws DSSException
name - the algorithm nameDSSException - if the given name doesn't match any algorithmpublic static DigestAlgorithm forName(String name, DigestAlgorithm defaultValue)
name - the algorithm namedefaultValue - The default value for the DigestAlgorithmDigestAlgorithm or the default valuepublic static DigestAlgorithm forOID(String oid) throws DSSException
oid - the algorithm oidDSSException - if the oid doesn't match any digest algorithmpublic static DigestAlgorithm forXML(String xmlName) throws DSSException
xmlName - the algorithm uriDSSException - if the uri doesn't match any digest algorithmpublic static DigestAlgorithm forXML(String xmlName, DigestAlgorithm defaultValue)
xmlName - The XML representation of the digest algorithmdefaultValue - The default value for the DigestAlgorithmDigestAlgorithm or the default valuepublic String getName()
public String getJavaName()
public String getOid()
public String getXmlId()
Copyright © 2018. All rights reserved.