X-Git-Url: https://jxself.org/git/?p=skeinsum.git;a=blobdiff_plain;f=skein_cli.c;h=706091e4c7359c60046db0c46f9f5ab0f4daae03;hp=63166f503ce762bc9edee940bca49d6e02399117;hb=3dfce07c702e1e59478cc9d4e3afea359a1b62f8;hpb=4bab256d6ad7c26e7e6aafd013945b6ad34d8298 diff --git a/skein_cli.c b/skein_cli.c index 63166f5..706091e 100644 --- a/skein_cli.c +++ b/skein_cli.c @@ -40,12 +40,11 @@ typedef long long unsigned LLU; extern const int hashbitlen; #define skeinVersion "1.3" + const size_t input_minbufsize = 32 * 1024; const size_t input_maxbufsize = 32 * 1024 * 1024; -char invalidOption = 0; - enum { QUIET_OPTION = 11, @@ -331,14 +330,16 @@ int VerifyHashesFromFile(FILE *fp, int status, int warn, int quiet) int hashVersion = decomposeHashLine(hash,MsgDigest_tmp,file_tmp); if (hashVersion == -1) { - fprintf(stderr, "skein%d: %s is using newer version of skein%d algorithm\n",hashbitlen,file_tmp,hashbitlen); - fprintf(stderr, "You should update your algorithm\n"); + WARN("%s is using newer version of skein%d algorithm\n" + "You should update your algorithm\n", + file_tmp, hashbitlen); continue; } else if (hashVersion == 0) { - fprintf(stderr, "skein%d: %s is using an older version of skein%d algorithm\n",hashbitlen,file_tmp,hashbitlen); - fprintf(stderr, "You should use the older algorithm\n"); + WARN("%s is using an older version of skein%d algorithm\n" + "You should use the older algorithm\n", + file_tmp, hashbitlen); continue; } else if (!isProper(MsgDigest_tmp))