diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 20:50:24 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 21:14:02 +0100 |
| commit | ad541c67761b8aa6da1566802c347cac4018d0c2 (patch) | |
| tree | a9166fa9d349911d69a6948e53b05344dcc348a0 /src/ot_random.h | |
| parent | c679ff8a3b1418a5960cc49ba6458a0007df54fa (diff) | |
Move the build sources into src/
Diffstat (limited to 'src/ot_random.h')
| -rw-r--r-- | src/ot_random.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ot_random.h b/src/ot_random.h new file mode 100644 index 0000000..c2d0387 --- /dev/null +++ b/src/ot_random.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* This software was written by Dirk Engling <erdgeist@erdgeist.org> | ||
| 2 | It is considered beerware. Prost. Skol. Cheers or whatever. */ | ||
| 3 | |||
| 4 | #ifndef OT_RANDOM_H__ | ||
| 5 | #define OT_RANDOM_H__ | ||
| 6 | |||
| 7 | #include <stddef.h> | ||
| 8 | #include <stdint.h> | ||
| 9 | |||
| 10 | /* Seed whatever generator the build settled on. A no-op when backed by | ||
| 11 | arc4random, which seeds itself from the kernel. */ | ||
| 12 | void random_init(void); | ||
| 13 | |||
| 14 | uint32_t random_uint32(void); | ||
| 15 | void random_bytes(void *buf, size_t len); | ||
| 16 | |||
| 17 | #endif | ||
