public class BCECPrivateKey extends java.lang.Object implements java.security.interfaces.ECPrivateKey, ECPrivateKey, PKCS12BagAttributeCarrier, ECPointEncoder
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
algorithm |
private PKCS12BagAttributeCarrierImpl |
attrCarrier |
private ProviderConfiguration |
configuration |
private java.math.BigInteger |
d |
private java.security.spec.ECParameterSpec |
ecSpec |
private DERBitString |
publicKey |
(package private) static long |
serialVersionUID |
private boolean |
withCompression |
Modifier | Constructor and Description |
---|---|
protected |
BCECPrivateKey() |
|
BCECPrivateKey(java.security.interfaces.ECPrivateKey key,
ProviderConfiguration configuration) |
|
BCECPrivateKey(java.lang.String algorithm,
BCECPrivateKey key) |
|
BCECPrivateKey(java.lang.String algorithm,
ECPrivateKeyParameters params,
BCECPublicKey pubKey,
java.security.spec.ECParameterSpec spec,
ProviderConfiguration configuration) |
|
BCECPrivateKey(java.lang.String algorithm,
ECPrivateKeyParameters params,
BCECPublicKey pubKey,
ECParameterSpec spec,
ProviderConfiguration configuration) |
|
BCECPrivateKey(java.lang.String algorithm,
ECPrivateKeyParameters params,
ProviderConfiguration configuration) |
|
BCECPrivateKey(java.lang.String algorithm,
ECPrivateKeySpec spec,
ProviderConfiguration configuration) |
|
BCECPrivateKey(java.lang.String algorithm,
java.security.spec.ECPrivateKeySpec spec,
ProviderConfiguration configuration) |
(package private) |
BCECPrivateKey(java.lang.String algorithm,
PrivateKeyInfo info,
ProviderConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
(package private) ECParameterSpec |
engineGetSpec() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAlgorithm() |
ASN1Encodable |
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 |
getParameters()
return a parameter specification representing the EC domain parameters
for the key.
|
java.security.spec.ECParameterSpec |
getParams() |
private DERBitString |
getPublicKeyDetails(BCECPublicKey pub) |
java.math.BigInteger |
getS() |
int |
hashCode() |
private void |
populateFromPrivKeyInfo(PrivateKeyInfo info) |
private void |
readObject(java.io.ObjectInputStream in) |
void |
setBagAttribute(ASN1ObjectIdentifier oid,
ASN1Encodable attribute) |
void |
setPointFormat(java.lang.String style)
Set the formatting for encoding of points.
|
java.lang.String |
toString() |
private void |
writeObject(java.io.ObjectOutputStream out) |
static final long serialVersionUID
private java.lang.String algorithm
private boolean withCompression
private transient java.math.BigInteger d
private transient java.security.spec.ECParameterSpec ecSpec
private transient ProviderConfiguration configuration
private transient DERBitString publicKey
private transient PKCS12BagAttributeCarrierImpl attrCarrier
protected BCECPrivateKey()
public BCECPrivateKey(java.security.interfaces.ECPrivateKey key, ProviderConfiguration configuration)
public BCECPrivateKey(java.lang.String algorithm, ECPrivateKeySpec spec, ProviderConfiguration configuration)
public BCECPrivateKey(java.lang.String algorithm, java.security.spec.ECPrivateKeySpec spec, ProviderConfiguration configuration)
public BCECPrivateKey(java.lang.String algorithm, BCECPrivateKey key)
public BCECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, BCECPublicKey pubKey, java.security.spec.ECParameterSpec spec, ProviderConfiguration configuration)
public BCECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, BCECPublicKey pubKey, ECParameterSpec spec, ProviderConfiguration configuration)
public BCECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, ProviderConfiguration configuration)
BCECPrivateKey(java.lang.String algorithm, PrivateKeyInfo info, ProviderConfiguration configuration) throws java.io.IOException
java.io.IOException
private void populateFromPrivKeyInfo(PrivateKeyInfo info) throws java.io.IOException
java.io.IOException
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public java.security.spec.ECParameterSpec getParams()
public ECParameterSpec getParameters()
ECKey
getParameters
in interface ECKey
ECParameterSpec engineGetSpec()
public java.math.BigInteger getS()
public java.math.BigInteger getD()
ECPrivateKey
getD
in interface ECPrivateKey
public void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)
setBagAttribute
in interface PKCS12BagAttributeCarrier
public ASN1Encodable getBagAttribute(DERObjectIdentifier oid)
getBagAttribute
in interface PKCS12BagAttributeCarrier
public java.util.Enumeration getBagAttributeKeys()
getBagAttributeKeys
in interface PKCS12BagAttributeCarrier
public void setPointFormat(java.lang.String style)
ECPointEncoder
setPointFormat
in interface ECPointEncoder
style
- the style to use.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
private DERBitString getPublicKeyDetails(BCECPublicKey pub)
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException