Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public abstract class

KeyPairGeneratorSpi

extends Object
java.lang.Object
   ↳ java.security.KeyPairGeneratorSpi
Known Direct Subclasses

Class Overview

KeyPairGeneratorSpi is the Service Provider Interface (SPI) definition for KeyPairGenerator .

Summary

Public Constructors
KeyPairGeneratorSpi ()
Constructs a new instance of KeyPairGeneratorSpi .
Public Methods
abstract KeyPair generateKeyPair ()
Computes and returns a new unique KeyPair each time this method is called.
void initialize ( AlgorithmParameterSpec params, SecureRandom random)
Initializes this KeyPairGeneratorSpi with the given AlgorithmParameterSpec and the given SecureRandom .
abstract void initialize (int keysize, SecureRandom random)
Initializes this KeyPairGeneratorSpi with the given key size and the given SecureRandom .
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public KeyPairGeneratorSpi ()

Added in API level 1

Constructs a new instance of KeyPairGeneratorSpi .

Public Methods

public abstract KeyPair generateKeyPair ()

Added in API level 1

Computes and returns a new unique KeyPair each time this method is called.

Returns
  • a new unique KeyPair each time this method is called.

public void initialize ( AlgorithmParameterSpec params, SecureRandom random)

Added in API level 1

Initializes this KeyPairGeneratorSpi with the given AlgorithmParameterSpec and the given SecureRandom .

Parameters
params the parameters to use.
random the source of randomness.
Throws
InvalidAlgorithmParameterException if the specified parameters are not supported.

public abstract void initialize (int keysize, SecureRandom random)

Added in API level 1

Initializes this KeyPairGeneratorSpi with the given key size and the given SecureRandom . The default parameter set will be used.

Parameters
keysize the key size (number of bits).
random the source of randomness.