wstring Base64String( const string& hash ) { Base64Coder coder; coder.Encode((BYTE*)hash.c_str(), hash.size()); wstring encoded = UTF8ToWide(coder.EncodedMessage()); return encoded; }
std::string Base64Encode(const std::string& str) { if (str.empty()) return str; Base64Coder coder; coder.Encode((BYTE*)str.c_str(), str.size()); return coder.EncodedMessage(); }