From db6608bd819d10cc2ddb57d18054d62d4ca15596 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 23 Nov 2003 18:21:42 +0000 Subject: add libsec --- src/libsec/port/fastrand.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/libsec/port/fastrand.c (limited to 'src/libsec/port/fastrand.c') diff --git a/src/libsec/port/fastrand.c b/src/libsec/port/fastrand.c new file mode 100644 index 00000000..14571277 --- /dev/null +++ b/src/libsec/port/fastrand.c @@ -0,0 +1,16 @@ +#include +#include +#include + +/* + * use the X917 random number generator to create random + * numbers (faster than truerand() but not as random). + */ +ulong +fastrand(void) +{ + ulong x; + + genrandom((uchar*)&x, sizeof x); + return x; +} -- cgit v1.2.3