summaryrefslogtreecommitdiff
path: root/MPQCryptography.h
blob: 53bac82c25d10711e3fd71a6100f2f2b01d808fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 *  MPQCryptography.h
 *  MPQKit
 *
 *  Created by Jean-Francois Roy on Sat Oct 05 2002.
 *  Copyright (c) 2002-2007 MacStorm. All rights reserved.
 *
 */

#include "mpqlib-stdint.h"

#if defined(__cplusplus)
extern "C" {
#endif

    void __mpqlib_init_cryptography(void);

    const uint32_t *__mpqlib_get_cryptography_table(void);

    void __mpqlib_encrypt(void *data, uint32_t length, uint32_t key,
                                 char disable_input_swapping);
    void __mpqlib_decrypt(void *data, uint32_t length, uint32_t key,
                                 char disable_output_swapping);

    uint32_t __mpqlib_hash_cstring(const char *string, uint32_t type);
    uint32_t __mpqlib_hash_data(const char *data, uint32_t length, uint32_t type);

#if defined(__cplusplus)
}
#endif