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 TypeMethodDescriptionvoiddestroy()booleanReturn true if o is an equivalent key to this.final AlgorithmReturn the algorithm this Elliptic Curve key is for.final ECDomainParametersReturn 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()inthashCode()Return the hashCode for the key.booleanMethods 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:AsymmetricKeyReturn an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.- Specified by:
getEncodedin interfaceAsymmetricKey- Returns:
- an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
-
getAlgorithm
Return the algorithm this Elliptic Curve key is for.- Specified by:
getAlgorithmin interfaceKey- Overrides:
getAlgorithmin classAsymmetricECKey- Returns:
- the key's algorithm.
-
getDomainParameters
Return the Elliptic Curve domain parameters associated with this key.- Overrides:
getDomainParametersin classAsymmetricECKey- Returns:
- the EC domain parameters for the key.
-
getS
-
destroy
public void destroy()- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
equals
Description copied from interface:KeyReturn true if o is an equivalent key to this. -
hashCode
public int hashCode()Description copied from interface:KeyReturn the hashCode for the key.
-