public interface DSAKeyPairGenerator
Modifier and Type | Method and Description |
---|---|
void |
initialize(DSAParams params,
SecureRandom random)
Initializes this generator with the prime (
p ), subprime (q ), and base (g ) values from the specified parameters. |
void |
initialize(int modlen,
boolean genParams,
SecureRandom random)
Initializes this generator for the specified modulus length.
|
void initialize(DSAParams params, SecureRandom random) throws InvalidParameterException
p
), subprime (q
), and base (g
) values from the specified parameters.params
- the parameter values.random
- the source of randomness.InvalidParameterException
- if the specified parameter values are null
or
invalid.void initialize(int modlen, boolean genParams, SecureRandom random) throws InvalidParameterException
The parameter genParams
specifies whether this method should
generate new prime (p
), subprime (q
), and base (g
)
values or whether
it will use the pre-calculated values for the specified modulus
length. Default parameters are available for modulus lengths of 512 and 1024
bits.
modlen
- the length of the modulus in bits.genParams
- whether new values should be generated.random
- the source of randomness.InvalidParameterException
- if the specified modulus length is not valid, or if there are
no pre-calculated values and genParams
is false
.