diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-04 07:55:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-04 07:55:00 +0000 |
commit | 8751885ea79df4b666b65bb2b6900617785e0da7 (patch) | |
tree | 676db28129ece760d7ad354b2d39ba371453db8c /protocols/Twitter/src/utility.cpp | |
parent | 09476981eccbcae37ef4526f3fbcb18fca686ffa (diff) |
end of base64* zoo
git-svn-id: http://svn.miranda-ng.org/main/trunk@4879 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src/utility.cpp')
-rw-r--r-- | protocols/Twitter/src/utility.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp index f40eecc2e5..e6126062b2 100644 --- a/protocols/Twitter/src/utility.cpp +++ b/protocols/Twitter/src/utility.cpp @@ -22,16 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. std::string b64encode(const std::string &s)
{
- NETLIBBASE64 encode;
- encode.cbDecoded = (int)s.length();
- encode.pbDecoded = (BYTE*)s.c_str();
- encode.cchEncoded = Netlib_GetBase64EncodedBufferSize(encode.cbDecoded);
- encode.pszEncoded = new char[encode.cchEncoded+1];
- CallService(MS_NETLIB_BASE64ENCODE,0,(LPARAM)&encode);
- std::string ret = encode.pszEncoded;
- delete[] encode.pszEncoded;
-
- return ret;
+ return std::string( ptrA( mir_base64_encode((BYTE*)s.c_str(), (unsigned)s.length())));
}
http::response mir_twitter::slurp(const std::string &url,http::method meth,
|