KeyGenParameterSpec.Builder.SetKeySize(Int32) 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.
Sets the size (in bits) of the key to be generated.
[Android.Runtime.Register("setKeySize", "(I)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=23)]
public Android.Security.Keystore.KeyGenParameterSpec.Builder SetKeySize(int keySize);
[<Android.Runtime.Register("setKeySize", "(I)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=23)>]
member this.SetKeySize : int -> Android.Security.Keystore.KeyGenParameterSpec.Builder
Parameters
- keySize
- Int32
Returns
- Attributes
Remarks
Sets the size (in bits) of the key to be generated. For instance, for RSA keys this sets the modulus size, for EC keys this selects a curve with a matching field size, and for symmetric keys this sets the size of the bitstring which is their key material. For ML-DSA keys, the key size is ignored.
The default key size is specific to each key algorithm. If key size is not set via this method, it should be looked up from the algorithm-specific parameters (if any) provided via setAlgorithmParameterSpec.
Android reference for android.security.keystore.KeyGenParameterSpec.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.