org.bouncycastle.jce.provider

Class JCEDHPrivateKey

public class JCEDHPrivateKey extends Object implements DHPrivateKey, PKCS12BagAttributeCarrier

Constructor Summary
protected JCEDHPrivateKey()
Method Summary
StringgetAlgorithm()
DEREncodablegetBagAttribute(DERObjectIdentifier oid)
EnumerationgetBagAttributeKeys()
byte[]getEncoded()
Return a PKCS8 representation of the key.
StringgetFormat()
return the encoding format we produce in getEncoded().
DHParameterSpecgetParams()
BigIntegergetX()
voidsetBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)

Constructor Detail

JCEDHPrivateKey

protected JCEDHPrivateKey()

Method Detail

getAlgorithm

public String getAlgorithm()

getBagAttribute

public DEREncodable getBagAttribute(DERObjectIdentifier oid)

getBagAttributeKeys

public Enumeration getBagAttributeKeys()

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)