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

#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