def get_ha1_dict(user_ha1_dict):
 def get_ha1(realm, username):
  return user_ha1_dict.get(user)
 return get_ha1

def get_ha1_dict ( user_ha1_dict ) : def get_ha1 ( realm , username ) : return user_ha1_dict . get ( user ) return get_ha1
returns a get_ha1 function which obtains a ha1 password hash from a dictionary of the form: {username : ha1} .