diff options
Diffstat (limited to 'src/librandom/unirandom_register.c')
-rw-r--r-- | src/librandom/unirandom_register.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/librandom/unirandom_register.c b/src/librandom/unirandom_register.c new file mode 100644 index 0000000..35f7411 --- /dev/null +++ b/src/librandom/unirandom_register.c @@ -0,0 +1,16 @@ +/* ISC license. */ + +#include <errno.h> +#include <skalibs/unirandom.h> +#include "random-internal.h" + +void unirandom_register (unirandom_ref u, int (*init) (union unirandominfo *), int (*finish) (union unirandominfo *), unsigned int (*readb) (union unirandominfo *, char *, unsigned int), unsigned int (*readnb) (union unirandominfo *, char *, unsigned int)) +{ + unirandom zero = UNIRANDOM_ZERO ; + *u = zero ; + u->init = init ; + u->finish = finish ; + u->readb = readb ; + u->readnb = readnb ; + u->initted = 0 ; +} |