Package org.bouncycastle.jce.provider
Class JCEECPrivateKey
- java.lang.Object
 - 
- org.bouncycastle.jce.provider.JCEECPrivateKey
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,java.security.interfaces.ECKey,java.security.interfaces.ECPrivateKey,java.security.Key,java.security.PrivateKey,javax.security.auth.Destroyable,ECKey,ECPointEncoder,ECPrivateKey,PKCS12BagAttributeCarrier
public class JCEECPrivateKey extends java.lang.Object implements java.security.interfaces.ECPrivateKey, ECPrivateKey, PKCS12BagAttributeCarrier, ECPointEncoder
- See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedJCEECPrivateKey()JCEECPrivateKey(java.lang.String algorithm, java.security.spec.ECPrivateKeySpec spec)JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params)JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, java.security.spec.ECParameterSpec spec)JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec)JCEECPrivateKey(java.lang.String algorithm, JCEECPrivateKey key)JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeySpec spec)JCEECPrivateKey(java.security.interfaces.ECPrivateKey key) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetAlgorithm()ASN1EncodablegetBagAttribute(ASN1ObjectIdentifier oid)java.util.EnumerationgetBagAttributeKeys()java.math.BigIntegergetD()return the private value D.byte[]getEncoded()Return a PKCS8 representation of the key.java.lang.StringgetFormat()return the encoding format we produce in getEncoded().ECParameterSpecgetParameters()return a parameter specification representing the EC domain parameters for the key.java.security.spec.ECParameterSpecgetParams()java.math.BigIntegergetS()inthashCode()voidsetBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)voidsetPointFormat(java.lang.String style)Set the formatting for encoding of points.java.lang.StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
JCEECPrivateKey
protected JCEECPrivateKey()
 
- 
JCEECPrivateKey
public JCEECPrivateKey(java.security.interfaces.ECPrivateKey key)
 
- 
JCEECPrivateKey
public JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeySpec spec) 
- 
JCEECPrivateKey
public JCEECPrivateKey(java.lang.String algorithm, java.security.spec.ECPrivateKeySpec spec) 
- 
JCEECPrivateKey
public JCEECPrivateKey(java.lang.String algorithm, JCEECPrivateKey key) 
- 
JCEECPrivateKey
public JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, java.security.spec.ECParameterSpec spec) 
- 
JCEECPrivateKey
public JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec) 
- 
JCEECPrivateKey
public JCEECPrivateKey(java.lang.String algorithm, ECPrivateKeyParameters params) 
 - 
 
- 
Method Detail
- 
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
 getAlgorithmin interfacejava.security.Key
 
- 
getFormat
public java.lang.String getFormat()
return the encoding format we produce in getEncoded().- Specified by:
 getFormatin 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:
 getEncodedin interfacejava.security.Key- Returns:
 - a PKCS8 representation of the key.
 
 
- 
getParams
public java.security.spec.ECParameterSpec getParams()
- Specified by:
 getParamsin interfacejava.security.interfaces.ECKey
 
- 
getParameters
public ECParameterSpec getParameters()
Description copied from interface:ECKeyreturn a parameter specification representing the EC domain parameters for the key.- Specified by:
 getParametersin interfaceECKey
 
- 
getS
public java.math.BigInteger getS()
- Specified by:
 getSin interfacejava.security.interfaces.ECPrivateKey
 
- 
getD
public java.math.BigInteger getD()
Description copied from interface:ECPrivateKeyreturn the private value D.- Specified by:
 getDin interfaceECPrivateKey
 
- 
setBagAttribute
public void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)
- Specified by:
 setBagAttributein interfacePKCS12BagAttributeCarrier
 
- 
getBagAttribute
public ASN1Encodable getBagAttribute(ASN1ObjectIdentifier oid)
- Specified by:
 getBagAttributein interfacePKCS12BagAttributeCarrier
 
- 
getBagAttributeKeys
public java.util.Enumeration getBagAttributeKeys()
- Specified by:
 getBagAttributeKeysin interfacePKCS12BagAttributeCarrier
 
- 
setPointFormat
public void setPointFormat(java.lang.String style)
Description copied from interface:ECPointEncoderSet 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:
 setPointFormatin interfaceECPointEncoder- Parameters:
 style- the style to use.
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -