thin-provisioning-tools/base/base64.h
Joe Thornber a29b5c8d07 [base] bse64 encoder
Really slow implementation.  Speed up on a rainy day.
2013-10-10 10:18:46 +01:00

21 lines
541 B
C++

#ifndef BASE_BASE64_H
#define BASE_BASE64_H
#include <boost/variant.hpp>
#include <string>
#include <vector>
//----------------------------------------------------------------
namespace base {
std::string base64_encode(std::vector<unsigned char> const &raw);
// Returns either the decoded data or an error string
typedef boost::variant<std::vector<unsigned char>, std::string> decoded_or_error;
decoded_or_error base64_decode(std::string const &encoded);
}
//----------------------------------------------------------------
#endif