javax.crypto.spec
Class DHPublicKeySpec

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

public class DHPublicKeySpec
extends Object
implements KeySpec

A wrapper for Diffie-Hellman public key data.

Since:
1.4
See Also:
DHPrivateKeySpec

Constructor Summary
DHPublicKeySpec(BigInteger y, BigInteger p, BigInteger g)
          Create a new Diffie-Hellman public key spec.
 
Method Summary
 BigInteger getG()
          Get the base generator.
 BigInteger getP()
          Get the prime modulus.
 BigInteger getY()
          Get the public value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DHPublicKeySpec

public DHPublicKeySpec(BigInteger y,
                       BigInteger p,
                       BigInteger g)
Create a new Diffie-Hellman public key spec.

Parameters:
y - The public value.
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.

getY

public BigInteger getY()
Get the public value.

Returns:
The public value.