public final class ElGamalKeyPairGenerator
extends java.security.KeyPairGenerator
| Constructor and Description |
|---|
ElGamalKeyPairGenerator()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.KeyPair |
generateKeyPair()
Actually generates the requested DH KeyPair.
|
void |
initialize(java.security.spec.AlgorithmParameterSpec params) |
void |
initialize(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
Initializes this ElGamalKeyPairGenerator with given ElGamal parameter specification and random seed.
|
void |
initialize(int keysize)
Initializes the ElGamalKeyPairGenerator for given prime modulus length.
|
void |
initialize(int keysize,
java.security.SecureRandom random)
Initializes the ElGamalKeyPairGenerator for given prime modulus length with the given
random seed.
|
public void initialize(int keysize)
initialize in class java.security.KeyPairGeneratorprimeLength - the length of the prime modulus in bitspublic void initialize(int keysize,
java.security.SecureRandom random)
initialize in class java.security.KeyPairGeneratorprimeLength - the length of the prime modulus in bitsrandom - the random seed as SecureRandom.public void initialize(java.security.spec.AlgorithmParameterSpec params)
throws java.security.InvalidAlgorithmParameterException
initialize in class java.security.KeyPairGeneratorjava.security.InvalidAlgorithmParameterExceptionpublic void initialize(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException
initialize in class java.security.KeyPairGeneratorparam - the ElGamalParameterSpec representing prime modulus p, base
generator g, and exponent length lrandom - the random seed as SecureRandomjava.security.InvalidParameterException - if the given algorithm parameter specification is not
a ElGamalParameterSpec or the size of the exponent is not
shorter than that of the prime modulus, both derived
from the given DH parameter specificationjava.security.InvalidAlgorithmParameterExceptionpublic java.security.KeyPair generateKeyPair()
generateKeyPair in class java.security.KeyPairGenerator