class KeyRefresher {

    protected boolean haveFilesBeenChanged(final String filePath, byte[] checksum) {

        // if we don't have an absolute path for our file path then it
        // was retrieved from our resource and as such there is no need
        // to check to see if it was changed or not.

        final Path path = Paths.get(filePath);
        if (!path.isAbsolute()) {
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("Relative path: {} specified - ignoring change check", filePath);
            }
            return false;
        }

        try (InputStream is = Files.newInputStream(path);
             DigestInputStream digestInputStream = new DigestInputStream(is, md)) {
            //noinspection StatementWithEmptyBody
            while (digestInputStream.read() != -1) {
                // do nothing, just read until the EoF
            }
        } catch (IOException ex) {
            //this is best effort, if we couldn't read the file, assume its the same
            LOGGER.warn("Error reading file " + filePath, ex);
            return false;
        }
        byte[] digest = md.digest();
        if (!Arrays.equals(checksum, digest)) {
            //they aren't the same, overwrite old checksum
            System.arraycopy(digest, 0, checksum, 0, digest.length);
            return true;
        }
        return false;
    }

    public  KeyRefresher(final String athenzPublicCert, final String athenzPrivateKey, final TrustStore trustStore,
            final KeyManagerProxy keyManagerProxy, final TrustManagerProxy trustManagerProxy);
    public  KeyRefresher(final String athenzPublicCert, final String athenzPrivateKey, final TrustStore trustStore,
                        final KeyManagerProxy keyManagerProxy, final TrustManagerProxy trustManagerProxy,
                        final KeyRefresherListener keyRefresherListener);

}