Class AsymmetricEdDSAPrivateKey
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAKey
-
- org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAPrivateKey
-
- All Implemented Interfaces:
javax.security.auth.Destroyable
,AsymmetricKey
,AsymmetricPrivateKey
,Key
public final class AsymmetricEdDSAPrivateKey extends AsymmetricEdDSAKey implements javax.security.auth.Destroyable, AsymmetricPrivateKey
Edwards Curve Diffie-Hellman (XDH) private keys.
-
-
Constructor Summary
Constructors Constructor Description AsymmetricEdDSAPrivateKey(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
boolean
equals(java.lang.Object o)
Return true if o is an equivalent key to this.byte[]
getEncoded()
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.byte[]
getPublicData()
byte[]
getSecret()
int
hashCode()
Return the hashCode for the key.boolean
isDestroyed()
-
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAKey
checkApprovedOnlyModeStatus, getAlgorithm, 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 Detail
-
AsymmetricEdDSAPrivateKey
public AsymmetricEdDSAPrivateKey(Algorithm algorithm, byte[] keyData, byte[] publicData)
-
AsymmetricEdDSAPrivateKey
public AsymmetricEdDSAPrivateKey(byte[] encoding) throws java.io.IOException
Construct a key from an encoding of a PrivateKeyInfo.- Parameters:
encoding
- the DER encoding of the key.- Throws:
java.io.IOException
-
AsymmetricEdDSAPrivateKey
public AsymmetricEdDSAPrivateKey(PrivateKeyInfo keyInfo) throws java.io.IOException
Construct a key from a PrivateKeyInfo.- Parameters:
keyInfo
- the PrivateKeyInfo containing the key.- Throws:
java.io.IOException
-
-
Method Detail
-
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 interfacejavax.security.auth.Destroyable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interfacejavax.security.auth.Destroyable
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:Key
Return true if o is an equivalent key to this.
-
-