29 lines
407 B
Plaintext
29 lines
407 B
Plaintext
#ifndef H_PRNG
|
|
#define H_PRNG
|
|
|
|
#define BUFSIZE 128
|
|
|
|
struct entropy_pool{
|
|
unsigned long buf[BUFSIZE];
|
|
int pool_size;
|
|
};
|
|
|
|
extern struct entropy_pool s_entropy;
|
|
|
|
void init_entropy();
|
|
unsigned long prng(int);
|
|
int prng2();
|
|
static void readDevRandom(char *);
|
|
double *entropy_pool();
|
|
void entropy_cpu_clock(double *, int, int);
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|