Enum DigestAlgorithm
- java.lang.Object
-
- java.lang.Enum<DigestAlgorithm>
-
- com.android.tools.build.apkzlib.sign.DigestAlgorithm
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DigestAlgorithm>
public enum DigestAlgorithm extends java.lang.Enum<DigestAlgorithm>
Message digest algorithms.
-
-
Field Summary
Fields Modifier and Type Field Description static intAPI_SHA_256_ALL_ALGORITHMSAPI level which supportsSHA256for allSignatureAlgorithms.static intAPI_SHA_256_RSA_AND_ECDSAjava.lang.StringentryAttributeNameName of attribute in entry (both manifest and signature file) with the entry's digest.java.lang.StringmanifestAttributeNameName of attribute in signature file with the manifest digest.java.lang.StringmessageDigestNameName of algorithm for message digest.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DigestAlgorithmvalueOf(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.
-
-
-
Enum Constant Detail
-
SHA1
public static final DigestAlgorithm SHA1
SHA-1 digest.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.
-
SHA256
public static final DigestAlgorithm SHA256
SHA-256 digest.
-
-
Field Detail
-
API_SHA_256_RSA_AND_ECDSA
public static final int API_SHA_256_RSA_AND_ECDSA
- See Also:
- Constant Field Values
-
API_SHA_256_ALL_ALGORITHMS
public static final int API_SHA_256_ALL_ALGORITHMS
API level which supportsSHA256for allSignatureAlgorithms.Before that, SHA256 can only be used with RSA and ECDSA.
- See Also:
- Constant Field Values
-
messageDigestName
public final java.lang.String messageDigestName
Name of algorithm for message digest.
-
manifestAttributeName
public final java.lang.String manifestAttributeName
Name of attribute in signature file with the manifest digest.
-
entryAttributeName
public final java.lang.String entryAttributeName
Name of attribute in entry (both manifest and signature file) with the entry's digest.
-
-
Method Detail
-
values
public static DigestAlgorithm[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DigestAlgorithm c : DigestAlgorithm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DigestAlgorithm valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-