示例#1
0
wstring Base64String( const string& hash ) 
{
	Base64Coder coder;
	coder.Encode((BYTE*)hash.c_str(), hash.size());
	wstring encoded = UTF8ToWide(coder.EncodedMessage());
	return encoded;
}
示例#2
0
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();
}