Skip to content

Most visited

Recently visited

navigation
Added in API level 1

DSAKeyPairGenerator

public interface DSAKeyPairGenerator

java.security.interfaces.DSAKeyPairGenerator


The interface for key generators that can generate DSA key pairs.

Summary

Public methods

abstract void initialize(DSAParams params, SecureRandom random)

Initializes this generator with the prime (p), subprime (q), and base (g) values from the specified parameters.

abstract void initialize(int modlen, boolean genParams, SecureRandom random)

Initializes this generator for the specified modulus length.

Public methods

initialize

Added in API level 1
void initialize (DSAParams params, 
                SecureRandom random)

Initializes this generator with the prime (p), subprime (q), and base (g) values from the specified parameters.

Parameters
params DSAParams: the parameter values.
random SecureRandom: the source of randomness.
Throws
InvalidParameterException if the specified parameter values are null or invalid.

initialize

Added in API level 1
void initialize (int modlen, 
                boolean genParams, 
                SecureRandom random)

Initializes this generator for the specified modulus length. Valid values for the modulus length are the multiples of 8 between 512 and 1024.

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.

Parameters
modlen int: the length of the modulus in bits.
genParams boolean: whether new values should be generated.
random SecureRandom: the source of randomness.
Throws
InvalidParameterException if the specified modulus length is not valid, or if there are no pre-calculated values and genParams is false.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.