code: @Override
      public void verify(Context context, Path file) throws VerifyException, IOException {
          String expectedSha512sum;
          try {
              if (context.sha512sum == null) {
                  log.debug("No sha512 checksum specified, skipping verification");
                  return;
              } else if (context.sha512sum.equalsIgnoreCase(".sha512")) {
                  String url = context.url.substring(0, context.url.lastIndexOf(".")) + ".sha512";
                  expectedSha512sum = getUrlContents(url).split(" ")[0].trim();
              } else if (context.sha512sum.startsWith("http")) {
                  expectedSha512sum = getUrlContents(context.sha512sum).split(" ")[0].trim();
              } else {
                  expectedSha512sum = context.sha512sum;
              }
          } catch (IOException e) {
              throw new VerifyException(e, "SHA512 checksum verification failed, could not download SHA512 file ({})", context.sha512sum);
          }
  
          log.debug("Verifying sha512 checksum of file {}", file.getFileName());
          String actualSha512sum = DigestUtils.sha512Hex(Files.newInputStream(file));
          if (actualSha512sum.equalsIgnoreCase(expectedSha512sum)) {
              log.debug("Checksum OK");
              return;
          }
          throw new VerifyException("SHA512 checksum of downloaded file " + file.getFileName()
                  + " does not match that from plugin descriptor. Got " + actualSha512sum
                  + " but expected " + expectedSha512sum);
      }
docs: Verifies a plugin release according to certain rules
  
  @param context the file verifier context object
  @param file    the path to the downloaded file itself
  @throws IOException     if there was a problem accessing file
  @throws VerifyException in case of problems verifying the file