@staticmethod<EOL><INDENT>def text_base64encode(data):<DEDENT>
_validate_message_type_text(data)<EOL>return b64encode(data.encode('<STR_LIT:utf-8>')).decode('<STR_LIT:utf-8>')<EOL>
Base64 encode unicode text.

:param str data: String to encode.
:return: Base64 encoded string.
:rtype: str