From d30ebf7e3b54d8a5887c0f6c2382987f8ad80420 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Aug 2013 17:49:08 +0000 Subject: built-in base64 removed git-svn-id: http://svn.miranda-ng.org/main/trunk@5688 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Twitter/src/oauth.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'protocols/Twitter/src/oauth.cpp') diff --git a/protocols/Twitter/src/oauth.cpp b/protocols/Twitter/src/oauth.cpp index 2235ca88ce..cfc4812191 100644 --- a/protocols/Twitter/src/oauth.cpp +++ b/protocols/Twitter/src/oauth.cpp @@ -643,14 +643,6 @@ ErrorExit: return hash; } -wstring mir_twitter::Base64String( const string& hash ) -{ - Base64Coder coder; - coder.Encode((BYTE*)hash.c_str(), (DWORD)hash.size()); - wstring encoded = UTF8ToWide(coder.EncodedMessage()); - return encoded; -} - wstring mir_twitter::OAuthCreateSignature( const wstring& signatureBase, const wstring& consumerSecret, const wstring& requestTokenSecret ) { // URL encode key elements @@ -662,7 +654,8 @@ wstring mir_twitter::OAuthCreateSignature( const wstring& signatureBase, const w string data = WideToUTF8(signatureBase); string hash = HMACSHA1(keyBytes, data); - wstring signature = Base64String(hash); + ptrA encoded( mir_base64_encode((PBYTE)hash.c_str(), (unsigned)hash.length())); + wstring signature = _A2T(encoded); // URL encode the returned signature signature = UrlEncode(signature); -- cgit v1.2.3