From 1832804a4c6771ff86fba6064a6fb575524b64ef Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 21 Jun 2011 17:12:21 +0200 Subject: automatic commit for pwgen-2.04 --- pwgen.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'pwgen.h') diff --git a/pwgen.h b/pwgen.h index e28ac95..0fed7e8 100644 --- a/pwgen.h +++ b/pwgen.h @@ -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); -- cgit v1.2.3