| 1 | /* |
| 2 | |
| 3 | GS peerchat encryption/decryption algorithm 0.2 |
| 4 | by Luigi Auriemma |
| 5 | e-mail: [email protected] |
| 6 | web: aluigi.org |
| 7 | |
| 8 | |
| 9 | LICENSE |
| 10 | ======= |
| 11 | Copyright 2004,2005,2006 Luigi Auriemma |
| 12 | |
| 13 | This program is free software; you can redistribute it and/or modify |
| 14 | it under the terms of the GNU General Public License as published by |
| 15 | the Free Software Foundation; either version 2 of the License, or |
| 16 | (at your option) any later version. |
| 17 | |
| 18 | This program is distributed in the hope that it will be useful, |
| 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | GNU General Public License for more details. |
| 22 | |
| 23 | You should have received a copy of the GNU General Public License |
| 24 | along with this program; if not, write to the Free Software |
| 25 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 26 | |
| 27 | http://www.gnu.org/licenses/gpl.txt |
| 28 | |
| 29 | */ |
| 30 | |
| 31 | #ifndef __PEERCHAT_INCLUDED__ |
| 32 | #define __PEERCHAT_INCLUDED__ |
| 33 | |
| 34 | namespace pvpgn |
| 35 | { |
| 36 | |
| 37 | |
| 38 | typedef struct { |
| 39 | unsigned char gs_peerchat_1; |
| 40 | unsigned char gs_peerchat_2; |
| 41 | unsigned char gs_peerchat_crypt[256]; |
| 42 | } gs_peerchat_ctx; |
| 43 | |
| 44 | extern gs_peerchat_ctx * gs_peerchat_create(); |
| 45 | extern void gs_peerchat_destroy(gs_peerchat_ctx const * ctx); |
| 46 | extern void gs_peerchat_init(gs_peerchat_ctx *ctx, unsigned char *chall, unsigned char *gamekey); |
| 47 | extern void gs_peerchat(gs_peerchat_ctx *ctx, unsigned char *data, int size); |
| 48 | |
| 49 | } |
| 50 | |
| 51 | #endif /* __PEERCHAT_INCLUDED__ */ |
| 52 | |
| 53 |