Class AsymmetricEdDSAPrivateKey
java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAKey
org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAPrivateKey
- All Implemented Interfaces:
Destroyable
,AsymmetricKey
,AsymmetricPrivateKey
,Key
public final class AsymmetricEdDSAPrivateKey
extends AsymmetricEdDSAKey
implements AsymmetricPrivateKey
Edwards Curve Diffie-Hellman (EdDSA) private keys.
-
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricEdDSAPrivateKey
(byte[] encoding) Construct a key from an encoding of a PrivateKeyInfo.AsymmetricEdDSAPrivateKey
(PrivateKeyInfo keyInfo) Construct a key from a PrivateKeyInfo.AsymmetricEdDSAPrivateKey
(Algorithm algorithm, byte[] keyData, byte[] publicData) -
Method Summary
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAKey
checkApprovedOnlyModeStatus, getAlgorithm, isThreadCorrectMode, zeroize
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bouncycastle.crypto.Key
getAlgorithm
-
Constructor Details
-
AsymmetricEdDSAPrivateKey
-
AsymmetricEdDSAPrivateKey
Construct a key from an encoding of a PrivateKeyInfo.- Parameters:
encoding
- the DER encoding of the key.- Throws:
IOException
-
AsymmetricEdDSAPrivateKey
Construct a key from a PrivateKeyInfo.- Parameters:
keyInfo
- the PrivateKeyInfo containing the key.- Throws:
IOException
-
-
Method Details
-
getSecret
public byte[] getSecret() -
getPublicData
public byte[] getPublicData() -
getEncoded
public 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.
-
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.
-