Class AsymmetricXDHPublicKey
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.AsymmetricXDHKey
-
- org.bouncycastle.crypto.asymmetric.AsymmetricXDHPublicKey
-
- All Implemented Interfaces:
AsymmetricKey
,AsymmetricPublicKey
,Key
public final class AsymmetricXDHPublicKey extends AsymmetricXDHKey implements AsymmetricPublicKey
Edwards Curve Diffie-Hellman (XDH) public keys.
-
-
Constructor Summary
Constructors Constructor Description AsymmetricXDHPublicKey(byte[] encoding)
Construct a key from an encoding of a SubjectPublicKeyInfo.AsymmetricXDHPublicKey(Algorithm algorithm, byte[] keyData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
int
hashCode()
Return the hashCode for the key.-
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricXDHKey
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
-
AsymmetricXDHPublicKey
public AsymmetricXDHPublicKey(Algorithm algorithm, byte[] keyData)
-
AsymmetricXDHPublicKey
public AsymmetricXDHPublicKey(byte[] encoding)
Construct a key from an encoding of a SubjectPublicKeyInfo.- Parameters:
encoding
- the DER encoding of the key.
-
-
Method Detail
-
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.
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:Key
Return true if o is an equivalent key to this.
-
-