Package javax.crypto.spec
Class DHGenParameterSpec
java.lang.Object
javax.crypto.spec.DHGenParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
public class DHGenParameterSpec extends Object implements AlgorithmParameterSpec
The algorithm parameter specification for generating Diffie-Hellman
parameters used in Diffie-Hellman key agreement.
-
Constructor Summary
Constructors Constructor Description DHGenParameterSpec(int primeSize, int exponentSize)Creates a newDHGenParameterSpecinstance with the specified parameters. -
Method Summary
Modifier and Type Method Description intgetExponentSize()Returns the size of the random exponent in bits.intgetPrimeSize()Returns the size of the prime modulus in bits.
-
Constructor Details
-
DHGenParameterSpec
public DHGenParameterSpec(int primeSize, int exponentSize)Creates a newDHGenParameterSpecinstance with the specified parameters.- Parameters:
primeSize- the size of the prime modulus in bits.exponentSize- the size of the random exponent in bits.
-
-
Method Details
-
getPrimeSize
public int getPrimeSize()Returns the size of the prime modulus in bits.- Returns:
- the size of the prime modulus in bits.
-
getExponentSize
public int getExponentSize()Returns the size of the random exponent in bits.- Returns:
- the size of the random exponent in bits.
-