Commit | Line | Data |
7214af3e |
1 | // License information for this code is in license.txt |
2 | |
3 | #ifndef MPQCRYPT_INCLUDED |
4 | #define MPQCRYPT_INCLUDED |
5 | |
6 | #include "SFTypes.h" |
7 | |
8 | #define HASH_POSITION 0 |
9 | #define HASH_NAME_A 1 |
10 | #define HASH_NAME_B 2 |
11 | #define HASH_KEY 3 |
12 | |
13 | extern UInt32 dwHashTableKey; |
14 | extern UInt32 dwBlockTableKey; |
15 | |
16 | bool InitCryptTable(); |
17 | UInt32 HashString(const char *lpszString, UInt32 dwHashType); |
18 | bool EncryptData(UInt8 *lpbyBuffer, UInt32 dwLength, UInt32 dwKey); |
19 | bool DecryptData(UInt8 *lpbyBuffer, UInt32 dwLength, UInt32 dwKey); |
20 | UInt32 DetectFileSeed(UInt32 * block, UInt32 decrypted, UInt32 blocksize); |
21 | |
22 | #endif // #ifndef MPQCRYPT_INCLUDED |
23 | |