KeyStoreManager.GetGrantedKeyPairFromId(Int64) Method

Definition

Returns a KeyPair containing the public and private key associated with the key that was previously shared with the app under the provided id.

[Android.Runtime.Register("getGrantedKeyPairFromId", "(J)Ljava/security/KeyPair;", "", ApiSince=36)]
public Java.Security.KeyPair GetGrantedKeyPairFromId(long id);
[<Android.Runtime.Register("getGrantedKeyPairFromId", "(J)Ljava/security/KeyPair;", "", ApiSince=36)>]
member this.GetGrantedKeyPairFromId : int64 -> Java.Security.KeyPair

Parameters

id
Int64

the ID of the private key that was shared with the app

Returns

a KeyPair containing the public and private key shared with the app

Attributes

Remarks

Returns a KeyPair containing the public and private key associated with the key that was previously shared with the app under the provided id.

If a java.security.PrivateKey has not been granted to the caller with the specified id, then an UnrecoverableKeyException is thrown.

Java documentation for android.security.keystore.KeyStoreManager.getGrantedKeyPairFromId(long).

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.

Applies to