Class PublicKey
- java.lang.Object
-
- com.github.katenachain.crypto.AbstractKey
-
- com.github.katenachain.crypto.ED25519.PublicKey
-
public class PublicKey extends AbstractKey
PublicKey is an Ed25519 public key wrapper (32 bytes).
-
-
Field Summary
-
Fields inherited from class com.github.katenachain.crypto.AbstractKey
key
-
-
Constructor Summary
Constructors Constructor Description PublicKey(byte[] key)PublicKey constructor with byte[].
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanverify(byte[] message, byte[] sign)indicates if a message and a signature match.-
Methods inherited from class com.github.katenachain.crypto.AbstractKey
getKey
-
-
-
-
Method Detail
-
verify
public boolean verify(byte[] message, byte[] sign) throws InvalidKeyException, SignatureException, NoSuchAlgorithmExceptionindicates if a message and a signature match.- Parameters:
message- byte[]sign- byte[]- Returns:
- boolean boolean
- Throws:
InvalidKeyException- the invalid key exceptionSignatureException- the signature exceptionNoSuchAlgorithmException- the no such algorithm exception
-
-