aboutsummaryrefslogtreecommitdiff
path: root/pwgen.h
diff options
context:
space:
mode:
authorPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:21 +0200
committerPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:21 +0200
commit1832804a4c6771ff86fba6064a6fb575524b64ef (patch)
treeb931fdc1bb0692e5a3d145ceebc982e4d5d85d0f /pwgen.h
parenta067bd488fb1ad0ce4818c6601031554397c1d80 (diff)
downloadpwgen-1832804a4c6771ff86fba6064a6fb575524b64ef.zip
automatic commit for pwgen-2.04
Diffstat (limited to 'pwgen.h')
-rw-r--r--pwgen.h20
1 files changed, 13 insertions, 7 deletions
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);