Top Description Fields Constructors Methods
org.bouncycastle.crypto.asymmetric

public final Class AsymmetricEdDSAPrivateKey

extends AsymmetricEdDSAKey
implements Destroyable, AsymmetricPrivateKey
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.AsymmetricPrivateKey, org.bouncycastle.crypto.AsymmetricKey, org.bouncycastle.crypto.Key, javax.security.auth.Destroyable
Imports
java.io.IOException, java.util.concurrent.atomic.AtomicBoolean, javax.security.auth.Destroyable, org.bouncycastle.asn1.ASN1Encodable, .ASN1OctetString, .ASN1Set, .DEROctetString, org.bouncycastle.asn1.edec.EdECObjectIdentifiers, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.crypto.Algorithm, .AsymmetricPrivateKey, org.bouncycastle.crypto.general.EdEC, org.bouncycastle.crypto.internal.Permissions, org.bouncycastle.util.Arrays

Edwards Curve Diffie-Hellman (XDH) private keys.

Field Summary

Modifier and TypeField and Description
private ASN1Set
private final AtomicBoolean
private int
private boolean
private final byte[]
private byte[]

Constructor Summary

AccessConstructor and Description
public
AsymmetricEdDSAPrivateKey(Algorithm algorithm, byte[] keyData, byte[] publicData)

public
AsymmetricEdDSAPrivateKey(byte[]
the DER encoding of the key.
encoding
)

Construct a key from an encoding of a PrivateKeyInfo.

public
AsymmetricEdDSAPrivateKey(PrivateKeyInfo
the PrivateKeyInfo containing the key.
keyInfo
)

Construct a key from a PrivateKeyInfo.

Method Summary

Modifier and TypeMethod and Description
private int
public void
destroy()

Overrides default javax.security.auth.Destroyable.destroy.

Destroy this Object.
public boolean
equals(Object
object to compare to.
o
)

Overrides java.lang.Object.equals.

Implements org.bouncycastle.crypto.Key.equals.

Return true if o is an equivalent key to this.
public byte[]
getEncoded()

Implements org.bouncycastle.crypto.AsymmetricKey.getEncoded.

Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
public byte[]
public byte[]
public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements org.bouncycastle.crypto.Key.hashCode.

Return the hashCode for the key.
public boolean
isDestroyed()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Determine if this Object has been destroyed.
Inherited from org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAKey:
checkApprovedOnlyModeStatusgetAlgorithmzeroize

Field Detail

attributesback to summary
private ASN1Set attributes
hasBeenDestroyedback to summary
private final AtomicBoolean hasBeenDestroyed
hashCodeback to summary
private int hashCode
hasPublicKeyback to summary
private boolean hasPublicKey
keyDataback to summary
private final byte[] keyData
publicDataback to summary
private byte[] publicData

Constructor Detail

AsymmetricEdDSAPrivateKeyback to summary
public AsymmetricEdDSAPrivateKey(Algorithm algorithm, byte[] keyData, byte[] publicData)
AsymmetricEdDSAPrivateKeyback to summary
public AsymmetricEdDSAPrivateKey(byte[] encoding) throws IOException

Construct a key from an encoding of a PrivateKeyInfo.

Parameters
encoding:byte[]

the DER encoding of the key.

AsymmetricEdDSAPrivateKeyback to summary
public AsymmetricEdDSAPrivateKey(PrivateKeyInfo keyInfo) throws IOException

Construct a key from a PrivateKeyInfo.

Parameters
keyInfo:PrivateKeyInfo

the PrivateKeyInfo containing the key.

Method Detail

calculateHashCodeback to summary
private int calculateHashCode()
destroyback to summary
public void destroy()

Overrides default javax.security.auth.Destroyable.destroy.

Doc from javax.security.auth.Destroyable.destroy.

Destroy this Object.

Sensitive information associated with this Object is destroyed or cleared. Subsequent calls to certain methods on this Object will result in an IllegalStateException being thrown.

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Implements org.bouncycastle.crypto.Key.equals.

Doc from org.bouncycastle.crypto.Key.equals.

Return true if o is an equivalent key to this.

Parameters
o:Object

object to compare to.

Returns:boolean

true if o is the same or equivalent key, false otherwise.

Annotations
@Override
getEncodedback to summary
public byte[] getEncoded()

Implements org.bouncycastle.crypto.AsymmetricKey.getEncoded.

Doc from org.bouncycastle.crypto.AsymmetricKey.getEncoded.

Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.

Returns:byte[]

an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.

getPublicDataback to summary
public byte[] getPublicData()
getSecretback to summary
public byte[] getSecret()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.bouncycastle.crypto.Key.hashCode.

Doc from org.bouncycastle.crypto.Key.hashCode.

Return the hashCode for the key.

Returns:int

the key's hashCode.

Annotations
@Override
isDestroyedback to summary
public boolean isDestroyed()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Doc from javax.security.auth.Destroyable.isDestroyed.

Determine if this Object has been destroyed.

Returns:boolean

true if this Object has been destroyed, false otherwise.