def parse_params(params):
    """
        Take Tor-formatted parameters, then returns a keyword-based dictionary
        of integers.

        For example, we use it to parse "params" fields:
            https://github.com/plcp/tor-scripts/blob/master/torspec/dir-spec-4d0d42f.txt#L1820

        :param str params: input params to be processed

        :returns: a dictionary with (param-name, param-integer-value) items
    """
    pairs = params.split(' ')
    content = dict()
    for key, value in [pair.split('=') for pair in pairs]:
        content[key] = int(value)
    return content