public class RSAKeyPairGenerator extends Object implements AsymmetricCipherKeyPairGenerator
| Constructor and Description |
|---|
RSAKeyPairGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected BigInteger |
chooseRandomPrime(int bitlength,
BigInteger e,
BigInteger sqrdBound)
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.
|
protected boolean |
isProbablePrime(BigInteger x) |
public void init(KeyGenerationParameters param)
AsymmetricCipherKeyPairGeneratorinit in interface AsymmetricCipherKeyPairGeneratorparam - the parameters the key pair is to be initialised with.public AsymmetricCipherKeyPair generateKeyPair()
AsymmetricCipherKeyPairGeneratorgenerateKeyPair in interface AsymmetricCipherKeyPairGeneratorprotected BigInteger chooseRandomPrime(int bitlength, BigInteger e, BigInteger sqrdBound)
bitlength - the bit-length of the returned primee - the RSA public exponentprotected boolean isProbablePrime(BigInteger x)
Copyright © 2015–2020 The veraPDF Consortium. All rights reserved.