summaryrefslogtreecommitdiffstats
path: root/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/include/sodium/randombytes_salsa20_random.h
blob: 46d38c54a85b19d91245165cfb8b153ab8e4a0e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef randombytes_salsa20_random_H
#define randombytes_salsa20_random_H

/*
 * THREAD SAFETY: randombytes_salsa20_random*() functions are
 * fork()-safe but not thread-safe.
 * Always wrap them in a mutex if you need thread safety.
 */

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

#include "export.h"

#ifdef __cplusplus
extern "C" {
#endif

SODIUM_EXPORT
extern struct randombytes_implementation randombytes_salsa20_implementation;

SODIUM_EXPORT
const char *randombytes_salsa20_implementation_name(void);

SODIUM_EXPORT
uint32_t    randombytes_salsa20_random(void);

SODIUM_EXPORT
void        randombytes_salsa20_random_stir(void);

SODIUM_EXPORT
uint32_t    randombytes_salsa20_random_uniform(const uint32_t upper_bound);

SODIUM_EXPORT
void        randombytes_salsa20_random_buf(void * const buf, const size_t size);

SODIUM_EXPORT
int         randombytes_salsa20_random_close(void);

#ifdef __cplusplus
}
#endif

#endif