

def _A1(params, password):
    algorithm = params.get('algorithm', MD5)
    H = DIGEST_AUTH_ENCODERS[algorithm]
    if (algorithm == MD5):
        return ('%s:%s:%s' % (params['username'], params['realm'], password))
    elif (algorithm == MD5_SESS):
        h_a1 = H(('%s:%s:%s' % (params['username'], params['realm'], password)))
        return ('%s:%s:%s' % (h_a1, params['nonce'], params['cnonce']))

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/lib/httpauth.py _A1/original