Mercurial > pidgin
diff libpurple/protocols/qq/file_trans.c @ 22544:217fffe3f46f
Patch from ccpaging to clean up some QQ stuff. I removed the now commented
out qq_crypt() instead of, well, comment it out.
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Mon, 24 Mar 2008 07:14:29 +0000 |
parents | ac48f2e34359 |
children | 9a5d140400f1 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/file_trans.c Fri Mar 21 21:11:07 2008 +0000 +++ b/libpurple/protocols/qq/file_trans.c Mon Mar 24 07:14:29 2008 +0000 @@ -357,7 +357,7 @@ g_free(hex_dump); encrypted_len = bytes + 16; encrypted_data = g_newa(guint8, encrypted_len); - qq_crypt(ENCRYPT, raw_data, bytes, info->file_session_key, encrypted_data, &encrypted_len); + qq_encrypt(raw_data, bytes, info->file_session_key, encrypted_data, &encrypted_len); /*debug: try to decrypt it */ /* if (QQ_DEBUG) { @@ -368,7 +368,7 @@ g_free(hex_dump); buf = g_newa(guint8, MAX_PACKET_SIZE); buflen = encrypted_len; - if (qq_crypt(DECRYPT, encrypted_data, encrypted_len, info->file_session_key, buf, &buflen)) { + if (qq_decrypt(encrypted_data, encrypted_len, info->file_session_key, buf, &buflen)) { purple_debug(PURPLE_DEBUG_INFO, "QQ", "decrypt success\n"); if (buflen == bytes && memcmp(raw_data, buf, buflen) == 0) purple_debug(PURPLE_DEBUG_INFO, "QQ", "checksum ok\n"); @@ -534,7 +534,7 @@ decrypted_data = g_newa(guint8, len); decrypted_len = len; - if (qq_crypt(DECRYPT, cursor, len - (cursor - data), qd->session_md5, decrypted_data, &decrypted_len)) { + if (qq_decrypt(cursor, len - (cursor - data), qd->session_md5, decrypted_data, &decrypted_len)) { gchar *hex_dump; cursor = decrypted_data + 16; /* skip md5 section */ read_packet_w(decrypted_data, &cursor, decrypted_len, &packet_type);