diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-04-02 20:17:46 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-04-02 20:17:46 +0000 |
commit | e887df3c0f00c5060df6adca1eadfaa64cf038f8 (patch) | |
tree | 9da90130572544c24a3eac284639f5e79531a6fa /sys/dev/rnd.c | |
parent | 9f2da5ad634b6275c8427a39fcd960d2a22dd25f (diff) |
kill _8 api completely
Diffstat (limited to 'sys/dev/rnd.c')
-rw-r--r-- | sys/dev/rnd.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index bdd59a0c0e2..11befa342ca 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.67 2004/03/15 14:17:25 mickey Exp $ */ +/* $OpenBSD: rnd.c,v 1.68 2004/04/02 20:17:45 mickey Exp $ */ /* * rnd.c -- A strong random number generator @@ -582,15 +582,6 @@ arc4_reinit(v) arc4random_initialized = 0; } -static int arc4random_8(void); - -static int -arc4random_8(void) -{ - arc4maybeinit(); - return arc4_getbyte(); -} - u_int32_t arc4random(void) { @@ -1023,8 +1014,9 @@ randomread(dev, uio, ioflag) { u_int8_t *cp = (u_int8_t *) buf; u_int8_t *end = cp + n; + arc4maybeinit(); while (cp < end) - *cp++ = arc4random_8(); + *cp++ = arc4_getbyte(); break; } default: |