public enum SignatureAlgorithm extends java.lang.Enum<SignatureAlgorithm>
| Enum Constant and Description |
|---|
DSA
DSA algorithm.
|
ECDSA
ECDSA algorithm.
|
RSA
RSA algorithm.
|
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
keyAlgorithm
Name of the private key as reported by
PrivateKey. |
int |
minSdkVersion
Minimum SDK version that allows this signature.
|
java.lang.String |
signatureAlgorithmSuffix
Suffix appended to digest algorithm to obtain signature algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
static SignatureAlgorithm |
fromKeyAlgorithm(java.lang.String keyAlgorithm,
int minSdkVersion)
Obtains the signature algorithm that corresponds to a private key name applicable to a SDK
version.
|
java.lang.String |
signatureAlgorithmName(DigestAlgorithm digestAlgorithm)
Obtains the name of the signature algorithm when used with a digest algorithm.
|
static SignatureAlgorithm |
valueOf(java.lang.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 RSA
public static final SignatureAlgorithm ECDSA
public static final SignatureAlgorithm DSA
public final java.lang.String keyAlgorithm
PrivateKey.public final int minSdkVersion
public final java.lang.String signatureAlgorithmSuffix
public static SignatureAlgorithm[] values()
for (SignatureAlgorithm c : SignatureAlgorithm.values()) System.out.println(c);
public static SignatureAlgorithm valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static SignatureAlgorithm fromKeyAlgorithm(java.lang.String keyAlgorithm, int minSdkVersion) throws java.security.NoSuchAlgorithmException
keyAlgorithm - the named referred in the PrivateKeyminSdkVersion - minimum SDK version to runkeyAlgorithm equal to keyAlgorithmjava.security.NoSuchAlgorithmException - if no algorithm was found for the given private key; an
algorithm was found but is not applicable to the given SDK versionpublic java.lang.String signatureAlgorithmName(DigestAlgorithm digestAlgorithm)
digestAlgorithm - the digest algorithm to use