| 302 | } |
| 303 | |
| 304 | const 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 |
| 326 | void SendCheaterAttemptText() { |