public enum DigestAlgorithm extends java.lang.Enum<DigestAlgorithm>
| Enum Constant and Description |
|---|
SHA1
SHA-1 digest.
|
SHA256
SHA-256 digest.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
API_SHA_256_ALL_ALGORITHMS
API level which supports
SHA256 for all SignatureAlgorithms. |
static int |
API_SHA_256_RSA_AND_ECDSA
|
java.lang.String |
entryAttributeName
Name of attribute in entry (both manifest and signature file) with the entry's digest.
|
java.lang.String |
manifestAttributeName
Name of attribute in signature file with the manifest digest.
|
java.lang.String |
messageDigestName
Name of algorithm for message digest.
|
| Modifier and Type | Method and Description |
|---|---|
static DigestAlgorithm |
valueOf(java.lang.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
Android 2.3 (API Level 9) to 4.2 (API Level 17) (inclusive) do not support SHA-2 JAR signatures.
Moreover, platforms prior to API Level 18, without the additional Digest-Algorithms attribute, only support SHA or SHA1 algorithm names in .SF and MANIFEST.MF attributes.
public static final DigestAlgorithm SHA256
public static final int API_SHA_256_RSA_AND_ECDSA
public static final int API_SHA_256_ALL_ALGORITHMS
SHA256 for all SignatureAlgorithms.
Before that, SHA256 can only be used with RSA and ECDSA.
@Nonnull public final java.lang.String messageDigestName
@Nonnull public final java.lang.String manifestAttributeName
@Nonnull public final java.lang.String entryAttributeName
public static DigestAlgorithm[] values()
for (DigestAlgorithm c : DigestAlgorithm.values()) System.out.println(c);
public static DigestAlgorithm 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 null