public class DSAParameterGenerator
extends java.security.AlgorithmParameterGeneratorSpi
Valid length for the modulus is any multiple of 64 in the range of 512 to 1024.
Use a SHA2withDSAKeyPairGenerator
for generating parameters for 2048 and 3072 bits.
AlgorithmParameterGenerator
,
DSAParameters
,
DSAParams
Constructor and Description |
---|
DSAParameterGenerator()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.security.AlgorithmParameters |
engineGenerateParameters()
Actually generates the required DSA AlgorithmParameters.
|
protected void |
engineInit(java.security.spec.AlgorithmParameterSpec param,
java.security.SecureRandom random)
Initializes this generator with some random seed.
|
protected void |
engineInit(int primeLength,
java.security.SecureRandom random)
Initializes the parameter generator with given prime modulus length and
random seed.
|
public DSAParameterGenerator()
AlgorithmParameterGenerator.getInstance
factory methods for obtaining an AlgorithmParamterGenerator for generating parameters
for DSA signature algorithm.protected void engineInit(int primeLength, java.security.SecureRandom random)
engineInit
in class java.security.AlgorithmParameterGeneratorSpi
primeLength
- the length of the prime modulus in bitsrandom
- the random seed for this generator.protected void engineInit(java.security.spec.AlgorithmParameterSpec param, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException
null
.
Applications shall call init(param_spec, random)
for provider
independent access of this method.
engineInit
in class java.security.AlgorithmParameterGeneratorSpi
param
- must be null
random
- the random seed to be used by this generator.java.security.InvalidAlgorithmParameterException
- if param
is
not null
.protected java.security.AlgorithmParameters engineGenerateParameters()
Applications shall call generatePrameters()
for provider independently accessing this method.
engineGenerateParameters
in class java.security.AlgorithmParameterGeneratorSpi