public boolean equals(Object other) {
            if (other instanceof FileHash) {
                FileHash fh = (FileHash) other;
                if (hash != fh.hash || fileLength != fh.fileLength)
                    return false;
                if (digestBytes.length != fh.digestBytes.length)
                    return false;
                for (int i = digestBytes.length - 1; i >= 0; i--) {
                    if (digestBytes[i] != fh.digestBytes[i])
                        return false;
                }
                return true;
            }
            return false;
        }