summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/oauth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Twitter/src/oauth.cpp')
-rw-r--r--protocols/Twitter/src/oauth.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Twitter/src/oauth.cpp b/protocols/Twitter/src/oauth.cpp
index 1105b6e650..b4b00cb8fa 100644
--- a/protocols/Twitter/src/oauth.cpp
+++ b/protocols/Twitter/src/oauth.cpp
@@ -337,8 +337,9 @@ wstring mir_twitter::OAuthCreateSignature(const wstring& signatureBase, const ws
string keyBytes = WideToUTF8(key);
BYTE digest[MIR_SHA1_HASH_SIZE];
+ unsigned int len = sizeof(digest);
string data = WideToUTF8(signatureBase);
- mir_hmac_sha1(digest, (PBYTE)keyBytes.c_str(), keyBytes.size(), (PBYTE)data.c_str(), data.size());
+ HMAC(EVP_sha1(), keyBytes.c_str(), keyBytes.size(), (PBYTE)data.c_str(), data.size(), digest, &len);
ptrA encoded(mir_base64_encode(digest, sizeof(digest)));
return UrlEncode((wchar_t*)_A2T(encoded));
}