summaryrefslogtreecommitdiff
path: root/ot_random.h
blob: 5200dbc98869321393ac8fe7bb0f0bf405fea98c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
   It is considered beerware. Prost. Skol. Cheers or whatever.

   $id$ */

#ifndef OT_RANDOM_H__
#define OT_RANDOM_H__

#include <stddef.h>
#include <stdint.h>

/* 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