javax.crypto.spec
public class DHParameterSpec extends Object implements AlgorithmParameterSpec
Each set of parameters consists of a base generator
g
, a prime modulus p
, and an
optional length, in bits, of the private exponent.
See PKCS #3 - Diffie-Hellman Key Agreement Standard for more information.
Since: 1.4
See Also: KeyAgreement
Constructor Summary | |
---|---|
DHParameterSpec(BigInteger p, BigInteger g)
Create a new set of Diffie-Hellman parameters.
| |
DHParameterSpec(BigInteger p, BigInteger g, int l)
Create a new set of Diffie-Hellman parameters.
|
Method Summary | |
---|---|
BigInteger | getG()
Get the base generator, g.
|
int | getL()
Get the length of the private exponent, in bits.
|
BigInteger | getP()
Get the prime modulus, p.
|
Parameters: p The prime modulus. g The base generator.
Parameters: p The prime modulus. g The base generator. l The size of the private exponent, in bits.
Returns: The base generator g.
Returns: The length of the private exponent, in bits, or 0 if this has not been explicitly set.
Returns: The prime modulus, p.