Use standard `hash_equals()`for security->compare(), fix test