From c68165979e5741aa201a9ac951e37fee4ca362cc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 15 Aug 2013 08:01:11 +0000 Subject: we use bin2hex now instead of mir_snprintf("%02x") git-svn-id: http://svn.miranda-ng.org/main/trunk@5699 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Gadu-Gadu/src/oauth.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'protocols/Gadu-Gadu/src/oauth.cpp') diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index 701b0508bc..e2484a3838 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -273,11 +273,7 @@ char *oauth_generate_nonce() mir_md5_byte_t digest[16]; mir_md5_hash((BYTE*)(char*)str, (int)strlen(str), digest); - - char *result = (char *)mir_alloc(32 + 1); - for (int i = 0; i < 16; i++) - mir_snprintf(result + (i<<1), 2, "%02x", digest[i]); - return result; + return bin2hex(digest, sizeof(digest), (char *)mir_alloc(32 + 1)); } char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD signmethod, -- cgit v1.2.3