KeyPairGenerator.GenerateKeyPair Method

Definition

Generates a key pair.

[Android.Runtime.Register("generateKeyPair", "()Ljava/security/KeyPair;", "GetGenerateKeyPairHandler")]
public override Java.Security.KeyPair? GenerateKeyPair ();
[<Android.Runtime.Register("generateKeyPair", "()Ljava/security/KeyPair;", "GetGenerateKeyPairHandler")>]
override this.GenerateKeyPair : 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 #genKeyPair() genKeyPair.

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

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