Language

KeyPairGeneratorSpec.Builder.SetKeySize(Int32) Method

Definition

Caution

deprecated

Sets the key size for the keypair to be created.

[Android.Runtime.Register("setKeySize", "(I)Landroid/security/KeyPairGeneratorSpec$Builder;", "")]
[System.Obsolete("deprecated")]
public Android.Security.KeyPairGeneratorSpec.Builder SetKeySize(int keySize);
[<Android.Runtime.Register("setKeySize", "(I)Landroid/security/KeyPairGeneratorSpec$Builder;", "")>]
[<System.Obsolete("deprecated")>]
member this.SetKeySize : int -> Android.Security.KeyPairGeneratorSpec.Builder

Parameters

keySize
Int32

Returns

Attributes

Remarks

Sets the key size for the keypair to be created. For instance, for a key type of RSA this will set the modulus size and for a key type of EC it will select a curve with a matching field size. If this method is called for ML-DSA, the provided value will be ignored.

Android reference for android.security.KeyPairGeneratorSpec.Builder.setKeySize.

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