javax.crypto.spec
Class DHPrivateKeySpec

java.lang.Object
  extended by javax.crypto.spec.DHPrivateKeySpec
All Implemented Interfaces:
KeySpec

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
 BigInteger getG()
          Get the base generator.
 BigInteger getP()
          Get the prime modulus.
 BigInteger getX()
          Get the private exponent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.