com.ibm.crypto.provider
Class RSAKeyPairGenerator

java.lang.Object
  extended by java.security.KeyPairGeneratorSpi
      extended by com.ibm.crypto.provider.RSAKeyPairGenerator

public final class RSAKeyPairGenerator
extends KeyPairGeneratorSpi

This class generates RSA public/private key pairs. Note: There is a very small chance that an ArithmeticException being thrown during generateKeyPair().


Constructor Summary
RSAKeyPairGenerator()
           
 
Method Summary
 KeyPair generateKeyPair()
           
 void initialize(AlgorithmParameterSpec params, SecureRandom random)
           
 void initialize(int strength)
           
 void initialize(int strength, SecureRandom random)
          Initializes this KeyPairGenerator for given modulus and random source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSAKeyPairGenerator

public RSAKeyPairGenerator()
Method Detail

initialize

public void initialize(AlgorithmParameterSpec params,
                       SecureRandom random)
                throws InvalidAlgorithmParameterException
Overrides:
initialize in class KeyPairGeneratorSpi
Throws:
InvalidAlgorithmParameterException

initialize

public void initialize(int strength,
                       SecureRandom random)
Initializes this KeyPairGenerator for given modulus and random source

Specified by:
initialize in class KeyPairGeneratorSpi
Parameters:
strength - the length of the key to be generated
random - the SecureRandom object for generating random number

initialize

public void initialize(int strength)

generateKeyPair

public KeyPair generateKeyPair()
Specified by:
generateKeyPair in class KeyPairGeneratorSpi