Class JCEECPrivateKey
- java.lang.Object
-
- org.gudy.bouncycastle.jce.provider.JCEECPrivateKey
-
- All Implemented Interfaces:
java.io.Serializable
,java.security.Key
,java.security.PrivateKey
,javax.security.auth.Destroyable
,ECKey
,ECPrivateKey
,PKCS12BagAttributeCarrier
public class JCEECPrivateKey extends java.lang.Object implements ECPrivateKey, PKCS12BagAttributeCarrier
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
algorithm
private java.math.BigInteger
d
private ECParameterSpec
ecSpec
private java.util.Hashtable
pkcs12Attributes
private java.util.Vector
pkcs12Ordering
-
Constructor Summary
Constructors Modifier Constructor Description protected
JCEECPrivateKey()
(package private)
JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, ECParameterSpec spec)
(package private)
JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeySpec spec)
(package private)
JCEECPrivateKey(PrivateKeyInfo info)
(package private)
JCEECPrivateKey(ECPrivateKey key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlgorithm()
DEREncodable
getBagAttribute(DERObjectIdentifier oid)
java.util.Enumeration
getBagAttributeKeys()
java.math.BigInteger
getD()
return the private value D.byte[]
getEncoded()
Return a PKCS8 representation of the key.java.lang.String
getFormat()
return the encoding format we produce in getEncoded().ECParameterSpec
getParams()
return a parameter specification representing the EC domain parameters for the key.void
setBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)
-
-
-
Field Detail
-
algorithm
private java.lang.String algorithm
-
d
private java.math.BigInteger d
-
ecSpec
private ECParameterSpec ecSpec
-
pkcs12Attributes
private java.util.Hashtable pkcs12Attributes
-
pkcs12Ordering
private java.util.Vector pkcs12Ordering
-
-
Constructor Detail
-
JCEECPrivateKey
protected JCEECPrivateKey()
-
JCEECPrivateKey
JCEECPrivateKey(ECPrivateKey key)
-
JCEECPrivateKey
JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeySpec spec)
-
JCEECPrivateKey
JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, ECParameterSpec spec)
-
JCEECPrivateKey
JCEECPrivateKey(PrivateKeyInfo info)
-
-
Method Detail
-
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithm
in interfacejava.security.Key
-
getFormat
public java.lang.String getFormat()
return the encoding format we produce in getEncoded().- Specified by:
getFormat
in interfacejava.security.Key
- Returns:
- the string "PKCS#8"
-
getEncoded
public byte[] getEncoded()
Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.- Specified by:
getEncoded
in interfacejava.security.Key
- Returns:
- a PKCS8 representation of the key.
-
getParams
public ECParameterSpec getParams()
Description copied from interface:ECKey
return a parameter specification representing the EC domain parameters for the key.
-
getD
public java.math.BigInteger getD()
Description copied from interface:ECPrivateKey
return the private value D.- Specified by:
getD
in interfaceECPrivateKey
-
setBagAttribute
public void setBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)
- Specified by:
setBagAttribute
in interfacePKCS12BagAttributeCarrier
-
getBagAttribute
public DEREncodable getBagAttribute(DERObjectIdentifier oid)
- Specified by:
getBagAttribute
in interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
public java.util.Enumeration getBagAttributeKeys()
- Specified by:
getBagAttributeKeys
in interfacePKCS12BagAttributeCarrier
-
-