From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- libsec/port/fastrand.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libsec/port/fastrand.c (limited to 'libsec/port/fastrand.c') diff --git a/libsec/port/fastrand.c b/libsec/port/fastrand.c new file mode 100644 index 00000000..b65ba683 --- /dev/null +++ b/libsec/port/fastrand.c @@ -0,0 +1,15 @@ +#include "os.h" +#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