diff options
| author | Philipp Klaus <philipp.klaus@gmail.com> | 2011-06-21 17:12:21 +0200 |
|---|---|---|
| committer | Philipp Klaus <philipp.klaus@gmail.com> | 2011-06-21 17:12:21 +0200 |
| commit | 1832804a4c6771ff86fba6064a6fb575524b64ef (patch) | |
| tree | b931fdc1bb0692e5a3d145ceebc982e4d5d85d0f /pwgen.h | |
| parent | a067bd488fb1ad0ce4818c6601031554397c1d80 (diff) | |
| download | pwgen-1832804a4c6771ff86fba6064a6fb575524b64ef.zip | |
automatic commit for pwgen-2.04
Diffstat (limited to 'pwgen.h')
| -rw-r--r-- | pwgen.h | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -23,14 +23,16 @@ struct pw_element { /* * Flags for the pwgen function */ -#define PW_ONE_NUMBER 0x0001 -#define PW_ONE_CASE 0x0002 +#define PW_DIGITS 0x0001 /* At least one digit */ +#define PW_UPPERS 0x0002 /* At least one upper letter */ +#define PW_SYMBOLS 0x0004 +#define PW_AMBIGUOUS 0x0008 -struct pwgen_func { - const char *name; - void (*func)(char *buf, int size, int pw_flags); - int flags; -}; +/* pointer to choose between random or sha1 pseudo random number generator */ +extern int (*pw_number)(int max_num); + +extern const char *pw_symbols; +extern const char *pw_ambiguous; /* Function prototypes */ @@ -42,3 +44,7 @@ extern void pw_rand(char *buf, int size, int pw_flags); /* randnum.c */ extern int pw_random_number(int max_num); + +/* sha1num.c */ +extern void pw_sha1_init(char *sha1); +extern int pw_sha1_number(int max_num); |