Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




diff --git a/MpqCrypt.h b/MpqCrypt.h
new file mode 100644 (file)
index 0000000..c730d58
--- /dev/null
@@ -0,0 +1,23 @@
+// License information for this code is in license.txt
+
+#ifndef MPQCRYPT_INCLUDED
+#define MPQCRYPT_INCLUDED
+
+#include "SFTypes.h"
+
+#define HASH_POSITION 0
+#define HASH_NAME_A 1
+#define HASH_NAME_B 2
+#define HASH_KEY 3
+
+extern UInt32 dwHashTableKey;
+extern UInt32 dwBlockTableKey;
+
+bool InitCryptTable();
+UInt32 HashString(const char *lpszString, UInt32 dwHashType);
+bool EncryptData(UInt8 *lpbyBuffer, UInt32 dwLength, UInt32 dwKey);
+bool DecryptData(UInt8 *lpbyBuffer, UInt32 dwLength, UInt32 dwKey);
+UInt32 DetectFileSeed(UInt32 * block, UInt32 decrypted, UInt32 blocksize);
+
+#endif // #ifndef MPQCRYPT_INCLUDED
+