This key pair generator may be initialized in two different ways:
java.security.KeyPairGenerator
Modifier and Type | Field and Description |
---|---|
private DHParameterSpec | |
private int | |
private SecureRandom |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
pack-priv static void | |
public KeyPair | Returns: the new key pairImplements abstract java. |
public void | initialize(int
the keysize (size of prime modulus) in bits keysize, SecureRandom the source of randomness random)Implements abstract java. |
public void | initialize(AlgorithmParameterSpec
the parameter set used to generate the key pair algParams, SecureRandom the source of randomness random)Overrides java. |
params | back to summary |
---|---|
private DHParameterSpec params |
pSize | back to summary |
---|---|
private int pSize |
random | back to summary |
---|---|
private SecureRandom random |
DHKeyPairGenerator | back to summary |
---|---|
public DHKeyPairGenerator() |
checkKeySize | back to summary |
---|---|
pack-priv static void checkKeySize(int keysize, int expSize) throws InvalidParameterException |
generateKeyPair | back to summary |
---|---|
public KeyPair generateKeyPair() Implements abstract java. Generates a key pair.
|
initialize | back to summary |
---|---|
public void initialize(int keysize, SecureRandom random) Implements abstract java. Initializes this key pair generator for a certain keysize and source of randomness. The keysize is specified as the size in bits of the prime modulus.
|
initialize | back to summary |
---|---|
public void initialize(AlgorithmParameterSpec algParams, SecureRandom random) throws InvalidAlgorithmParameterException Overrides java. Initializes this key pair generator for the specified parameter set and source of randomness. The given parameter set contains the prime modulus, the base generator, and optionally the requested size in bits of the random exponent (private value).
|