(params, password)
return _A1(params_copy, password)
If the "algorithm" directive's value is "MD5-sess", then A1
    [the session key] is calculated only once - on the first request by the
    client following receipt of a WWW-Authenticate challenge from the server.

    This creates a 'session key' for the authentication of subsequent
    requests and responses which is different for each "authentication
    session", thus limiting the amount of material hashed with any one
    key.

    Because the server need only use the hash of the user
    credentials in order to create the A1 value, this construction could
    be used in conjunction with a third party authentication service so
    that the web server would not need the actual password value.  The
    specification of such a protocol is beyond the scope of this
    specification.
If the "algorithm" directive's value is "MD5-sess", then A1
    [the session key] is calculated only once - on the first request by the
    client following receipt of a WWW-Authenticate challenge from the server.
If the algorithm directive s value is MD5 - sess then A1 [ the session key ] is calculated only once - on the first request by the client following receipt of a WWW - Authenticate challenge from the server .
def md5SessionKey(params, password):
    """
    If the "algorithm" directive's value is "MD5-sess", then A1
    [the session key] is calculated only once - on the first request by the
    client following receipt of a WWW-Authenticate challenge from the server.

    This creates a 'session key' for the authentication of subsequent
    requests and responses which is different for each "authentication
    session", thus limiting the amount of material hashed with any one
    key.

    Because the server need only use the hash of the user
    credentials in order to create the A1 value, this construction could
    be used in conjunction with a third party authentication service so
    that the web server would not need the actual password value.  The
    specification of such a protocol is beyond the scope of this
    specification.
"""

    keys = ("username", "realm", "nonce", "cnonce")
    params_copy = {}
    for key in keys:
        params_copy[key] = params[key]

    params_copy["algorithm"] = MD5_SESS
    return _A1(params_copy, password)
def md5SessionKey ( params , password ) : keys = ( "username" , "realm" , "nonce" , "cnonce" ) params_copy = { } for key in keys : params_copy [ key ] = params [ key ] params_copy [ "algorithm" ] = MD5_SESS return _A1 ( params_copy , password )