Commit 17b8fc71 authored by Michael Graff's avatar Michael Graff
Browse files


parent a14eb888
......@@ -77,15 +77,16 @@ ISC_LANG_BEGINDECLS
* Extract only "good" data; return failure if there is not enough
* data available and there are no sources which we can poll to get
* data, or those sources are empty.
#define ISC_ENTROPY_GOODONLY 0x00000001U
* The entropy source is pollable for more data. This is most useful
* for things like files and devices. It should not be used for
* tty/keyboard data, device timings, etc.
#define ISC_ENTROPY_GOODONLY 0x00000001U
#define ISC_ENTROPY_POLLABLE 0x00000002U
*** Functions
......@@ -97,6 +98,14 @@ isc_entropy_create(isc_mem_t *mctx, isc_entropy_t **entp);
* Create a new entropy object.
isc_entropy_destroy(isc_entropy_t **entp);
* Destroys an entropy source.
* All entropy sources must be detached prior to calling this function.
isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname,
unsigned int flags,
......@@ -124,6 +133,19 @@ isc_entropy_destroysource(isc_entropysource_t **sourcep);
* Removes an entropy source from the entropy system.
isc_entropy_createsamplesource(isc_entropy_t *ent,
isc_entropysource_t **sourcep);
* Create an entropy source that consists of samples. Each sample is added
* to the source via isc_entropy_addsamples(), below.
isc_entropy_addsamples(isc_entropysource_t *source, isc_uint32_t *samples,
unsigned int count);
/* XXXMLG */
isc_entropy_getdata(isc_entropy_t *ent, void *data, unsigned int length,
unsigned int *returned, unsigned int flags);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment