#ifndef CPRNG_H #define CPRNG_H #include #define CPRNG_MAX 0x10000000 struct cprng { uint32_t key[8]; uint32_t nonce[4]; uint32_t buffer[16]; unsigned int buffered; }; 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 */