Mercurial > pidgin
diff libpurple/protocols/qq/crypt.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 | 44b4e8bd759b |
| children | 9a5d140400f1 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/crypt.c Fri Mar 21 21:11:07 2008 +0000 +++ b/libpurple/protocols/qq/crypt.c Mon Mar 24 07:14:29 2008 +0000 @@ -99,7 +99,7 @@ *is_header = 0; /* and exit header */ } /* encrypt_block */ -static void qq_encrypt(const guint8 *const instr, gint instrlen, +void qq_encrypt(const guint8 *const instr, gint instrlen, const guint8 *const key, guint8 *outstr, gint *outstrlen_ptr) { @@ -211,7 +211,7 @@ } /* return 0 if failed, 1 otherwise */ -static gint qq_decrypt(const guint8 *const instr, gint instrlen, +gint qq_decrypt(const guint8 *const instr, gint instrlen, const guint8 *const key, guint8 *outstr, gint *outstrlen_ptr) { @@ -296,19 +296,3 @@ } return 1; } - -/* return 1 is succeed, otherwise return 0 */ -gint qq_crypt(gint flag, - const guint8 *const instr, gint instrlen, - const guint8 *const key, - guint8 *outstr, gint *outstrlen_ptr) -{ - if (flag == DECRYPT) - return qq_decrypt(instr, instrlen, key, outstr, outstrlen_ptr); - else if (flag == ENCRYPT) - qq_encrypt(instr, instrlen, key, outstr, outstrlen_ptr); - else - return 0; - - return 1; -}
