@Override
    public boolean equals(Object o) {
        if (o instanceof Hash) {
            Hash other = (Hash) o;
            return MessageDigest.isEqual(getBytes(), other.getBytes());
        }
        return false;
    }
Returns {@code true} if the specified object is a Hash and its {@link #getBytes byte array} is identical to
this Hash's byte array, {@code false} otherwise.

@param o the object (Hash) to check for equality.
@return {@code true} if the specified object is a Hash and its {@link #getBytes byte array} is identical to
this Hash's byte array, {@code false} otherwise.
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/AbstractHash.java