Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Which function safely compares two hashes or tokens?

  1. A ==
  2. B strcmp()
  3. C hash_equals()
  4. D similar_text()
Answer

hash_equals()

hash_equals performs a timing-safe comparison, preventing an attacker from inferring the correct value from response times.

All Php MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as