class Ed25519Verify implements PublicKeyVerify {

  @Override
  public void verify(byte[] signature, byte[] data) throws GeneralSecurityException {
    if (signature.length != SIGNATURE_LEN) {
      throw new GeneralSecurityException(
          String.format("The length of the signature is not %s.", SIGNATURE_LEN));
    }
    if (!Ed25519.verify(data, signature, publicKey.getBytes())) {
      throw new GeneralSecurityException("Signature check failed.");
    }
  }

  public  Ed25519Verify(final byte[] publicKey);

}