org.apache.geronimo.crypto.jce.provider
Class JCEDHPrivateKey

java.lang.Object
  extended by org.apache.geronimo.crypto.jce.provider.JCEDHPrivateKey
All Implemented Interfaces:
Serializable, Key, PrivateKey, DHKey, DHPrivateKey, PKCS12BagAttributeCarrier

public class JCEDHPrivateKey
extends Object
implements DHPrivateKey, PKCS12BagAttributeCarrier

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.crypto.interfaces.DHPrivateKey
serialVersionUID
 
Constructor Summary
protected JCEDHPrivateKey()
           
 
Method Summary
 String getAlgorithm()
           
 DEREncodable getBagAttribute(DERObjectIdentifier oid)
           
 Enumeration getBagAttributeKeys()
           
 byte[] getEncoded()
          Return a PKCS8 representation of the key.
 String getFormat()
          return the encoding format we produce in getEncoded().
 DHParameterSpec getParams()
           
 BigInteger getX()
           
 void setBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCEDHPrivateKey

protected JCEDHPrivateKey()
Method Detail

getAlgorithm

public String getAlgorithm()
Specified by:
getAlgorithm in interface Key

getFormat

public String getFormat()
return the encoding format we produce in getEncoded().

Specified by:
getFormat in interface Key
Returns:
the string "PKCS#8"

getEncoded

public byte[] getEncoded()
Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.

Specified by:
getEncoded in interface Key
Returns:
a PKCS8 representation of the key.

getParams

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

getX

public BigInteger getX()
Specified by:
getX in interface DHPrivateKey

setBagAttribute

public void setBagAttribute(DERObjectIdentifier oid,
                            DEREncodable attribute)
Specified by:
setBagAttribute in interface PKCS12BagAttributeCarrier

getBagAttribute

public DEREncodable getBagAttribute(DERObjectIdentifier oid)
Specified by:
getBagAttribute in interface PKCS12BagAttributeCarrier

getBagAttributeKeys

public Enumeration getBagAttributeKeys()
Specified by:
getBagAttributeKeys in interface PKCS12BagAttributeCarrier


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.