diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
commit | e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch) | |
tree | ba79bdcede96f80039f8b88d2791f198b9ec2981 /protocols/JabberG/src/jabber_secur.cpp | |
parent | f8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff) |
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_secur.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_secur.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index ce2cafb2fc..a364050197 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -157,9 +157,8 @@ char* TMD5Auth::getChallenge(const TCHAR *challenge) CallService(MS_UTILS_GETRANDOM, sizeof(digest), (LPARAM)digest);
mir_snprintf(cnonce, SIZEOF(cnonce), "%08x%08x%08x%08x", htonl(digest[0]), htonl(digest[1]), htonl(digest[2]), htonl(digest[3]));
- ptrA uname(mir_utf8encodeT(info->conn.username)),
- passw(mir_utf8encodeT(info->conn.password)),
- serv(mir_utf8encode(info->conn.server));
+ T2Utf uname(info->conn.username), passw(info->conn.password);
+ ptrA serv(mir_utf8encode(info->conn.server));
mir_md5_init(&ctx);
mir_md5_append(&ctx, (BYTE*)(char*)uname, (int)mir_strlen(uname));
@@ -304,7 +303,7 @@ char* TScramAuth::getChallenge(const TCHAR *challenge) char* TScramAuth::getInitialRequest()
{
- ptrA uname(mir_utf8encodeT(info->conn.username));
+ T2Utf uname(info->conn.username);
unsigned char nonce[24];
CallService(MS_UTILS_GETRANDOM, sizeof(nonce), (LPARAM)nonce);
@@ -339,7 +338,7 @@ TPlainAuth::~TPlainAuth() char* TPlainAuth::getInitialRequest()
{
- ptrA uname(mir_utf8encodeT(info->conn.username)), passw(mir_utf8encodeT(info->conn.password));
+ T2Utf uname(info->conn.username), passw(info->conn.password);
size_t size = 2 * mir_strlen(uname) + mir_strlen(passw) + mir_strlen(info->conn.server) + 4;
char *toEncode = (char*)alloca(size);
|