Language

ChecksumType Enum

Definition

Identifies APK checksum algorithms and their request-mask bits.

This enumeration supports a bitwise combination of its member values.

[System.Flags]
public enum ChecksumType
[<System.Flags>]
type ChecksumType = 
Inheritance
ChecksumType
Attributes

Fields

Name Value Description
None 0

Selects no checksum-algorithm bits.

WholeMerkleRoot4kSha256 1

Root SHA256 hash of a 4K Merkle tree computed over all file bytes. See APK Signature Scheme V4. See fs-verity. Recommended for all new applications. Can be used by kernel to enforce authenticity and integrity of the APK. See fs-verity for details

Android reference for android.content.pm.Checksum.TYPE_WHOLE_MERKLE_ROOT_4K_SHA256.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

WholeMd5 2

This constant was deprecated in API level 31. Not platform enforced. Cryptographically broken and unsuitable for further use. Use platform enforced digests e.g. TYPE_WHOLE_MERKLE_ROOT_4K_SHA256. Provided for completeness' sake and to support legacy usecases.

MD5 hash computed over all file bytes.

Android reference for android.content.pm.Checksum.TYPE_WHOLE_MD5.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

WholeSha1 4

This constant was deprecated in API level 31. Not platform enforced. Broken and should not be used. Use platform enforced digests e.g. TYPE_WHOLE_MERKLE_ROOT_4K_SHA256. Provided for completeness' sake and to support legacy usecases.

SHA1 hash computed over all file bytes.

Android reference for android.content.pm.Checksum.TYPE_WHOLE_SHA1.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

WholeSha256 8

This constant was deprecated in API level 31. Not platform enforced. Use platform enforced digests e.g. TYPE_WHOLE_MERKLE_ROOT_4K_SHA256. Provided for completeness' sake and to support legacy usecases.

SHA256 hash computed over all file bytes.

Android reference for android.content.pm.Checksum.TYPE_WHOLE_SHA256.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

WholeSha512 16

This constant was deprecated in API level 31. Not platform enforced. Use platform enforced digests e.g. TYPE_WHOLE_MERKLE_ROOT_4K_SHA256. Provided for completeness' sake and to support legacy usecases.

SHA512 hash computed over all file bytes.

Android reference for android.content.pm.Checksum.TYPE_WHOLE_SHA512.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

PartialMerkleRoot1mSha256 32

Root SHA256 hash of a 1M Merkle tree computed over protected content. Excludes signing block. See APK Signature Scheme V2.

Android reference for android.content.pm.Checksum.TYPE_PARTIAL_MERKLE_ROOT_1M_SHA256.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

PartialMerkleRoot1mSha512 64

Root SHA512 hash of a 1M Merkle tree computed over protected content. Excludes signing block. See APK Signature Scheme V2.

Android reference for android.content.pm.Checksum.TYPE_PARTIAL_MERKLE_ROOT_1M_SHA512.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Remarks

Checksum records identify their algorithm with these values. Checksum requests use the corresponding bits to select required algorithms.

Applies to