Language

KeyGenParameterSpec.Builder.SetAttestKeyAlias(String) Method

Definition

Sets the alias of the attestation key that will be used to sign the attestation certificate for the generated key pair, if an attestation challenge is set with setAttestationChallenge(byte[]).

[Android.Runtime.Register("setAttestKeyAlias", "(Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=31)]
public Android.Security.Keystore.KeyGenParameterSpec.Builder SetAttestKeyAlias(string? attestKeyAlias);
[<Android.Runtime.Register("setAttestKeyAlias", "(Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=31)>]
member this.SetAttestKeyAlias : string -> Android.Security.Keystore.KeyGenParameterSpec.Builder

Parameters

attestKeyAlias
String

the alias of the attestation key to be used to sign the attestation certificate. This value may be null.

Returns

Attributes

Remarks

Sets the alias of the attestation key that will be used to sign the attestation certificate for the generated key pair, if an attestation challenge is set with setAttestationChallenge(byte[]). If an attestKeyAlias is set but no challenge, parameter-specification-based initialization will throw InvalidAlgorithmParameterException.

If the attestKeyAlias is set to null (the default), Android Keystore will select an appropriate system-provided attestation signing key. If not null, the alias must reference an Android Keystore key that was created with KeyProperties.PURPOSE_ATTEST_KEY, or parameter-specification-based initialization will throw InvalidAlgorithmParameterException.

Android reference for android.security.keystore.KeyGenParameterSpec.Builder.setAttestKeyAlias.

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