summaryrefslogtreecommitdiff
path: root/ot_random.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-24 01:45:53 +0200
committerDirk Engling <erdgeist@erdgeist.org>2026-10-24 01:45:53 +0200
commite4b6decf72a91453bc8d31b4b15e7aed923c56d2 (patch)
tree7c9bf8df836127cdcccfd0bcb954fe2b60d711c2 /ot_random.h
parentf24ec48b27d4cb8dd0555840206dedbb45f1423c (diff)
Add a new facility that handles entropy abstraction
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