tfc_say(" -v: print number of read and written encrypted bytes, and explain stages.");
tfc_say(" -V seconds: activate timer that will repeatedly print statistics to stderr.");
tfc_say(" -a: shortcut of -O xtime.");
+ tfc_say(" -g: same as '-e -C stream -c rand' or '-d -C stream -c head', depending on mode.");
+ tfc_say(" -j: same as '-e -C ctr -c rand' or '-d -C ctr -c head', depending on mode.");
tfc_say(" -l length: read only these first bytes of source.");
tfc_say(" -r <file>: specify random source instead of /dev/urandom.");
tfc_say(" -R nr_bytes: generate nr_bytes of random bytes suitable for use as key data.");
}
opterr = 0;
- while ((c = getopt(argc, argv, "L:s:aU:C:r:K:t:PXkzxc:l:qedn:vV:pwE:o:O:S:AmuM:R:Z:WHD:")) != -1) {
+ while ((c = getopt(argc, argv, "L:s:aU:C:r:K:t:PXkzxc:l:qedn:vV:pwE:o:O:S:AmuM:R:Z:WHD:gj")) != -1) {
switch (c) {
case 'L':
read_defaults(optarg, NO);
case 'r':
randsource = optarg;
break;
+ case 'j':
+ case 'g':
+ if (c == 'j') ctr_mode = TFC_MODE_CTR;
+ else if (c == 'g') ctr_mode = TFC_MODE_STREAM;
+ if (do_edcrypt == TFC_DO_DECRYPT) counter_opt = TFC_CTR_HEAD;
+ else if (do_edcrypt == TFC_DO_ENCRYPT) counter_opt = TFC_CTR_RAND;
+ else xerror(NO, YES, YES, "plain mode was selected with -%c, cannot continue", c);
+ break;
case 'c':
if (!strcasecmp(optarg, "show"))
counter_opt = TFC_CTR_SHOW;