public class ECCPublicKey extends java.lang.Object implements IPublicKey
| Constructor and Description |
|---|
ECCPublicKey(java.security.cert.X509Certificate certificate)
Creates a new ECC public key.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encryptMessage(byte[] input)
Encrypts a message with this public key.
|
boolean |
equals(java.lang.Object obj)
Every public key has to implement a comparison operator.
|
int |
hashCode() |
boolean |
verifySignature(byte[] message,
byte[] signature)
Use this public key to verify a signature.
|
public ECCPublicKey(java.security.cert.X509Certificate certificate)
publicKey - The public key parameters which are used for verifying signatures. This ECPublicKeyParameters-object is created using the Bouncycastle library.public byte[] encryptMessage(byte[] input)
throws java.io.IOException
IPublicKeyencryptMessage in interface IPublicKeyinput - The message which should be encryptedjava.io.IOException - If not enough memory is available or if a key could not be read, this exception occurspublic boolean verifySignature(byte[] message,
byte[] signature)
IPublicKeyverifySignature in interface IPublicKeymessage - The message which was signedsignature - The signature of this messagepublic boolean equals(java.lang.Object obj)
IPublicKeyequals in interface IPublicKeyequals in class java.lang.Objectobj - The object of the type AbstractCertificate that should be compared to the current public keyObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.Object