Q. Which function can be used to securely compare two strings to avoid timing attacks?

  • (A) == operator
  • (B) hmac.compare_digest()
  • (C) str.equals()
  • (D) compare()
πŸ’¬ Discuss
βœ… Correct Answer: (B) hmac.compare_digest()
Explanation: compare_digest provides constant time comparison to prevent timing attacks.
Explanation by: Mr. Dubey
compare_digest provides constant time comparison to prevent timing attacks.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
94
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
82%
Success Rate