Constant time string equals method - no time leakage
    :param a:
    :param b:
    :return:

def str_equals(a, b):
    """
    Constant time string equals method - no time leakage
    :param a:
    :param b:
    :return:
    """
    al = len(a)
    bl = len(b)
    match = True
    for i in xrange(0, min(al, bl)):
        match &= a[i] == b[i]
    return match