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.
-
RSAKeyPairGenerator()
- The default constructor.
-
generateKeyPair()
- Generates a key pair.
-
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.
-
initialize(int, SecureRandom)
- Initializes the key pair generator for a certain key length.
RSAKeyPairGenerator
public RSAKeyPairGenerator()
- The default constructor.
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
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.
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