org.bouncycastle.jce.provider

Class JDKDSAPrivateKey

Implemented Interfaces:
DSAPrivateKey, PKCS12BagAttributeCarrier

public class JDKDSAPrivateKey
extends java.lang.Object
implements DSAPrivateKey, PKCS12BagAttributeCarrier

Constructor Summary

JDKDSAPrivateKey()

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().
DSAParams
getParams()
BigInteger
getX()
void
setBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)

Constructor Details

JDKDSAPrivateKey

protected JDKDSAPrivateKey()

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 DSAParams getParams()


getX

public BigInteger getX()


setBagAttribute

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