Constant-time string equality
Your task
Implement a constant-time string equality check used to compare secrets (tokens, MACs) without leaking timing. Given two strings a and b, return True if they are equal. Your comparison must not short-circuit on the first differing character; if the lengths differ you may return False immediately (length is not secret here). Do not use Python's built-in ==, hmac, or secrets comparison helpers.
Examples
constant_time_equal(a: str, b: str) -> boolExample 1
Input
constant_time_equal("abc", "abc")Output
True