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

Function jcrypt

Descent3/GameCheat.cpp:283–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281const char *OLDOEM_CoolTextures = "5UU(I'0="; // garbarge
282
283const char *jcrypt(const char *plainstring) {
284 int i, t, len;
285 static char cryptstring[20];
286
287 len = strlen(plainstring);
288 if (len > 8)
289 len = 8;
290
291 for (i = 0; i < len; i++) {
292 cryptstring[i] = 0;
293
294 for (t = 0; t < 8; t++) {
295 cryptstring[i] ^= (plainstring[t] ^ plainstring[i % (t + 2)]);
296 cryptstring[i] %= 57;
297 cryptstring[i] += 39;
298 }
299 }
300 cryptstring[i] = 0;
301 return cryptstring;
302}
303
304const char *oldjcrypt(const char *plainstring) {
305 int i, t, len;

Callers 1

DemoCheatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected