summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/oauth.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-14 17:49:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-14 17:49:08 +0000
commitd30ebf7e3b54d8a5887c0f6c2382987f8ad80420 (patch)
treeaee070e4136352c91fe6946c0f2b607edc369cd5 /protocols/Twitter/src/oauth.cpp
parent3761434e0c1f631a78398226e53ca4a25431c2cd (diff)
built-in base64 removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@5688 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src/oauth.cpp')
-rw-r--r--protocols/Twitter/src/oauth.cpp11
1 files changed, 2 insertions, 9 deletions
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);