All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iaik.security.rsa.RSAKeyPairGenerator

java.lang.Object
   |
   +----java.security.KeyPairGenerator
           |
           +----iaik.security.rsa.RSAKeyPairGenerator

public class RSAKeyPairGenerator
extends KeyPairGenerator
implements RSAKeyPairGenerator
The RSAKeyPairGenerator class is used to generate keys for the RSA algorithm.


Constructor Index

 o RSAKeyPairGenerator()
The default constructor.

Method Index

 o generateKeyPair()
Generates a key pair.
 o initialize(int, BigInteger, SecureRandom)
Initializes the key pair generator using the specified "strength" (desired key length in bits), public exponent, and source of random bits.
 o initialize(int, SecureRandom)
Initializes the key pair generator for a certain key length.

Constructors

 o RSAKeyPairGenerator
 public RSAKeyPairGenerator()
The default constructor.

Methods

 o initialize
 public void initialize(int keyLength,
                        SecureRandom secureRandom)
Initializes the key pair generator for a certain key length.

Parameters:
keyLength - the length of the key in bits.
secureRandom - the source of randomness for this generator. If no generator is specified the default one is used.
Overrides:
initialize in class KeyPairGenerator
 o initialize
 public void initialize(int strength,
                        BigInteger publicExponent,
                        SecureRandom secureRandom) throws InvalidParameterException
Initializes the key pair generator using the specified "strength" (desired key length in bits), public exponent, and source of random bits. Typical values for the public exponent are the Fermat primes F4 and F0 (0x10001 and 0x11) and, less commonly, 17.

 o generateKeyPair
 public KeyPair generateKeyPair()
Generates a key pair. Unless an initialization method is called using a KeyPairGenerator interface, algorithm-specific defaults will be used. This will generate a new key pair every time it is called.

Returns:
the generated KeyPair
Overrides:
generateKeyPair in class KeyPairGenerator

All Packages  Class Hierarchy  This Package  Previous  Next  Index