다음을 통해 공유


KeyGenParameterSpec.Builder(String, KeyStorePurpose) Constructor

Definition

Creates a new instance of the Builder.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "", ApiSince=23)]
public Builder (string keystoreAlias, Android.Security.Keystore.KeyStorePurpose purposes);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "", ApiSince=23)>]
new Android.Security.Keystore.KeyGenParameterSpec.Builder : string * Android.Security.Keystore.KeyStorePurpose -> Android.Security.Keystore.KeyGenParameterSpec.Builder

Parameters

keystoreAlias
String

alias of the entry in which the generated key will appear in Android KeyStore. Must not be empty.

purposes
KeyStorePurpose

set of purposes (e.g., encrypt, decrypt, sign) for which the key can be used. Attempts to use the key for any other purpose will be rejected.

               &lt;p&gt;If the set of purposes for which the key can be used does not contain
               <code data-dev-comment-type="c">KeyProperties#PURPOSE_SIGN</code>, the self-signed certificate generated by
               <code data-dev-comment-type="c">KeyPairGenerator</code> of <code data-dev-comment-type="c">AndroidKeyStore</code> provider will contain an
               invalid signature. This is OK if the certificate is only used for obtaining the
               public key from Android KeyStore.

               &lt;p&gt;See <code data-dev-comment-type="c">KeyProperties</code>.<code data-dev-comment-type="c">PURPOSE</code> flags.
Attributes

Remarks

Creates a new instance of the Builder.

Java documentation for android.security.keystore.KeyGenParameterSpec.Builder.KeyGenParameterSpec$Builder(java.lang.String, int).

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