Samchon Framework for CPP  1.0.0
samchon::library::Base64 Class Reference

Utility class for base64 format's en-decoding. More...

#include <Base64.hpp>

Static Public Member Functions

template<typename Container >
static auto encode (const Container &byte_array) -> std::string
 Encode from binary data to base64-string. More...
 
static auto decode (const std::string &str) -> ByteArray
 Decode from base64-string to binary data. More...
 

Detailed Description

Utility class for base64 format's en-decoding.

Base64 supports

  • Encoding from binary data to base64-string
  • Decoding from base64-string to binary data
library_string.png
See also
samchon::library
Author
Jeongho Nam http://samchon.org

Definition at line 26 of file Base64.hpp.

Member Function Documentation

template<typename Container >
static auto samchon::library::Base64::encode ( const Container &  byte_array) -> std::string
inlinestatic

Encode from binary data to base64-string.

Encodes a binary data to base64-string

Parameters
byte_arraybinary data you want to encode
Returns
A base64-string encoded from binary data

Definition at line 37 of file Base64.hpp.

static auto samchon::library::Base64::decode ( const std::string &  str) -> ByteArray
inlinestatic

Decode from base64-string to binary data.

Decodes a base64 encoded string to binary data

Note
If the encoded string is not whole but a part of the binary data, Base64Decoder will be better
Parameters
strA encoded string representing binary data as base64 format
Returns
A binary data decoded from string

Definition at line 107 of file Base64.hpp.


The documentation for this class was generated from the following file: