.. index:: pair: class; EE::System::Base64 .. _doxid-class_e_e_1_1_system_1_1_base64: class EE::System::Base64 ======================== .. toctree:: :hidden: enum_EE_System_Base64_DecodeMode.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class Base64 { public: // enums enum :ref:`DecodeMode`; // methods static size_t :ref:`encode`(size_t in_len, const unsigned char* in, size_t out_len, char* out); static size_t :ref:`decode`(size_t in_len, const char* in, size_t out_len, unsigned char* out); static size_t :ref:`decode`(size_t in_len, const char* in, size_t out_len, unsigned char* out, :ref:`DecodeMode` mode); static bool :ref:`encode`(std::string_view in, std::string& out); static size_t :ref:`decode`(std::string_view in, std::string& out); static size_t :ref:`decode`(std::string_view in, std::string& out, :ref:`DecodeMode` mode); static size_t :ref:`encodeSafeOutLen`(size_t in_len); static size_t :ref:`decodeSafeOutLen`(size_t in_len); }; .. _details-class_e_e_1_1_system_1_1_base64: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; encode .. _doxid-class_e_e_1_1_system_1_1_base64_1acc2c36115768ce8bfe9d6d52006b066a: .. ref-code-block:: cpp :class: doxyrest-title-code-block static size_t encode(size_t in_len, const unsigned char* in, size_t out_len, char* out) Encode binary data into base64 digits with MIME style === pads .. rubric:: Returns: The final length of the output .. index:: pair: function; decode .. _doxid-class_e_e_1_1_system_1_1_base64_1afc2822b469f6aa38b847869263b73020: .. ref-code-block:: cpp :class: doxyrest-title-code-block static size_t decode(size_t in_len, const char* in, size_t out_len, unsigned char* out) Decode base64 digits with MIME style === pads into binary data. Preserves the historical behavior of ignoring ASCII whitespace. .. rubric:: Returns: The final length of the output .. index:: pair: function; decode .. _doxid-class_e_e_1_1_system_1_1_base64_1a82af9a7020ada69e7ed58be7393dc0ae: .. ref-code-block:: cpp :class: doxyrest-title-code-block static size_t decode(size_t in_len, const char* in, size_t out_len, unsigned char* out, :ref:`DecodeMode` mode) Decode base64 digits with MIME style === pads into binary data. :ref:`DecodeMode::NoWhitespace ` avoids all whitespace handling and enables the fastest path. .. rubric:: Returns: The final length of the output .. index:: pair: function; encode .. _doxid-class_e_e_1_1_system_1_1_base64_1a00aa935482564e533dce811cfecaeec3: .. ref-code-block:: cpp :class: doxyrest-title-code-block static bool encode(std::string_view in, std::string& out) Encodes a string into a base64 string .. rubric:: Returns: True if encoding was successful .. index:: pair: function; decode .. _doxid-class_e_e_1_1_system_1_1_base64_1a5e54a9618ef3c1a64677f0d24cc2d01f: .. ref-code-block:: cpp :class: doxyrest-title-code-block static size_t decode(std::string_view in, std::string& out) Decodes a base64 string to a string, ignoring ASCII whitespace. .. rubric:: Returns: The final length of the output, or size_t(-1) on truncation .. index:: pair: function; decode .. _doxid-class_e_e_1_1_system_1_1_base64_1a4bc62be8a401ba67ea1ead7e901b51be: .. ref-code-block:: cpp :class: doxyrest-title-code-block static size_t decode(std::string_view in, std::string& out, :ref:`DecodeMode` mode) Decodes a base64 string to a string. .. rubric:: Returns: The final length of the output, or size_t(-1) on truncation .. index:: pair: function; encodeSafeOutLen .. _doxid-class_e_e_1_1_system_1_1_base64_1ab762394affc531cf47ba30b534b8bd4a: .. ref-code-block:: cpp :class: doxyrest-title-code-block static size_t encodeSafeOutLen(size_t in_len) .. rubric:: Returns: A safe encoding output length for an input of the length indicated .. index:: pair: function; decodeSafeOutLen .. _doxid-class_e_e_1_1_system_1_1_base64_1ac1ae4d075df7864a6d1f806638930cd9: .. ref-code-block:: cpp :class: doxyrest-title-code-block static size_t decodeSafeOutLen(size_t in_len) .. rubric:: Returns: A safe decoding output length for an input of the length indicated