IdentityCredentialStore.CreateCredential(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new credential.
[Android.Runtime.Register("createCredential", "(Ljava/lang/String;Ljava/lang/String;)Landroid/security/identity/WritableIdentityCredential;", "GetCreateCredential_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)]
public abstract Android.Security.Identity.WritableIdentityCredential CreateCredential (string credentialName, string docType);
[<Android.Runtime.Register("createCredential", "(Ljava/lang/String;Ljava/lang/String;)Landroid/security/identity/WritableIdentityCredential;", "GetCreateCredential_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)>]
abstract member CreateCredential : string * string -> Android.Security.Identity.WritableIdentityCredential
Parameters
- credentialName
- String
The name used to identify the credential.
- docType
- String
The document type for the credential.
Returns
A WritableIdentityCredential
that can be used to create a new credential.
- Attributes
Remarks
Creates a new credential.
When a credential is created, a cryptographic key-pair - CredentialKey - is created which is used to authenticate the store to the Issuing Authority. The private part of this key-pair never leaves secure hardware and the public part can be obtained using WritableIdentityCredential#getCredentialKeyCertificateChain(byte[])
on the returned object.
In addition, all of the Credential data content is imported and a certificate for the CredentialKey and a signature produced with the CredentialKey are created. These latter values may be checked by an issuing authority to verify that the data was imported into secure hardware and that it was imported unmodified.
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.