diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-11 21:36:29 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-11 21:36:29 +0300 |
commit | 617831dfc953a5bba630163c01fbeda11445ee78 (patch) | |
tree | be3eb09d61f5652989dcc134f89bab6aab70955e /protocols/JabberG/src/jabber_secur.cpp | |
parent | e57cdb681cb10993f4bd08c594a27278af478b1a (diff) |
mir_base64_* => parameters type fix
Diffstat (limited to 'protocols/JabberG/src/jabber_secur.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_secur.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index edf0324766..25a0f2bad4 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -144,7 +144,7 @@ char* TMD5Auth::getChallenge(const wchar_t *challenge) iCallCount++;
- unsigned resultLen;
+ size_t resultLen;
ptrA text((char*)mir_base64_decode( _T2A(challenge), &resultLen));
TStringPairs pairs(text);
@@ -201,7 +201,7 @@ char* TMD5Auth::getChallenge(const wchar_t *challenge) uname, realm, nonce, cnonce, iCallCount, serv,
htonl(digest[0]), htonl(digest[1]), htonl(digest[2]), htonl(digest[3]));
- return mir_base64_encode((PBYTE)buf, cbLen);
+ return mir_base64_encode(buf, cbLen);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -240,7 +240,7 @@ void TScramAuth::Hi(BYTE* res, char* passw, size_t passwLen, char* salt, size_t char* TScramAuth::getChallenge(const wchar_t *challenge)
{
- unsigned chlLen, saltLen = 0;
+ size_t chlLen, saltLen = 0;
ptrA snonce, salt;
int ind = -1;
@@ -293,12 +293,12 @@ char* TScramAuth::getChallenge(const wchar_t *challenge) BYTE srvSig[MIR_SHA1_HASH_SIZE];
mir_hmac_sha1(srvSig, serverKey, sizeof(serverKey), (BYTE*)authmsg, authmsgLen);
- serverSignature = mir_base64_encode((PBYTE)srvSig, sizeof(srvSig));
+ serverSignature = mir_base64_encode(srvSig, sizeof(srvSig));
char buf[4096];
- ptrA encproof(mir_base64_encode((PBYTE)clientProof, sizeof(clientProof)));
+ ptrA encproof(mir_base64_encode(clientProof, sizeof(clientProof)));
int cbLen = mir_snprintf(buf, "c=biws,r=%s,p=%s", snonce, encproof);
- return mir_base64_encode((PBYTE)buf, cbLen);
+ return mir_base64_encode(buf, cbLen);
}
char* TScramAuth::getInitialRequest()
@@ -307,17 +307,17 @@ char* TScramAuth::getInitialRequest() unsigned char nonce[24];
Utils_GetRandom(nonce, sizeof(nonce));
- cnonce = mir_base64_encode((PBYTE)nonce, sizeof(nonce));
+ cnonce = mir_base64_encode(nonce, sizeof(nonce));
char buf[4096];
int cbLen = mir_snprintf(buf, "n,,n=%s,r=%s", uname, cnonce);
msg1 = mir_strdup(buf + 3);
- return mir_base64_encode((PBYTE)buf, cbLen);
+ return mir_base64_encode(buf, cbLen);
}
bool TScramAuth::validateLogin(const wchar_t *challenge)
{
- unsigned chlLen;
+ size_t chlLen;
ptrA chl((char*)mir_base64_decode(_T2A(challenge), &chlLen));
return chl && strncmp((char*)chl + 2, serverSignature, chlLen - 2) == 0;
}
@@ -347,7 +347,7 @@ char* TPlainAuth::getInitialRequest() else
size = mir_snprintf(toEncode, size, "%c%s%c%s", 0, uname, 0, passw);
- return mir_base64_encode((PBYTE)toEncode, (int)size);
+ return mir_base64_encode(toEncode, size);
}
/////////////////////////////////////////////////////////////////////////////////////////
|