Class BCECPrivateKey
java.lang.Object
org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey
- All Implemented Interfaces:
Serializable,ECKey,ECPrivateKey,Key,PrivateKey,Destroyable,ECKey,ECPointEncoder,ECPrivateKey,PKCS12BagAttributeCarrier
public class BCECPrivateKey
extends Object
implements ECPrivateKey, ECPrivateKey, PKCS12BagAttributeCarrier, ECPointEncoder
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBCECPrivateKey(String algorithm, ECPrivateKeySpec spec, ProviderConfiguration configuration) BCECPrivateKey(String algorithm, ECPrivateKeyParameters params, BCECPublicKey pubKey, ECParameterSpec spec, ProviderConfiguration configuration) BCECPrivateKey(String algorithm, ECPrivateKeyParameters params, BCECPublicKey pubKey, ECParameterSpec spec, ProviderConfiguration configuration) BCECPrivateKey(String algorithm, ECPrivateKeyParameters params, ProviderConfiguration configuration) BCECPrivateKey(String algorithm, BCECPrivateKey key) BCECPrivateKey(String algorithm, ECPrivateKeySpec spec, ProviderConfiguration configuration) BCECPrivateKey(ECPrivateKey key, ProviderConfiguration configuration) -
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
-
BCECPrivateKey
protected BCECPrivateKey() -
BCECPrivateKey
-
BCECPrivateKey
-
BCECPrivateKey
-
BCECPrivateKey
-
BCECPrivateKey
public BCECPrivateKey(String algorithm, ECPrivateKeyParameters params, BCECPublicKey pubKey, ECParameterSpec spec, ProviderConfiguration configuration) -
BCECPrivateKey
public BCECPrivateKey(String algorithm, ECPrivateKeyParameters params, BCECPublicKey pubKey, ECParameterSpec spec, ProviderConfiguration configuration) -
BCECPrivateKey
public BCECPrivateKey(String algorithm, ECPrivateKeyParameters params, ProviderConfiguration configuration)
-
-
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.
-
engineGetKeyParameters
-
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
-