語言

DevicePolicyManager.GetKeyPairGrants 方法

定義

多載

名稱 Description
GetKeyPairGrants(String)

由裝置或設定檔擁有者,或被授權的憑證選擇器(被授權 #DELEGATION_CERT_SELECTION 的應用程式)呼叫,以查詢哪些應用程式能存取特定的鑰匙串金鑰。

GetKeyPairGrants(String, KeyChainManagerKeyPairScope)

由裝置或設定檔擁有者、授權憑證選擇器(即被授權的 #DELEGATION_CERT_SELECTION 應用程式)或權限呼叫者呼叫,以查詢哪些應用程式在指定範圍內能存取特定鑰匙串金鑰。

GetKeyPairGrants(String)

由裝置或設定檔擁有者,或被授權的憑證選擇器(被授權 #DELEGATION_CERT_SELECTION 的應用程式)呼叫,以查詢哪些應用程式能存取特定的鑰匙串金鑰。

[Android.Runtime.Register("getKeyPairGrants", "(Ljava/lang/String;)Ljava/util/Map;", "GetGetKeyPairGrants_Ljava_lang_String_Handler", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_CERTIFICATES")]
public virtual System.Collections.Generic.IDictionary<Java.Lang.Integer,System.Collections.Generic.ICollection<string>> GetKeyPairGrants(string alias);
[<Android.Runtime.Register("getKeyPairGrants", "(Ljava/lang/String;)Ljava/util/Map;", "GetGetKeyPairGrants_Ljava_lang_String_Handler", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_CERTIFICATES")>]
abstract member GetKeyPairGrants : string -> System.Collections.Generic.IDictionary<Java.Lang.Integer, System.Collections.Generic.ICollection<string>>
override this.GetKeyPairGrants : string -> System.Collections.Generic.IDictionary<Java.Lang.Integer, System.Collections.Generic.ICollection<string>>

參數

alias
String

授權存取的金鑰別名。

傳回

應用程式能存取指定金鑰,並以 UID 映射到套件名稱集合的對應方式排列。

屬性

備註

由裝置或設定檔擁有者,或被授權的憑證選擇器(被授權 #DELEGATION_CERT_SELECTION 的應用程式)呼叫,以查詢哪些應用程式能存取特定的鑰匙串金鑰。

金鑰是依 UID 分配的,所以如果有多個應用程式共用同一個 UID,授權其中一個的存取權會自動給其他應用程式。 此方法回傳一個包含每個受授權 UID 一個條目的映射。 條目以 UID 作為鍵,對應的套件名稱集合作為值。 特別是,未與其他套件共享 UID 的受授權套件,則以單例集合作為值的條目表示。

Java 文件 android.app.admin.DevicePolicyManager.getKeyPairGrants(java.lang.String)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

GetKeyPairGrants(String, KeyChainManagerKeyPairScope)

由裝置或設定檔擁有者、授權憑證選擇器(即被授權的 #DELEGATION_CERT_SELECTION 應用程式)或權限呼叫者呼叫,以查詢哪些應用程式在指定範圍內能存取特定鑰匙串金鑰。

[Android.Runtime.Register("getKeyPairGrants", "(Ljava/lang/String;I)Ljava/util/Map;", "GetGetKeyPairGrants_Ljava_lang_String_IHandler", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_CERTIFICATES")]
public virtual System.Collections.Generic.IDictionary<Java.Lang.Integer,System.Collections.Generic.ICollection<string>> GetKeyPairGrants(string alias, Android.Security.KeyChainManagerKeyPairScope scope);
[<Android.Runtime.Register("getKeyPairGrants", "(Ljava/lang/String;I)Ljava/util/Map;", "GetGetKeyPairGrants_Ljava_lang_String_IHandler", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_CERTIFICATES")>]
abstract member GetKeyPairGrants : string * Android.Security.KeyChainManagerKeyPairScope -> System.Collections.Generic.IDictionary<Java.Lang.Integer, System.Collections.Generic.ICollection<string>>
override this.GetKeyPairGrants : string * Android.Security.KeyChainManagerKeyPairScope -> System.Collections.Generic.IDictionary<Java.Lang.Integer, System.Collections.Generic.ICollection<string>>

參數

alias
String

查詢補助金的鍵別名。

scope
KeyChainManagerKeyPairScope

金鑰對的作用範圍: KeyChainManager#KEYPAIR_SCOPE_USER 或 KeyChainManager#KEYPAIR_SCOPE_DEVICE。

傳回

應用程式能存取指定金鑰,並以 UID 映射到套件名稱集合的對應方式排列。

屬性

備註

由裝置或設定檔擁有者、委派憑證選擇器(被授權DELEGATION_CERT_SELECTION權限的應用程式)或權限呼叫者呼叫,以查詢指定範圍內哪些應用程式能存取特定鑰匙串金鑰。

Android 參考資料。android.app.admin.DevicePolicyManager.getKeyPairGrants

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於