From: Ivo Timmermans Date: Mon, 17 Apr 2000 17:04:33 +0000 (+0000) Subject: Default passphrase length of 1024, added -h/--help options. X-Git-Tag: release-1.0pre1~91 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=93287d2b2c77d4b9e3f85f36ef4f9230fe3bf9b3;p=oweals%2Ftinc.git Default passphrase length of 1024, added -h/--help options. --- diff --git a/src/genauth.c b/src/genauth.c index 895ed7b..7e154e3 100644 --- a/src/genauth.c +++ b/src/genauth.c @@ -35,12 +35,15 @@ int main(int argc, char **argv) int bits, c, i, bytes; unsigned char *p; - if(argc != 2) + if(argc > 2 || (argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")))) { fprintf(stderr, "Usage: %s bits\n", argv[0]); return 1; } + if(!argv[1]) + argv[1] = "1024"; + if(!(bits = atol(argv[1]))) { fprintf(stderr, "Illegal number: %s\n", argv[1]);