#ifndef CPRNG_H #define CPRNG_H #include #define CPRNG_MAX 0x10000000 struct cprng { uint32_t state[16]; unsigned int buffered; unsigned int remaining; }; extern void cprng_seed(struct cprng *, uint8_t[32]); extern void cprng_buf(struct cprng *, void *, size_t); extern uint32_t cprng32(struct cprng *); extern uint64_t cprng64(struct cprng *); #endif /* CPRNG_H */