#include <stdio.h>
#include <stdlib.h>
#include <time.h>

static char xtea_key[17];
static const int XTEA_KEY_SIZE = 16;	/* bytes */
static const int XTEA_KEY_RANGE = 58;	/* ASCII letters*/

void gen_xtea_key(void)
{
	int i;

	srand(time(NULL));
	for (i = 0; i < XTEA_KEY_SIZE; i++)
	{
		if (i < XTEA_KEY_SIZE) xtea_key[i] = rand() % XTEA_KEY_RANGE + 'A';
		else xtea_key[i] = 0;
		printf("c = %c, d = %u\n", xtea_key[i], xtea_key[i]);
	}
}

int main() {
	gen_xtea_key();
	printf("key = %s\n", xtea_key);
	return 0;
}