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
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)
-
Constructor Details
-
JCEDHPrivateKey
protected JCEDHPrivateKey()
-
-
Method Details
-
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
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
Description copied from interface:DHKeyReturns the parameters for this key. -
getX
Description copied from interface:DHPrivateKeyReturns this key's private value x.- Specified by:
getXin interfaceDHPrivateKey- Returns:
- this key's private value x.
-
setBagAttribute
- Specified by:
setBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttribute
- Specified by:
getBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
- Specified by:
getBagAttributeKeysin interfacePKCS12BagAttributeCarrier
-