MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / oldjcrypt

Function oldjcrypt

Descent3/GameCheat.cpp:304–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304const char *oldjcrypt(const char *plainstring) {
305 int i, t, len;
306 static char cryptstring[20];
307
308 len = strlen(plainstring);
309 if (len > 8)
310 len = 8;
311
312 for (i = 0; i < len; i++) {
313 cryptstring[i] = 0;
314
315 for (t = 0; t < 8; t++) {
316 cryptstring[i] ^= (plainstring[t] ^ plainstring[i % (t + 1)]);
317 cryptstring[i] %= 54;
318 cryptstring[i] += 33;
319 }
320 }
321 cryptstring[i] = 0;
322 return cryptstring;
323}
324
325// Tells others that we are cheating
326void SendCheaterAttemptText() {

Callers 1

DemoCheatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected