diff options
-rw-r--r-- | lpass.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -27,15 +27,15 @@ #include <openssl/bn.h> #include <openssl/evp.h> -#define MAX_BUF 1024 -#define ENTROPY_ITERATIONS 100000 -#define ENTROPY_KEY_LENGTH 32 -#define DEFAULT_LENGTH 16 +static const int MAX_BUF = 1024; +static const int ENTROPY_ITERATIONS = 100000; +static const int ENTROPY_KEY_LENGTH = 32; +static const int DEFAULT_LENGTH = 16; -#define CHAR_SUBSET_LOWER "abcdefghijklmnopqrstuvwxyz" -#define CHAR_SUBSET_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -#define CHAR_SUBSET_DIGITS "0123456789" -#define CHAR_SUBSET_SYMBOLS "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" +static const char CHAR_SUBSET_LOWER[] = "abcdefghijklmnopqrstuvwxyz"; +static const char CHAR_SUBSET_UPPER[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +static const char CHAR_SUBSET_DIGITS[] = "0123456789"; +static const char CHAR_SUBSET_SYMBOLS[] = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; enum CharSet { CHARSET_LOWER = 1 << 0, @@ -256,7 +256,8 @@ usage() fputs(" --no-lower no lowercase letters in password\n", stderr); fputs(" --no-upper no uppercase letters in password\n", stderr); fputs(" --no-digits no digits in password\n", stderr); - fputs(" --no-symbols no special symbols (" CHAR_SUBSET_SYMBOLS ")\n", stderr); + fprintf(stderr, + " --no-symbols no special symbols: %s\n", CHAR_SUBSET_SYMBOLS); fputs(" -h, --help output this message and exit\n", stderr); fputs("\nThe environment variable LESSPASS_MASTER_PASSWORD must be set with the master\n", stderr); fputs("password for producing the desired password.\n", stderr); |