]>
Commit | Line | Data |
---|---|---|
fe72459e DB |
1 | #ifndef UTIL_LINUX_RANDUTILS |
2 | #define UTIL_LINUX_RANDUTILS | |
3 | ||
4 | #ifdef HAVE_SRANDOM | |
5 | #define srand(x) srandom(x) | |
6 | #define rand() random() | |
7 | #endif | |
8 | ||
a55d646b | 9 | /* rand() based */ |
a55d646b KZ |
10 | extern int rand_get_number(int low_n, int high_n); |
11 | ||
12 | /* /dev/urandom based with fallback to rand() */ | |
fe72459e | 13 | extern int random_get_fd(void); |
c544aa2c | 14 | extern void random_get_bytes(void *buf, size_t nbytes); |
0720d60c | 15 | extern const char *random_tell_source(void); |
fe72459e DB |
16 | |
17 | #endif |