javax.crypto.spec
Class DHPublicKeySpec

java.lang.Object
  |
  +--javax.crypto.spec.DHPublicKeySpec

public class DHPublicKeySpec
extends java.lang.Object
implements KeySpec

Diffie Hellman public key specification.


Attention:  This is not a SUN implementation!

This class has been developed by IAIK according to the documentation publically available.
For SUNīs documentation of this class see http://java.sun.com/security/JCE1.2/spec/apidoc/index.html


This class represents a Diffie Hellman public key specification. A key specification is a transparent representation of the key material constituting the key. A Diffie Hellman public key specification represents the public value y, and the Diffie Hellman parameters p (prime modulus), g (base generator), and l (length of the private value x).

See Also:
KeySpec, DHPrivateKeySpec

Constructor Summary
DHPublicKeySpec(java.math.BigInteger y, java.math.BigInteger p, java.math.BigInteger g)
          Creates a Diffie-Hellman public key specification based on given public value y, prime modulus p and base generator g.
 
Method Summary
 java.math.BigInteger getG()
          Returns the base generator g.
 java.math.BigInteger getP()
          Returns the prime modulus p.
 java.math.BigInteger getY()
          Returns the public value y.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DHPublicKeySpec

public DHPublicKeySpec(java.math.BigInteger y,
                       java.math.BigInteger p,
                       java.math.BigInteger g)
Creates a Diffie-Hellman public key specification based on given public value y, prime modulus p and base generator g.
Parameters:
y - the public value
p - the prime modulus
g - the base generator
Method Detail

getY

public java.math.BigInteger getY()
Returns the public value y.
Returns:
the public value y

getP

public java.math.BigInteger getP()
Returns the prime modulus p.
Returns:
the prime modulus p

getG

public java.math.BigInteger getG()
Returns the base generator g.
Returns:
the base generator g