import base64


def b64urlencode(message):
    """
    This function performs url safe base64 encoding.
    :param message: Message to encode,
    :return: Encoded string.
    """
    return base64.urlsafe_b64encode(message)