rsa_arduino/prng.h
2024-03-05 14:15:03 +01:00

32 lines
478 B
C

#ifndef H_PRNG
#define H_PRNG
#define BUFSIZE 128
struct entropy_pool{
unsigned long buf[BUFSIZE];
int pool_size;
int position;
int pool_count;
};
extern struct entropy_pool s_entropy;
void init_entropy();
static void generateEntropy(int);
static unsigned long generateSeed();
unsigned long prng();
int prng2();
double *entropy_pool();
void entropy_cpu_clock(double *, int, int);
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif