summaryrefslogtreecommitdiffstats
path: root/lib/util/util.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-25 15:58:38 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-26 08:57:28 +0100
commit792dd38d7c0be5319db1eef625c142a6490cd12b (patch)
treebd7c95124cdb5cec4a17b3523fc74966aec543df /lib/util/util.h
parentc2edea5ccfb1eadabc3fd4a6d1eb9c5c0a8251e2 (diff)
downloadsamba-792dd38d7c0be5319db1eef625c142a6490cd12b.tar.gz
samba-792dd38d7c0be5319db1eef625c142a6490cd12b.tar.xz
samba-792dd38d7c0be5319db1eef625c142a6490cd12b.zip
lib/util: add generate_random_password()
metze
Diffstat (limited to 'lib/util/util.h')
-rw-r--r--lib/util/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util/util.h b/lib/util/util.h
index e1608a8ac4b..264396efe61 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -178,6 +178,11 @@ _PUBLIC_ uint32_t generate_random(void);
_PUBLIC_ bool check_password_quality(const char *s);
/**
+ * Generate a random text password.
+ */
+_PUBLIC_ char *generate_random_password(TALLOC_CTX *mem_ctx, size_t min, size_t max);
+
+/**
Use the random number generator to generate a random string.
**/
_PUBLIC_ char *generate_random_str_list(TALLOC_CTX *mem_ctx, size_t len, const char *list);