public final class RSAKeyPairGenerator extends KeyPairGenerator
rbs| Constructor and Description |
|---|
RSAKeyPairGenerator()
Creates a new, uninitialized
RSAKeyPairGenerator. |
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
generateKeyPair()
Generates a public/private key pair.
|
java.lang.String |
getAlgorithm()
Returns "RSA".
|
void |
initialize(int strength, RandomBitsSource rbs)
Initializes the key pair generator with the given strength and source of randomness.
|
void |
setAlgID(AlgorithmIdentifier keyAlgID)
Throws an exception if the algothrithm identifier OID is not that of
AlgID.rsaEncryption, otherwise does nothing. |
getInstance, setRandomBitsSourcepublic RSAKeyPairGenerator()
RSAKeyPairGenerator.public void setAlgID(AlgorithmIdentifier keyAlgID) throws AlgorithmIdentifierException
AlgID.rsaEncryption, otherwise does nothing.setAlgID in class KeyPairGeneratorAlgorithmIdentifierException
public void initialize(int strength,
RandomBitsSource rbs)
initialize in class KeyPairGeneratorstrength - Sets the length in bits of the public modulus.rbs - A secure random bits source.public KeyPair generateKeyPair()
KeyPairGeneratorgenerateKeyPair in class KeyPairGeneratorpublic java.lang.String getAlgorithm()
getAlgorithm in class KeyPairGenerator