summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/oauth.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
commit62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch)
tree1437d0906218fae8827aed384026f2b7e656f4ac /protocols/Gadu-Gadu/src/oauth.cpp
parentfcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff)
BYTE -> uint8_t
Diffstat (limited to 'protocols/Gadu-Gadu/src/oauth.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index 94d51e83f8..e7674e959a 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -185,9 +185,9 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> &params, const char *httpmethod, con
mir_strcat(key, "&");
mir_strcat(key, tsenc);
- BYTE digest[MIR_SHA1_HASH_SIZE];
+ uint8_t digest[MIR_SHA1_HASH_SIZE];
unsigned len;
- HMAC(EVP_sha1(), key, (int)mir_strlen(key), (BYTE*)(char*)text, (int)mir_strlen(text), digest, &len);
+ HMAC(EVP_sha1(), key, (int)mir_strlen(key), (uint8_t*)(char*)text, (int)mir_strlen(text), digest, &len);
sign = mir_base64_encode(digest, MIR_SHA1_HASH_SIZE);
}
else { // PLAINTEXT
@@ -213,8 +213,8 @@ char* oauth_generate_nonce()
CMStringA str(FORMAT, "%ld%s", time(0), randnum);
- BYTE digest[16];
- mir_md5_hash((BYTE*)str.GetString(), str.GetLength(), digest);
+ uint8_t digest[16];
+ mir_md5_hash((uint8_t*)str.GetString(), str.GetLength(), digest);
return bin2hex(digest, sizeof(digest), (char *)mir_alloc(32 + 1));
}