summaryrefslogtreecommitdiff
path: root/src/librandom/unirandom_register.c
blob: e1749096c1f7fc6282417b8bf4a57c7383ccf480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* ISC license. */

#include <errno.h>
#include <skalibs/unirandom.h>
#include "random-internal.h"

void unirandom_register (unirandom *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 ;
}