summaryrefslogtreecommitdiff
path: root/ot_random.h
diff options
context:
space:
mode:
Diffstat (limited to 'ot_random.h')
-rw-r--r--ot_random.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/ot_random.h b/ot_random.h
new file mode 100644
index 0000000..5200dbc
--- /dev/null
+++ b/ot_random.h
@@ -0,0 +1,19 @@
1/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
2 It is considered beerware. Prost. Skol. Cheers or whatever.
3
4 $id$ */
5
6#ifndef OT_RANDOM_H__
7#define OT_RANDOM_H__
8
9#include <stddef.h>
10#include <stdint.h>
11
12/* Seed whatever generator the build settled on. A no-op when backed by
13 arc4random, which seeds itself from the kernel. */
14void random_init(void);
15
16uint32_t random_uint32(void);
17void random_bytes(void *buf, size_t len);
18
19#endif