Android Guides | Samples

Java.Security.KeyPairGenerator Class

KeyPairGenerator is an engine class which is capable of generating a private key and its related public key utilizing the algorithm it was initialized with.

See Also: KeyPairGenerator

Syntax

[Android.Runtime.Register("java/security/KeyPairGenerator", DoNotGenerateAcw=true)]
public abstract class KeyPairGenerator : KeyPairGeneratorSpi

Remarks

KeyPairGenerator is an engine class which is capable of generating a private key and its related public key utilizing the algorithm it was initialized with.

See Also

[Android Documentation]

Requirements

Namespace: Java.Security
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Security.KeyPairGenerator are listed below.

See Also: KeyPairGeneratorSpi

Protected Constructors

Constructs a new instance of KeyPairGenerator with the name of the algorithm to use.
A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
AlgorithmString. Returns the name of the algorithm of this KeyPairGenerator.
[read-only]
ProviderProvider. Returns the provider associated with this KeyPairGenerator.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

override
GenerateKeyPair() : KeyPair
Computes and returns a new unique KeyPair each time this method is called.
GenKeyPair() : KeyPair
Computes and returns a new unique KeyPair each time this method is called.
static
GetInstance(String) : KeyPairGenerator
Returns a new instance of KeyPairGenerator that utilizes the specified algorithm.
static
GetInstance(String, Provider) : KeyPairGenerator
Returns a new instance of KeyPairGenerator that utilizes the specified algorithm from the specified provider.
static
GetInstance(String, String) : KeyPairGenerator
Returns a new instance of KeyPairGenerator that utilizes the specified algorithm from the specified provider.
Initialize(IAlgorithmParameterSpec)
Initializes this KeyPairGenerator with the given AlgorithmParameterSpec.
Initialize(Int32)
Initializes this KeyPairGenerator with the given key size.
override
Initialize(Int32, SecureRandom)
Initializes this KeyPairGenerator with the given key size and the given SecureRandom.