Partager via


KeyPairGenerator.GenKeyPair Method

Definition

Generates a key pair.

[Android.Runtime.Register("genKeyPair", "()Ljava/security/KeyPair;", "")]
public Java.Security.KeyPair? GenKeyPair ();
[<Android.Runtime.Register("genKeyPair", "()Ljava/security/KeyPair;", "")>]
member this.GenKeyPair : unit -> Java.Security.KeyPair

Returns

the generated key pair

Attributes

Remarks

Generates a key pair.

If this KeyPairGenerator has not been initialized explicitly, provider-specific defaults will be used for the size and other (algorithm-specific) values of the generated keys.

This will generate a new key pair every time it is called.

This method is functionally equivalent to #generateKeyPair() generateKeyPair.

Added in 1.2.

Java documentation for java.security.KeyPairGenerator.genKeyPair().

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