MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / MPQHashCryptTable

Method MPQHashCryptTable

LuaSTGPlus/Dictionary.hpp:25–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 }
24 public:
25 MPQHashCryptTable()
26 {
27 uint32_t seed = 0x00100001;
28 for (uint32_t index1 = 0; index1 < 0x100; index1++)
29 {
30 for (uint32_t index2 = index1, i = 0; i < 5; i++, index2 += 0x100)
31 {
32 unsigned long temp1, temp2;
33 seed = (seed * 125 + 3) % 0x2AAAAB;
34 temp1 = (seed & 0xFFFF) << 0x10;
35 seed = (seed * 125 + 3) % 0x2AAAAB;
36 temp2 = (seed & 0xFFFF);
37 m_CryptTable[index2] = (temp1 | temp2);
38 }
39 }
40 }
41 };
42
43 /// @brief MPQ Hash�㷨

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected