#include #include #include #include "arc4.h" int main(int argc, char *argv[]) { struct arc4_ctx ctx; /* Read key and initialize context */ { uint8_t key[256]; size_t keylen = 0; FILE *f; if (argc == 2) { if (! (f = fopen(argv[1], "r"))) { perror(argv[0]); } } else { f = fdopen(3, "r"); } if (f) { keylen = fread(key, 1, sizeof(key), f); fclose(f); } if (0 == keylen) { fprintf(stderr, "Usage: %s [KEYFILE]