javax.crypto.spec

Class DHPublicKeySpec

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
BigIntegergetG()
Get the base generator.
BigIntegergetP()
Get the prime modulus.
BigIntegergetY()
Get the public value.

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.