Class AsymmetricECPrivateKey
java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricECKey
org.bouncycastle.crypto.asymmetric.AsymmetricECPrivateKey
- All Implemented Interfaces:
Destroyable
,AsymmetricKey
,AsymmetricPrivateKey
,Key
Class for Elliptic Curve (EC) private keys.
-
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricECPrivateKey
(Algorithm ecAlg, byte[] encoding) AsymmetricECPrivateKey
(Algorithm ecAlg, PrivateKeyInfo privateKeyInfo) AsymmetricECPrivateKey
(Algorithm ecAlg, ECDomainParametersID domainParametersID, BigInteger s) AsymmetricECPrivateKey
(Algorithm ecAlg, ECDomainParametersID domainParametersID, BigInteger s, ECPoint w) AsymmetricECPrivateKey
(Algorithm ecAlg, ECDomainParameters domainParameters, BigInteger s) AsymmetricECPrivateKey
(Algorithm ecAlg, ECDomainParameters domainParameters, BigInteger s, ECPoint w) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
boolean
Return true if o is an equivalent key to this.final Algorithm
Return the algorithm this Elliptic Curve key is for.final ECDomainParameters
Return the Elliptic Curve domain parameters associated with this key.final byte[]
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.getS()
int
hashCode()
Return the hashCode for the key.boolean
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricECKey
checkApprovedOnlyModeStatus, isThreadCorrectMode, zeroize
-
Constructor Details
-
AsymmetricECPrivateKey
public AsymmetricECPrivateKey(Algorithm ecAlg, ECDomainParametersID domainParametersID, BigInteger s) -
AsymmetricECPrivateKey
-
AsymmetricECPrivateKey
public AsymmetricECPrivateKey(Algorithm ecAlg, ECDomainParameters domainParameters, BigInteger s, ECPoint w) -
AsymmetricECPrivateKey
public AsymmetricECPrivateKey(Algorithm ecAlg, ECDomainParametersID domainParametersID, BigInteger s, ECPoint w) -
AsymmetricECPrivateKey
-
AsymmetricECPrivateKey
-
-
Method Details
-
getEncoded
public final byte[] getEncoded()Description copied from interface:AsymmetricKey
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.- Specified by:
getEncoded
in interfaceAsymmetricKey
- Returns:
- an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
-
getAlgorithm
Return the algorithm this Elliptic Curve key is for.- Specified by:
getAlgorithm
in interfaceKey
- Overrides:
getAlgorithm
in classAsymmetricECKey
- Returns:
- the key's algorithm.
-
getDomainParameters
Return the Elliptic Curve domain parameters associated with this key.- Overrides:
getDomainParameters
in classAsymmetricECKey
- Returns:
- the EC domain parameters for the key.
-
getS
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceDestroyable
-
equals
Description copied from interface:Key
Return true if o is an equivalent key to this. -
hashCode
public int hashCode()Description copied from interface:Key
Return the hashCode for the key.
-