public abstract class KeyPairGeneratorSpi extends Object
KeyPairGeneratorSpi is the Service Provider Interface (SPI)
definition for KeyPairGenerator.KeyPairGenerator| Constructor and Description |
|---|
KeyPairGeneratorSpi()
Constructs a new instance of
KeyPairGeneratorSpi. |
| Modifier and Type | Method and Description |
|---|---|
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. |
public KeyPairGeneratorSpi()
KeyPairGeneratorSpi.public abstract KeyPair generateKeyPair()
KeyPair each time this method
is called.KeyPair each time this method is called.public abstract void initialize(int keysize,
SecureRandom random)
KeyPairGeneratorSpi with the given key size and
the given SecureRandom. The default parameter set will be used.keysize - the key size (number of bits).random - the source of randomness.public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
KeyPairGeneratorSpi with the given AlgorithmParameterSpec and the given SecureRandom.params - the parameters to use.random - the source of randomness.InvalidAlgorithmParameterException - if the specified parameters are not supported.