def constant_time_compare(str_a, str_b):
    """
    Compare two strings, taking constant time
    """
    are_equal = len(str_a) == len(str_b)
    for a, b in zip(str_a, str_b):
        are_equal &= a == b
    return are_equal
