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)

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 )
if the "algorithm" directives value is "md5-sess" .