Package java.security.interfaces
Interface DSAKeyPairGenerator
-
public interface DSAKeyPairGeneratorThe interface for key generators that can generate DSA key pairs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinitialize(int modlen, boolean genParams, SecureRandom random)Initializes this generator for the specified modulus length.voidinitialize(DSAParams params, SecureRandom random)Initializes this generator with the prime (p), subprime (q), and base (g) values from the specified parameters.
-
-
-
Method Detail
-
initialize
void initialize(DSAParams params, SecureRandom random) throws InvalidParameterException
Initializes this generator with the prime (p), subprime (q), and base (g) values from the specified parameters.- Parameters:
params- the parameter values.random- the source of randomness.- Throws:
InvalidParameterException- if the specified parameter values arenullor invalid.
-
initialize
void initialize(int modlen, boolean genParams, SecureRandom random) throws InvalidParameterExceptionInitializes this generator for the specified modulus length. Valid values for the modulus length are the multiples of 8 between 512 and 1024.The parameter
genParamsspecifies 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.- Parameters:
modlen- the length of the modulus in bits.genParams- whether new values should be generated.random- the source of randomness.- Throws:
InvalidParameterException- if the specified modulus length is not valid, or if there are no pre-calculated values andgenParamsisfalse.
-
-