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

public final Class AsymmetricEdDSAPublicKey

extends AsymmetricEdDSAKey
implements AsymmetricPublicKey
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.AsymmetricPublicKey, org.bouncycastle.crypto.AsymmetricKey, org.bouncycastle.crypto.Key
Imports
org.bouncycastle.crypto.Algorithm, .AsymmetricPublicKey, org.bouncycastle.crypto.general.EdEC, org.bouncycastle.util.Arrays, org.bouncycastle.util.encoders.Hex

Edwards Curve Diffie-Hellman (XDH) public keys.

Field Summary

Modifier and TypeField and Description
private static final byte
pack-priv static final byte[]
private static final byte
pack-priv static final byte[]
private final int
private final byte[]

Constructor Summary

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

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

Construct a key from an encoding of a SubjectPublicKeyInfo.

Method Summary

Modifier and TypeMethod and Description
private int
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 int
hashCode()

Overrides java.lang.Object.hashCode.

Implements org.bouncycastle.crypto.Key.hashCode.

Return the hashCode for the key.
Inherited from org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAKey:
checkApprovedOnlyModeStatusgetAlgorithmzeroize

Field Detail

Ed25519_typeback to summary
private static final byte Ed25519_type
Ed25519Prefixback to summary
pack-priv static final byte[] Ed25519Prefix
Ed448_typeback to summary
private static final byte Ed448_type
Ed448Prefixback to summary
pack-priv static final byte[] Ed448Prefix
hashCodeback to summary
private final int hashCode
keyDataback to summary
private final byte[] keyData

Constructor Detail

AsymmetricEdDSAPublicKeyback to summary
public AsymmetricEdDSAPublicKey(Algorithm algorithm, byte[] keyData)
AsymmetricEdDSAPublicKeyback to summary
public AsymmetricEdDSAPublicKey(byte[] encoding)

Construct a key from an encoding of a SubjectPublicKeyInfo.

Parameters
encoding:byte[]

the DER encoding of the key.

Method Detail

calculateHashCodeback to summary
private int calculateHashCode()
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()
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