Package javax.crypto.spec
Class DHParameterSpec
- java.lang.Object
-
- javax.crypto.spec.DHParameterSpec
-
- All Implemented Interfaces:
AlgorithmParameterSpec
public class DHParameterSpec extends Object implements AlgorithmParameterSpec
The algorithm parameter specification for the Diffie-Hellman algorithm.
-
-
Constructor Summary
Constructors Constructor Description DHParameterSpec(BigInteger p, BigInteger g)Creates a newDHParameterSpecinstance with the specified prime modulus and base generator.DHParameterSpec(BigInteger p, BigInteger g, int l)Creates a newDHParameterSpecinstance with the specified prime modulus, base generator and size (in bits) of the random exponent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigIntegergetG()Returns the base generator of this parameter specification.intgetL()Returns the size (in bits) of the random exponent.BigIntegergetP()Returns the prime modulus of this parameter specification.
-
-
-
Constructor Detail
-
DHParameterSpec
public DHParameterSpec(BigInteger p, BigInteger g)
Creates a newDHParameterSpecinstance with the specified prime modulus and base generator.- Parameters:
p- the prime modulus.g- the base generator.
-
DHParameterSpec
public DHParameterSpec(BigInteger p, BigInteger g, int l)
Creates a newDHParameterSpecinstance with the specified prime modulus, base generator and size (in bits) of the random exponent.- Parameters:
p- the prime modulus.g- the base generator.l- the size of the random exponent (in bits).
-
-
Method Detail
-
getP
public BigInteger getP()
Returns the prime modulus of this parameter specification.- Returns:
- the prime modulus.
-
getG
public BigInteger getG()
Returns the base generator of this parameter specification.- Returns:
- the base generator.
-
getL
public int getL()
Returns the size (in bits) of the random exponent.- Returns:
- the size (in bits) of the random exponent.
-
-