summaryrefslogtreecommitdiff
path: root/src/rand.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-10-13 03:10:10 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-10-15 23:28:09 -0400
commit7f4e156e5f12093071e8746cd9702827a66952ed (patch)
treec46f12be6f48cd5c2e2ba7f8dfe7768f80a7e699 /src/rand.h
parentb8b38f306790a48db7e0e7a61ba6bb18114eba05 (diff)
downloadlighttpd-git-7f4e156e5f12093071e8746cd9702827a66952ed.tar.gz
[core] rand.[ch] to use better RNGs when available
prefer RAND_pseudo_bytes() (openssl), arc4random() or jrand48(), if available, over rand() These are not necessarily cryptographically secure, but should be better than rand()
Diffstat (limited to 'src/rand.h')
-rw-r--r--src/rand.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rand.h b/src/rand.h
new file mode 100644
index 00000000..c3bac17b
--- /dev/null
+++ b/src/rand.h
@@ -0,0 +1,10 @@
+#ifndef LI_RAND_H_
+#define LI_RAND_H_
+#include "first.h"
+
+int li_rand (void);
+void li_rand_reseed (void);
+int li_rand_bytes (unsigned char *buf, int num);
+void li_rand_cleanup (void);
+
+#endif