Package org.bouncycastle.jce.provider
Class JCEECPrivateKey
- java.lang.Object
-
- org.bouncycastle.jce.provider.JCEECPrivateKey
-
- All Implemented Interfaces:
Serializable
,ECKey
,ECPrivateKey
,Key
,PrivateKey
,Destroyable
,ECKey
,ECPointEncoder
,ECPrivateKey
,PKCS12BagAttributeCarrier
public class JCEECPrivateKey extends Object implements ECPrivateKey, ECPrivateKey, PKCS12BagAttributeCarrier, ECPointEncoder
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface java.security.interfaces.ECPrivateKey
serialVersionUID
-
Fields inherited from interface java.security.PrivateKey
serialVersionUID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JCEECPrivateKey()
JCEECPrivateKey(String algorithm, ECPrivateKeySpec spec)
JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params)
JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec)
JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec)
JCEECPrivateKey(String algorithm, JCEECPrivateKey key)
JCEECPrivateKey(String algorithm, ECPrivateKeySpec spec)
JCEECPrivateKey(ECPrivateKey key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAlgorithm()
ASN1Encodable
getBagAttribute(ASN1ObjectIdentifier oid)
Enumeration
getBagAttributeKeys()
BigInteger
getD()
return the private value D.byte[]
getEncoded()
Return a PKCS8 representation of the key.String
getFormat()
return the encoding format we produce in getEncoded().ECParameterSpec
getParameters()
return a parameter specification representing the EC domain parameters for the key.ECParameterSpec
getParams()
BigInteger
getS()
int
hashCode()
void
setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)
void
setPointFormat(String style)
Set the formatting for encoding of points.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
-
-
-
Constructor Detail
-
JCEECPrivateKey
protected JCEECPrivateKey()
-
JCEECPrivateKey
public JCEECPrivateKey(ECPrivateKey key)
-
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, ECPrivateKeySpec spec)
-
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, ECPrivateKeySpec spec)
-
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, JCEECPrivateKey key)
-
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec)
-
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec)
-
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params)
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceKey
-
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:
getEncoded
in interfaceKey
- Returns:
- a PKCS8 representation of the key.
-
getParams
public ECParameterSpec getParams()
-
getParameters
public ECParameterSpec getParameters()
Description copied from interface:ECKey
return a parameter specification representing the EC domain parameters for the key.- Specified by:
getParameters
in interfaceECKey
-
getS
public BigInteger getS()
- Specified by:
getS
in interfaceECPrivateKey
-
getD
public BigInteger getD()
Description copied from interface:ECPrivateKey
return the private value D.- Specified by:
getD
in interfaceECPrivateKey
-
setBagAttribute
public void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)
- Specified by:
setBagAttribute
in interfacePKCS12BagAttributeCarrier
-
getBagAttribute
public ASN1Encodable getBagAttribute(ASN1ObjectIdentifier oid)
- Specified by:
getBagAttribute
in interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
public Enumeration getBagAttributeKeys()
- Specified by:
getBagAttributeKeys
in interfacePKCS12BagAttributeCarrier
-
setPointFormat
public void setPointFormat(String style)
Description copied from interface:ECPointEncoder
Set the formatting for encoding of points. If the String "UNCOMPRESSED" is passed in point compression will not be used. If the String "COMPRESSED" is passed point compression will be used. The default is "UNCOMPRESSED".- Specified by:
setPointFormat
in interfaceECPointEncoder
- Parameters:
style
- the style to use.
-
-