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