minix/drivers/random/random.h
Ben Gras 9647fbc94e moved type and constants for random data to include file;
added consistency check in random; added source of randomness
internal to random using timing; only retrieve random bins that are full.
2009-04-02 15:24:44 +00:00

16 lines
505 B
C

/*
random.h
Public interface to the random number generator
*/
/* Internal random sources */
#define RND_TIMING 0
#define RANDOM_SOURCES_INTERNAL 1
#define TOTAL_SOURCES (RANDOM_SOURCES+RANDOM_SOURCES_INTERNAL)
_PROTOTYPE( void random_init, (void) );
_PROTOTYPE( int random_isseeded, (void) );
_PROTOTYPE( void random_update, (int source, rand_t *buf, int count) );
_PROTOTYPE( void random_getbytes, (void *buf, size_t size) );
_PROTOTYPE( void random_putbytes, (void *buf, size_t size) );