javax.crypto.spec

Class DHPrivateKeySpec

public class DHPrivateKeySpec extends Object implements KeySpec

A wrapper for Diffie-Hellman private key data.

Since: 1.4

See Also: DHPublicKeySpec

Constructor Summary
DHPrivateKeySpec(BigInteger x, BigInteger p, BigInteger g)
Create a new Diffie-Hellman private key spec.
Method Summary
BigIntegergetG()
Get the base generator.
BigIntegergetP()
Get the prime modulus.
BigIntegergetX()
Get the private exponent.

Constructor Detail

DHPrivateKeySpec

public DHPrivateKeySpec(BigInteger x, BigInteger p, BigInteger g)
Create a new Diffie-Hellman private key spec.

Parameters: x The private exponent. p The prime modulus. g The base generator.

Method Detail

getG

public BigInteger getG()
Get the base generator.

Returns: The base generator.

getP

public BigInteger getP()
Get the prime modulus.

Returns: The prime modulus.

getX

public BigInteger getX()
Get the private exponent.

Returns: The private exponent.