Use hmac compare_digest method in hashutil module to mitigate potential timing attacks