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:
-
Field Summary
Fields inherited from interface java.security.interfaces.ECPrivateKey
serialVersionUIDFields inherited from interface java.security.PrivateKey
serialVersionUID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJCEECPrivateKey(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) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetD()return the private value D.byte[]Return a PKCS8 representation of the key.return the encoding format we produce in getEncoded().return a parameter specification representing the EC domain parameters for the key.getS()booleaninthashCode()voidsetBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute) voidsetFriendlyName(String friendlyName) voidsetPointFormat(String style) Set the formatting for encoding of points.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
JCEECPrivateKey
protected JCEECPrivateKey() -
JCEECPrivateKey
-
JCEECPrivateKey
-
JCEECPrivateKey
-
JCEECPrivateKey
-
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec) -
JCEECPrivateKey
public JCEECPrivateKey(String algorithm, ECPrivateKeyParameters params, JCEECPublicKey pubKey, ECParameterSpec spec) -
JCEECPrivateKey
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
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:
getEncodedin interfaceKey- Returns:
- a PKCS8 representation of the key.
-
getParams
-
getParameters
Description copied from interface:ECKeyreturn a parameter specification representing the EC domain parameters for the key.- Specified by:
getParametersin interfaceECKey
-
getS
- Specified by:
getSin interfaceECPrivateKey
-
getD
Description copied from interface:ECPrivateKeyreturn the private value D.- Specified by:
getDin interfaceECPrivateKey
-
setBagAttribute
- Specified by:
setBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttribute
- Specified by:
getBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
- Specified by:
getBagAttributeKeysin interfacePKCS12BagAttributeCarrier
-
hasFriendlyName
public boolean hasFriendlyName()- Specified by:
hasFriendlyNamein interfacePKCS12BagAttributeCarrier
-
setFriendlyName
- Specified by:
setFriendlyNamein interfacePKCS12BagAttributeCarrier
-
setPointFormat
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
-
hashCode
public int hashCode() -
toString
-