org.bouncycastle.jce.provider

Class JCEDHPrivateKey

Implemented Interfaces:
DHPrivateKey, PKCS12BagAttributeCarrier

public class JCEDHPrivateKey
extends java.lang.Object
implements DHPrivateKey, PKCS12BagAttributeCarrier

Constructor Summary

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)

Constructor Details

JCEDHPrivateKey

protected JCEDHPrivateKey()

Method Details

getAlgorithm

public String getAlgorithm()


getBagAttribute

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


getBagAttributeKeys

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


getEncoded

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

Returns:
a PKCS8 representation of the key.


getFormat

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

Returns:
the string "PKCS#8"


getParams

public DHParameterSpec getParams()


getX

public BigInteger getX()


setBagAttribute

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