import base64


def filter_b64encode(param):
    """
    Encode string as base64
    F.e. ::

        - http:
              post:
                url: '{{ auth_service }}/oauth/token'
                headers: {Authorization: '{{ admin_token | b64encode }}'}

    :param param: data to convert
    """
    return base64.b64encode(param.encode('utf-8')).decode('utf-8')