Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
final class: DHPublicKey [javadoc | source]
java.lang.Object
   com.sun.crypto.provider.DHPublicKey

All Implemented Interfaces:
    PublicKey, DHPublicKey, java$io$Serializable

A public key in X.509 format for the Diffie-Hellman key agreement algorithm.
Field Summary
static final  long serialVersionUID     
Constructor:
 DHPublicKey(byte[] encodedKey) throws InvalidKeyException 
    Make a DH public key from its DER encoding (X.509).
    Parameters:
    encodedKey - the encoded key
    Throws:
    InvalidKeyException - if the encoded key does not represent a Diffie-Hellman public key
    exception: InvalidKeyException - if the encoded key does not represent a Diffie-Hellman public key
 DHPublicKey(BigInteger y,
    BigInteger p,
    BigInteger g) throws InvalidKeyException 
    Make a DH public key out of a public value y, a prime modulus p, and a base generator g.
    Parameters:
    y - the public value
    p - the prime modulus
    g - the base generator
    Throws:
    InvalidKeyException - if the key cannot be encoded
    exception: InvalidKeyException - if the key cannot be encoded
 DHPublicKey(BigInteger y,
    BigInteger p,
    BigInteger g,
    int l) 
    Make a DH public key out of a public value y, a prime modulus p, a base generator g, and a private-value length l.
    Parameters:
    y - the public value
    p - the prime modulus
    g - the base generator
    l - the private-value length
    Throws:
    ProviderException - if the key cannot be encoded
    exception: ProviderException - if the key cannot be encoded
Method from com.sun.crypto.provider.DHPublicKey Summary:
equals,   getAlgorithm,   getEncoded,   getFormat,   getParams,   getY,   hashCode,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.DHPublicKey Detail:
 public boolean equals(Object obj) 
 public String getAlgorithm() 
    Returns the name of the algorithm associated with this key: "DH"
 public synchronized byte[] getEncoded() 
    Get the encoding of the key.
 public String getFormat() 
    Returns the encoding format of this key: "X.509"
 public DHParameterSpec getParams() 
    Returns the key parameters.
 public BigInteger getY() 
    Returns the public value, y.
 public int hashCode() 
    Calculates a hash code value for the object. Objects that are equal will also have the same hashcode.
 public String toString()