20dab78180c4b029dc5c85d9cb6f30557e183672
[trex.git] /
1
2 #ifndef randombytes_sysrandom_H
3 #define randombytes_sysrandom_H
4
5 /*
6  * THREAD SAFETY: randombytes_sysrandom() functions are thread-safe,
7  * provided that you called sodium_init() once before using any
8  * other libsodium function.
9  */
10
11 #include <stddef.h>
12 #include <stdint.h>
13
14 #include "export.h"
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 SODIUM_EXPORT
21 extern struct randombytes_implementation randombytes_sysrandom_implementation;
22
23 SODIUM_EXPORT
24 const char *randombytes_sysrandom_implementation_name(void);
25
26 SODIUM_EXPORT
27 uint32_t    randombytes_sysrandom(void);
28
29 SODIUM_EXPORT
30 void        randombytes_sysrandom_stir(void);
31
32 SODIUM_EXPORT
33 uint32_t    randombytes_sysrandom_uniform(const uint32_t upper_bound);
34
35 SODIUM_EXPORT
36 void        randombytes_sysrandom_buf(void * const buf, const size_t size);
37
38 SODIUM_EXPORT
39 int         randombytes_sysrandom_close(void);
40
41 #ifdef __cplusplus
42 }
43 #endif
44
45 #endif