summaryrefslogtreecommitdiff
path: root/MPQCryptography.h
diff options
context:
space:
mode:
authorpixel <pixel>2008-01-29 10:13:13 +0000
committerpixel <pixel>2008-01-29 10:13:13 +0000
commitaeb420d9f20f0973d428b5de0bd19f83c684bf54 (patch)
treebf9119050b3510bb12fc77fcfc5ed59ab6ab900b /MPQCryptography.h
parent6d8020e380791e063a70b3802fed2b72de7dcdec (diff)
Smoothing up win32 fixes.
Diffstat (limited to 'MPQCryptography.h')
-rw-r--r--MPQCryptography.h32
1 files changed, 3 insertions, 29 deletions
diff --git a/MPQCryptography.h b/MPQCryptography.h
index 01aa418..53bac82 100644
--- a/MPQCryptography.h
+++ b/MPQCryptography.h
@@ -7,50 +7,24 @@
*
*/
-#ifdef WIN32
-#include "stdint.h"
-#include <stdlib.h>
-#define bool char
-#else
-#include <stdbool.h>
-#include <stdint.h>
-#include <openssl/rsa.h>
-#endif
+#include "mpqlib-stdint.h"
#if defined(__cplusplus)
extern "C" {
#endif
-#if !defined(__MPQLIB_WEAK_SIGNATURE_SIZE)
-#define __MPQLIB_WEAK_SIGNATURE_SIZE 64
-#endif
-
-#if !defined(__MPQLIB_STRONG_SIGNATURE_SIZE)
-#define __MPQLIB_STRONG_SIGNATURE_SIZE 256
-#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,
- bool disable_input_swapping);
+ char disable_input_swapping);
void __mpqlib_decrypt(void *data, uint32_t length, uint32_t key,
- bool disable_output_swapping);
+ 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);
-#define __MPQLIB_CRC_INIT 0x1
-#define __MPQLIB_CRC_UPDATE 0x2
-#define __MPQLIB_CRC_FINALIZE 0x4
- void __mpqlib_crc32(const unsigned char *buffer, uint32_t length, uint32_t * crc, uint32_t flags);
-
-#ifdef USE_SSL
- int __mpqlib_verify_weak_signature(RSA * public_key, const unsigned char *signature, const unsigned char *digest);
- int __mpqlib_verify_strong_signature(RSA * public_key, const unsigned char *signature, const unsigned char *digest);
-#endif
-
#if defined(__cplusplus)
}
#endif