org.bouncycastle.jce.provider

Class JCEElGamalPrivateKey

public class JCEElGamalPrivateKey extends Object implements ElGamalPrivateKey, DHPrivateKey, PKCS12BagAttributeCarrier

Constructor Summary
protected JCEElGamalPrivateKey()
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().
ElGamalParameterSpecgetParameters()
DHParameterSpecgetParams()
BigIntegergetX()
voidsetBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)

Constructor Detail

JCEElGamalPrivateKey

protected JCEElGamalPrivateKey()

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"

getParameters

public ElGamalParameterSpec getParameters()

getParams

public DHParameterSpec getParams()

getX

public BigInteger getX()

setBagAttribute

public void setBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)