Boost logo

Boost :

Subject: Re: [boost] Is Boost interested in the Boost-based Base64 library
From: Denis Shevchenko (for.dshevchenko_at_[hidden])
Date: 2011-06-09 16:44:51


We can extend this solution like this:

int main() {
     std::string my_text = "My text for encoding!";

     std::string encoded_text;
     boost::base64().encode( my_text, std::back_inserter( encoded_text ) );
     // Or like this:
     // boost::base64().encode( my_text, encoded_text );
     // or:
     // boost::base64().encode( my_text.begin()
     // , my_text.end()
     // , encoded_text );

     std::string my_text_again;
     boost::base64().decode( encoded_text, std::back_inserter(
my_text_again ) );
     // Or like this:
     // boost::base64().decode( encoded_text.begin()
     // , encoded_text.end()
     // , std::back_inserter( my_text_again ) );
}

So developer can choose the interface he likes. All technical details, of
course, will be discussed...

- Denis


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk