def _get_consent_id(self, requester, user_id, filtered_attr):
        """
        Get a hashed id based on requester, user id and filtered attributes

        :type requester: str
        :type user_id: str
        :type filtered_attr: dict[str, str]

        :param requester: The calling requester
        :param user_id: The authorized user id
        :param filtered_attr: a list containing all attributes to be sent
        :return: an id
        """

        filtered_attr_key_list = sorted(filtered_attr.keys())
        hash_str = ""
        for key in filtered_attr_key_list:
            _hash_value = "".join(sorted(filtered_attr[key]))
            hash_str += key + _hash_value
        id_string = "%s%s%s" % (requester, user_id, hash_str)
        return urlsafe_b64encode(hashlib.sha512(id_string.encode("utf-8")).hexdigest().encode("utf-8")).decode("utf-8")
Get a hashed id based on requester, user id and filtered attributes

        :type requester: str
        :type user_id: str
        :type filtered_attr: dict[str, str]

        :param requester: The calling requester
        :param user_id: The authorized user id
        :param filtered_attr: a list containing all attributes to be sent
        :return: an id