OpenMoHAA 0.82.1
Loading...
Searching...
No Matches
gutil.h
1/******
2gutil.h
3GameSpy C Engine SDK
4
5Copyright 1999-2001 GameSpy Industries, Inc
6
718002 Skypark Circle
8Irvine, California 92614
9949.798.4200 (Tel)
10949.798.4299 (Fax)
11devsupport@gamespy.com
12
13******
14
15 Please see the GameSpy C Engine SDK documentation for more
16 information
17
18******/
19
20typedef unsigned char uchar;
21
22
23void cengine_gs_encode ( uchar *ins, int size, uchar *result );
24void cengine_gs_encrypt ( uchar *key, int key_len, uchar *buffer_ptr, int buffer_len );
25
26
27
28#define CRYPT_HEIGHT 16
29#define CRYPT_TABLE_SIZE 256
30#define NUM_KEYSETUP_PASSES 2
31#define NWORDS 16
32
33typedef struct {
34 goa_uint32 F[256];
35 goa_uint32 x_stack[CRYPT_HEIGHT];
36 goa_uint32 y_stack[CRYPT_HEIGHT];
37 goa_uint32 z_stack[CRYPT_HEIGHT];
38 int index;
39 goa_uint32 x, y, z;
40 goa_uint32 tree_num;
41 goa_uint32 keydata[NWORDS];
42 unsigned char *keyptr;
43
44} crypt_key;
45
46void
47init_crypt_key(const unsigned char *key,
48 unsigned int bytes_in_key,
49 crypt_key *L);
50
51void
52crypt_encrypt(crypt_key *L, goa_uint32 *dest, int nodes);
53void crypt_docrypt(crypt_key *L, unsigned char *data, int datalen);
Definition gutil.h:33