com.mindbright.security.publickey
Class DHKey

java.lang.Object
  extended by com.mindbright.jce.crypto.spec.DHParamsImpl
      extended by com.mindbright.jce.crypto.spec.DHParameterSpec
          extended by com.mindbright.security.publickey.DHKey
All Implemented Interfaces:
Key, AlgorithmParameterSpec, DHKey, java.io.Serializable
Direct Known Subclasses:
DHPrivateKey, DHPublicKey

public class DHKey
extends DHParameterSpec
implements DHKey, Key

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mindbright.jce.crypto.spec.DHParameterSpec
l
 
Fields inherited from class com.mindbright.jce.crypto.spec.DHParamsImpl
g, p
 
Constructor Summary
protected DHKey(java.math.BigInteger p, java.math.BigInteger g)
           
 
Method Summary
 java.lang.String getAlgorithm()
          Get the algorithm name
 byte[] getEncoded()
          Get the key in its encoded form
 java.lang.String getFormat()
          Get the primary encoding format of this key.
 DHParameterSpec getParams()
           
 
Methods inherited from class com.mindbright.jce.crypto.spec.DHParameterSpec
getL, toString
 
Methods inherited from class com.mindbright.jce.crypto.spec.DHParamsImpl
getG, getP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DHKey

protected DHKey(java.math.BigInteger p,
                java.math.BigInteger g)
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Description copied from interface: Key
Get the algorithm name

Specified by:
getAlgorithm in interface Key
Returns:
the name of the algorithm this key supports

getFormat

public java.lang.String getFormat()
Description copied from interface: Key
Get the primary encoding format of this key.

Specified by:
getFormat in interface Key
Returns:
the primary encoding format of the key

getEncoded

public byte[] getEncoded()
Description copied from interface: Key
Get the key in its encoded form

Specified by:
getEncoded in interface Key
Returns:
the key in its encoded form

getParams

public DHParameterSpec getParams()
Specified by:
getParams in interface DHKey