Package org.bouncycastle.jce.provider
Class JCEDHPrivateKey
- java.lang.Object
-
- org.bouncycastle.jce.provider.JCEDHPrivateKey
-
- All Implemented Interfaces:
Serializable,Key,PrivateKey,DHKey,DHPrivateKey,PKCS12BagAttributeCarrier
public class JCEDHPrivateKey extends Object implements DHPrivateKey, PKCS12BagAttributeCarrier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJCEDHPrivateKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlgorithm()Returns the name of the algorithm of this key.ASN1EncodablegetBagAttribute(ASN1ObjectIdentifier oid)EnumerationgetBagAttributeKeys()byte[]getEncoded()Return a PKCS8 representation of the key.StringgetFormat()return the encoding format we produce in getEncoded().DHParameterSpecgetParams()Returns the parameters for this key.BigIntegergetX()Returns this key's private value x.voidsetBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)
-
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
Description copied from interface:KeyReturns the name of the algorithm of this key. If the algorithm is unknown,nullis returned.- Specified by:
getAlgorithmin interfaceKey- Returns:
- the name of the algorithm of this key or
nullif the algorithm is unknown.
-
getFormat
public String getFormat()
return the encoding format we produce in getEncoded().
-
getEncoded
public byte[] getEncoded()
Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.- Specified by:
getEncodedin interfaceKey- Returns:
- a PKCS8 representation of the key.
-
getParams
public DHParameterSpec getParams()
Description copied from interface:DHKeyReturns the parameters for this key.
-
getX
public BigInteger getX()
Description copied from interface:DHPrivateKeyReturns this key's private value x.- Specified by:
getXin interfaceDHPrivateKey- Returns:
- this key's private value x.
-
setBagAttribute
public void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)
- Specified by:
setBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttribute
public ASN1Encodable getBagAttribute(ASN1ObjectIdentifier oid)
- Specified by:
getBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
public Enumeration getBagAttributeKeys()
- Specified by:
getBagAttributeKeysin interfacePKCS12BagAttributeCarrier
-
-