public class RSAKeyPairGenerator extends Object implements AsymmetricCipherKeyPairGenerator
Constructor and Description |
---|
RSAKeyPairGenerator() |
Modifier and Type | Method and Description |
---|---|
protected BigInteger |
chooseRandomPrime(int bitlength,
BigInteger e)
Choose a random prime value for use with RSA
|
AsymmetricCipherKeyPair |
generateKeyPair()
return an AsymmetricCipherKeyPair containing the generated keys.
|
void |
init(KeyGenerationParameters param)
intialise the key pair generator.
|
public void init(KeyGenerationParameters param)
AsymmetricCipherKeyPairGenerator
init
in interface AsymmetricCipherKeyPairGenerator
param
- the parameters the key pair is to be initialised with.public AsymmetricCipherKeyPair generateKeyPair()
AsymmetricCipherKeyPairGenerator
generateKeyPair
in interface AsymmetricCipherKeyPairGenerator
protected BigInteger chooseRandomPrime(int bitlength, BigInteger e)
bitlength
- the bit-length of the returned primee
- the RSA public exponentCopyright © 2016 BouncyCastle.org. All rights reserved.