標記是 KeyMint (先前稱為 Keymaster) API 上的名稱/值組合,可做為在 API 上執行的作業參數,或永久繫結至特定鍵的特性 (或兩者皆是)。
每個標記都包含一個列舉值和相關類型,用來指出是否允許多個值。舉例來說,名稱為 BLOCK_MODE
的標記具有列舉值 4
和類型 ENUM_REP
,表示相關聯的值是可重複的列舉。
您可以在下列位置找到代碼:
- KeyMint:所有標記皆在相關 Android 發布分支的
Tag.aidl
中定義。 - Keymaster:標記會在
platform/hardware/interfaces/keymaster/keymaster-version/types.hal
中定義每個相對應的keymaster-version
,例如 Keymaster 3 的3.0/types.hal
和 Keymaster 4 的4.0/types.hal
。在 Keymaster 2 以下版本中,標記是在platform/hardware/libhardware/include/hardware/keymaster_defs.h
中定義。