diff options
author | pixel <pixel> | 2007-07-06 07:19:32 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-07-06 07:19:32 +0000 |
commit | 5537df7e088d8b67c82ae058bbf496f906778291 (patch) | |
tree | 35eb14302d8f66860d278ea8b47c54c7f6fe6574 /MPQCryptography.c | |
parent | e12fcb08a14de1f5738e0162bba50cdbf87dee47 (diff) |
Basic archive opening done.
Diffstat (limited to 'MPQCryptography.c')
-rw-r--r-- | MPQCryptography.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/MPQCryptography.c b/MPQCryptography.c index 5cd29d3..798d80e 100644 --- a/MPQCryptography.c +++ b/MPQCryptography.c @@ -23,6 +23,9 @@ static int crypt_table_initialized = 0; static uint32_t crypt_table[0x500]; +/****TODO****/ +/* Re-implement various endianess fixes. */ + static void memrev(unsigned char *buf, size_t count) { unsigned char *r; @@ -72,8 +75,9 @@ void __mpqlib_init_cryptography() ERR_load_crypto_strings(); } -void __mpqlib_encrypt(char *data, uint32_t length, uint32_t key, bool disable_input_swapping) +void __mpqlib_encrypt(void *_data, uint32_t length, uint32_t key, bool disable_input_swapping) { + char * data = (char *) _data; assert(crypt_table_initialized); assert(data); @@ -108,8 +112,9 @@ void __mpqlib_encrypt(char *data, uint32_t length, uint32_t key, bool disable_in } } -void __mpqlib_decrypt(char *data, uint32_t length, uint32_t key, bool disable_output_swapping) +void __mpqlib_decrypt(void *_data, uint32_t length, uint32_t key, bool disable_output_swapping) { + char * data = (char *) _data; assert(crypt_table_initialized); assert(data); |