From ceaf8483c74a658e13b740ddff6b2ef85c0ee063 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 8 Apr 2016 08:55:26 +0000 Subject: base64 to be used instead of bin2hex git-svn-id: http://svn.miranda-ng.org/main/trunk@16611 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/AimOscar') diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index 2375109264..c7b9dd1b20 100755 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -275,8 +275,8 @@ void fill_session_url(char *buf, size_t bufSize, char *token, char *secret, time mir_hmac_sha256(session_key, (BYTE*)password, mir_strlen(password), (BYTE*)secret, mir_strlen(secret)); generate_signature(signature, "GET", AIM_SESSION_URL, query_string, session_key); - size_t cbLen = mir_snprintf(buf, bufSize, "%s?%s&sig_sha256=", AIM_SESSION_URL, query_string); - bin2hex(signature, sizeof(signature), buf + cbLen); + ptrA szEncoded(mir_base64_encode(signature, sizeof(signature))); + mir_snprintf(buf, bufSize, "%s?%s&sig_sha256=%s", AIM_SESSION_URL, query_string, (char*)szEncoded); } bool parse_start_socar_session_response(char *response, char *bos_host, unsigned short bos_port, char *cookie, char *tls_cert_name, bool encryption = true) -- cgit v1.2.3