commit | 0fc65b37a1e7585ca2347bf61dcb8bc3a6b146a4 | [log] [tgz] |
---|---|---|
author | rsc <devnull@localhost> | Sun Mar 21 14:04:56 2004 +0000 |
committer | rsc <devnull@localhost> | Sun Mar 21 14:04:56 2004 +0000 |
tree | dd9189a823998f494082adb769451f12be056566 | |
parent | 768206abfcf505fb034a0151bf263bc0b1f2380c [diff] [blame] |
Add most of libsec.
diff --git a/src/libsec/port/prng.c b/src/libsec/port/prng.c new file mode 100644 index 0000000..fc2e508 --- /dev/null +++ b/src/libsec/port/prng.c
@@ -0,0 +1,15 @@ +#include "os.h" +#include <mp.h> +#include <libsec.h> + +// +// just use the libc prng to fill a buffer +// +void +prng(uchar *p, int n) +{ + uchar *e; + + for(e = p+n; p < e; p++) + *p = rand(); +}