Use has_equals() for validating API request
Introduce hash_equals() function if it doesn't exist