46d38c54a85b19d91245165cfb8b153ab8e4a0e6
[trex.git] /
1
2 #ifndef randombytes_salsa20_random_H
3 #define randombytes_salsa20_random_H
4
5 /*
6  * THREAD SAFETY: randombytes_salsa20_random*() functions are
7  * fork()-safe but not thread-safe.
8  * Always wrap them in a mutex if you need thread safety.
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_salsa20_implementation;
22
23 SODIUM_EXPORT
24 const char *randombytes_salsa20_implementation_name(void);
25
26 SODIUM_EXPORT
27 uint32_t    randombytes_salsa20_random(void);
28
29 SODIUM_EXPORT
30 void        randombytes_salsa20_random_stir(void);
31
32 SODIUM_EXPORT
33 uint32_t    randombytes_salsa20_random_uniform(const uint32_t upper_bound);
34
35 SODIUM_EXPORT
36 void        randombytes_salsa20_random_buf(void * const buf, const size_t size);
37
38 SODIUM_EXPORT
39 int         randombytes_salsa20_random_close(void);
40
41 #ifdef __cplusplus
42 }
43 #endif
44
45 #endif