Default passphrase length of 1024, added -h/--help options.
This commit is contained in:
parent
9c2ac77594
commit
93287d2b2c
1 changed files with 4 additions and 1 deletions
|
|
@ -35,12 +35,15 @@ int main(int argc, char **argv)
|
||||||
int bits, c, i, bytes;
|
int bits, c, i, bytes;
|
||||||
unsigned char *p;
|
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]);
|
fprintf(stderr, "Usage: %s bits\n", argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!argv[1])
|
||||||
|
argv[1] = "1024";
|
||||||
|
|
||||||
if(!(bits = atol(argv[1])))
|
if(!(bits = atol(argv[1])))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Illegal number: %s\n", argv[1]);
|
fprintf(stderr, "Illegal number: %s\n", argv[1]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue