def secure_compare(string1, string2):
    if len(string1) != len(string2):
        return False
    result = True
    for c1, c2 in izip(string1, string2):
        result &= c1 == c2
    return result
Compare two strings while protecting against timing attacks
dataset/ETHPy150Open balanced/status.balancedpayments.com/venv/lib/python2.7/site-packages/twilio/util.py/secure_compare