MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / IntegrityCheckAnswer

Function IntegrityCheckAnswer

engine/Poseidon/Network/Network.cpp:158–174  ·  view source on GitHub ↗

Calculate answer to any integrity question server: check the stored CRC instead of the real exe.

Source from the content-addressed store, hash-verified

156// Calculate answer to any integrity question
157// server: check the stored CRC instead of the real exe.
158unsigned int IntegrityCheckAnswer(IntegrityQuestionType type, const IntegrityQuestion& q, bool server)
159{
160 switch (type)
161 {
162 case IQTConfig:
163 return CalculateConfigCRC(q.name);
164 case IQTExe:
165 if (server)
166 {
167 return GetReferenceCRC(q.offset, q.size);
168 }
169 return CalculateExeCRC(q.offset, q.size);
170 case IQTData:
171 return CalculateDataCRC(q.name, q.offset, q.size);
172 }
173 return 0;
174}
175
176// General diagnostics level
177// - level == 0 - nothing

Callers 2

OnMessageMethod · 0.85
OnMessageMethod · 0.85

Calls 4

CalculateConfigCRCFunction · 0.85
GetReferenceCRCFunction · 0.85
CalculateExeCRCFunction · 0.85
CalculateDataCRCFunction · 0.85

Tested by

no test coverage detected