#include <stdio.h>
int main() {
unsigned int cryptKey[3] = {0,0,0};
unsigned int sdcryptKey, prevKey = 0;
int i = 0;
# define packetKeys(a,b,c) { cryptKey[0] = a; cryptKey[1] = b; cryptKey[2] = c; }
#ifndef PACKETVER
# define PACKETVER 20120418
#endif
# include "src/map/packets.h"
sdcryptKey = (( cryptKey[0] * cryptKey[1] ) + cryptKey[2]) & 0xFFFFFFFF;
printf("\nTesting packetver %d\n", PACKETVER);
do {
printf("key %02d: 0x%08x: %s\n", i++, sdcryptKey, sdcryptKey == prevKey ? "REPEATED!!" : "Fresh");
prevKey = sdcryptKey;
sdcryptKey = (( sdcryptKey * cryptKey[1] ) + cryptKey[2]) & 0xFFFFFFFF;
} while (i < 100);
}