int encrypti(int argc, char **argv) { char **idarray; int i; int count; if (argc < 2) { printf("Usage: encrypt ID [ID ...]\n\n"); printf("Encrypts stdin for given ID(s) and prints on stdout\n"); return 1; } count = argc - 1; idarray = (char **) alloca(sizeof(char *) * count); for (i=0; i<count; i++) { idarray[i] = FMT_make_id(argv[i + 1], NULL, params); } FMT_encrypt_stream_array(idarray, count, stdin, stdout, params); for (i=0; i<count; i++) { //printf("%s\n",idarray[0] ); free(idarray[i]); } return 0; }
void FMT_encrypt_stream(char *id, FILE *infp, FILE *outfp, params_t params) { FMT_encrypt_stream_array(&id, 1, infp, outfp, params); }