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
IPublicKey
encryptMessage
in interface IPublicKey
input
- 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)
IPublicKey
verifySignature
in interface IPublicKey
message
- The message which was signedsignature
- The signature of this messagepublic boolean equals(java.lang.Object obj)
IPublicKey
equals
in interface IPublicKey
equals
in class java.lang.Object
obj
- 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