Skip to content

Most visited

Recently visited

navigation
Added in API level 1

KeyPairGeneratorSpi

public abstract class KeyPairGeneratorSpi
extends Object

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


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

See also:

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.

Inherited methods

From class java.lang.Object

Public constructors

KeyPairGeneratorSpi

Added in API level 1
KeyPairGeneratorSpi ()

Constructs a new instance of KeyPairGeneratorSpi.

Public methods

generateKeyPair

Added in API level 1
KeyPair generateKeyPair ()

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

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

initialize

Added in API level 1
void initialize (AlgorithmParameterSpec params, 
                SecureRandom random)

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

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

initialize

Added in API level 1
void initialize (int keysize, 
                SecureRandom random)

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

Parameters
keysize int: the key size (number of bits).
random SecureRandom: the source of randomness.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.