summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype.cpp')
-rw-r--r--protocols/Skype/src/skype.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp
index d8428b9b6a..ec2ab96e92 100644
--- a/protocols/Skype/src/skype.cpp
+++ b/protocols/Skype/src/skype.cpp
@@ -141,7 +141,14 @@ char* LoadKeyPair()
HGLOBAL hResource = LoadResource(g_hInstance, hRes);
if (hResource) {
aes_context ctx;
- aes_set_key( &ctx, (BYTE*)MY_KEY, 128);
+
+ int basedecodedkey = decodeSize((char*)MY_KEY);
+ unsigned char *tmpK = (unsigned char*)malloc(basedecodedkey + 1);
+ decode((char*)MY_KEY, tmpK, basedecodedkey);
+ tmpK[basedecodedkey] = 0;
+
+
+ aes_set_key( &ctx, tmpK, 128);
int dwResSize = SizeofResource(g_hInstance, hRes);
char *pData = (char*)GlobalLock(hResource);
pData[dwResSize] = 0;