#include #include #include int main(int argc, char **argv) { FILE *fd; char buf[80]; char f = '\0'; encrypt_arr_t fn_arr = {xor16, xor42, xor64}; if (argc != 2) return 1; printf("Arr size: %ld\n", sizeof(fn_arr) / sizeof(*fn_arr)); fd = fopen(argv[1], "r"); while (fgets(buf, 80, fd)) { encrypt_arr(buf, fn_arr, 3); printf("encrypted message: '%s'", buf); } printf("\n"); printf("%c", (char)(f ^ 16 ^ 42 ^ 64)); fclose(fd); return 0; }