From e4b6decf72a91453bc8d31b4b15e7aed923c56d2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 24 Oct 2026 01:45:53 +0200 Subject: Add a new facility that handles entropy abstraction --- ot_random.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ot_random.h (limited to 'ot_random.h') 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 @@ +/* This software was written by Dirk Engling + It is considered beerware. Prost. Skol. Cheers or whatever. + + $id$ */ + +#ifndef OT_RANDOM_H__ +#define OT_RANDOM_H__ + +#include +#include + +/* Seed whatever generator the build settled on. A no-op when backed by + arc4random, which seeds itself from the kernel. */ +void random_init(void); + +uint32_t random_uint32(void); +void random_bytes(void *buf, size_t len); + +#endif -- cgit v1.3