Top Fields Constructors Methods
org.bouncycastle.jce.provider

public Class JCEDHPrivateKey

extends Object
implements DHPrivateKey, PKCS12BagAttributeCarrier
Class Inheritance
All Implemented Interfaces
org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier, javax.crypto.interfaces.DHPrivateKey, java.security.PrivateKey, javax.security.auth.Destroyable, java.security.Key, java.io.Serializable, javax.crypto.interfaces.DHKey
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, java.math.BigInteger, java.util.Enumeration, javax.crypto.interfaces.DHPrivateKey, javax.crypto.spec.DHParameterSpec, .DHPrivateKeySpec, org.bouncycastle.asn1.ASN1Encodable, .ASN1Encoding, .ASN1Integer, .ASN1ObjectIdentifier, .ASN1Sequence, org.bouncycastle.asn1.pkcs.DHParameter, .PKCSObjectIdentifiers, .PrivateKeyInfo, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.asn1.x9.DomainParameters, .X9ObjectIdentifiers, org.bouncycastle.crypto.params.DHPrivateKeyParameters, org.bouncycastle.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl, org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier

Field Summary

Modifier and TypeField and Description
private PKCS12BagAttributeCarrier
private DHParameterSpec
private PrivateKeyInfo
pack-priv static final long
pack-priv BigInteger
x

Constructor Summary

AccessConstructor and Description
protected
pack-priv
pack-priv
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
getAlgorithm()

Implements java.security.Key.getAlgorithm.

Returns the standard algorithm name for this key.
public ASN1Encodable
public Enumeration<E>
public byte[]

Returns:

a PKCS8 representation of the key.
getEncoded
()

Implements java.security.Key.getEncoded.

Return a PKCS8 representation of the key.
public String

Returns:

the string "PKCS#8"
getFormat
()

Implements java.security.Key.getFormat.

return the encoding format we produce in getEncoded().
public DHParameterSpec
getParams()

Implements javax.crypto.interfaces.DHKey.getParams.

Returns the key parameters.
public BigInteger
getX()

Implements javax.crypto.interfaces.DHPrivateKey.getX.

Returns the private value, x.
private void
public void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attrCarrierback to summary
private PKCS12BagAttributeCarrier attrCarrier
dhSpecback to summary
private DHParameterSpec dhSpec
infoback to summary
private PrivateKeyInfo info
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides javax.crypto.interfaces.DHPrivateKey.serialVersionUID.

xback to summary
pack-priv BigInteger x

Constructor Detail

JCEDHPrivateKeyback to summary
protected JCEDHPrivateKey()
JCEDHPrivateKeyback to summary
pack-priv JCEDHPrivateKey(DHPrivateKey key)
JCEDHPrivateKeyback to summary
pack-priv JCEDHPrivateKey(DHPrivateKeySpec spec)
JCEDHPrivateKeyback to summary
pack-priv JCEDHPrivateKey(PrivateKeyInfo info) throws IOException
JCEDHPrivateKeyback to summary
pack-priv JCEDHPrivateKey(DHPrivateKeyParameters params)

Method Detail

getAlgorithmback to summary
public String getAlgorithm()

Implements java.security.Key.getAlgorithm.

Doc from java.security.Key.getAlgorithm.

Returns the standard algorithm name for this key. For example, "DSA" would indicate that this key is a DSA key. See the key related sections (KeyFactory, KeyGenerator, KeyPairGenerator, and SecretKeyFactory) in the Java Security Standard Algorithm Names Specification for information about standard key algorithm names.

Returns:String

the name of the algorithm associated with this key.

getBagAttributeback to summary
public ASN1Encodable getBagAttribute(ASN1ObjectIdentifier oid)

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.getBagAttribute.

getBagAttributeKeysback to summary
public Enumeration<E> getBagAttributeKeys()

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.getBagAttributeKeys.

getEncodedback to summary
public byte[] getEncoded()

Implements java.security.Key.getEncoded.

Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.

Returns:byte[]

a PKCS8 representation of the key.

getFormatback to summary
public String getFormat()

Implements java.security.Key.getFormat.

return the encoding format we produce in getEncoded().

Returns:String

the string "PKCS#8"

getParamsback to summary
public DHParameterSpec getParams()

Implements javax.crypto.interfaces.DHKey.getParams.

Doc from javax.crypto.interfaces.DHKey.getParams.

Returns the key parameters.

Returns:DHParameterSpec

the key parameters

getXback to summary
public BigInteger getX()

Implements javax.crypto.interfaces.DHPrivateKey.getX.

Doc from javax.crypto.interfaces.DHPrivateKey.getX.

Returns the private value, x.

Returns:BigInteger

the private value, x

readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
setBagAttributeback to summary
public void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.setBagAttribute.

writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException