Q. Which function can be used to securely compare two strings to avoid timing attacks?
β
Correct Answer: (B)
hmac.compare_digest()
Explanation: compare_digest provides constant time comparison to prevent timing attacks.