public enum SignatureAlgorithm extends Enum<SignatureAlgorithm>
| Enum Constant and Description |
|---|
MD5_WITH_RSA
The MD5 with RSA digital signature algorithm.
|
SHA1_WITH_RSA
The SHA1 with RSA digital signature algorithm.
|
SHA224_WITH_RSA
The SHA224 with RSA digital signature algorithm.
|
SHA256_WITH_RSA
The SHA256 with RSA digital signature algorithm (default).
|
SHA384_WITH_RSA
The SHA384 with RSA digital signature algorithm.
|
SHA512_WITH_RSA
The SHA512 with RSA digital signature algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
static SignatureAlgorithm |
fromAlgorithmAsn1Ids(String digestAlgorithm,
String encryptionAlgorithm)
Factory method, returns the enumeration value corresponding to the two
given algorithm descriptions.
|
static SignatureAlgorithm |
fromAlgorithmDescriptions(String digestAlgorithm,
String encryptionAlgorithm)
Factory method, returns the enumeration value corresponding to the two
given algorithm descriptions.
|
static SignatureAlgorithm |
fromBouncyCastleCode(String bcCode)
Attempts to translate the BouncyCastle code of a signature algorithm (in
the "SHA1withRSA" format into an enumeration value.
|
static SignatureAlgorithm |
fromBouncyCastleCodes(String digestAlgorithm,
String encryptionAlgorithm)
Factory method, returns the enumeration value corresponding to the two
given algorithm descriptions.
|
DigestAlgorithm |
getDigestAlgorithm()
Returns the algorithm used to hash the data.
|
EncryptionAlgorithm |
getEncryptionAlgorithm()
Returns the algorithm used to encrypt the hashed data.
|
String |
toBouncyCastleCode()
Provides a string representation of the signature algorithm in the format
used by BouncyCastle to identify it, e.g.
|
String |
toString()
Returns the algorithm string representation, such as "SHA256withRSA".
|
static SignatureAlgorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SignatureAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SignatureAlgorithm MD5_WITH_RSA
public static final SignatureAlgorithm SHA1_WITH_RSA
public static final SignatureAlgorithm SHA224_WITH_RSA
public static final SignatureAlgorithm SHA256_WITH_RSA
public static final SignatureAlgorithm SHA384_WITH_RSA
public static final SignatureAlgorithm SHA512_WITH_RSA
public static SignatureAlgorithm[] values()
for (SignatureAlgorithm c : SignatureAlgorithm.values()) System.out.println(c);
public static SignatureAlgorithm 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 SignatureAlgorithm fromBouncyCastleCode(String bcCode)
bcCode - the BouncyCastle code for the signature algorithm.public static SignatureAlgorithm fromAlgorithmDescriptions(String digestAlgorithm, String encryptionAlgorithm)
digestAlgorithm - the description of the algorithm used to calculate the data checksum (hash),
e.g. "sha-1".encryptionAlgorithm - the description of the algorithm used to encrypt the hash in the signature,
e.g. "rsa".public static SignatureAlgorithm fromAlgorithmAsn1Ids(String digestAlgorithm, String encryptionAlgorithm)
digestAlgorithm - the ASN.1 code of the algorithm used to calculate the data checksum (hash),
e.g. "sha-1".encryptionAlgorithm - the ASN.1 code of the algorithm used to encrypt the hash in the signature,
e.g. "rsa".public static SignatureAlgorithm fromBouncyCastleCodes(String digestAlgorithm, String encryptionAlgorithm)
digestAlgorithm - the BouncyCastle code of the algorithm used to calculate the data
checksum (hash), e.g. "SHA256".encryptionAlgorithm - the BouncyCastle code of the algorithm used to encrypt the hash in the
signature, e.g. "RSA".public DigestAlgorithm getDigestAlgorithm()
public EncryptionAlgorithm getEncryptionAlgorithm()
public String toBouncyCastleCode()
public String toString()
toString in class Enum<SignatureAlgorithm>Copyright © 2012-2014 Andrea Funtò. See here for terms and conditions.