summaryrefslogtreecommitdiff
path: root/source4/lib/util/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util/util.h')
-rw-r--r--source4/lib/util/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/util/util.h b/source4/lib/util/util.h
index 42dde70a44..fc9cb1e57a 100644
--- a/source4/lib/util/util.h
+++ b/source4/lib/util/util.h
@@ -226,10 +226,18 @@ _PUBLIC_ void set_need_random_reseed(void);
/**
Interface to the (hopefully) good crypto random number generator.
+ Will use our internal PRNG if more than 40 bytes of random generation
+ has been requested, otherwise tries to read from /dev/random
**/
_PUBLIC_ void generate_random_buffer(uint8_t *out, int len);
/**
+ Interface to the (hopefully) good crypto random number generator.
+ Will always use /dev/urandom if available.
+**/
+_PUBLIC_ void generate_secret_buffer(uint8_t *out, int len);
+
+/**
generate a single random uint32_t
**/
_PUBLIC_ uint32_t generate_random(void);