From ea11aaf632e630c8ca705a1e9a1156c996d8708c Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 27 May 2002 01:59:58 +0000 Subject: kill unused arc4random_8() API --- share/man/man9/random.9 | 9 +++------ sys/dev/rnd.c | 6 ++++-- sys/dev/rndvar.h | 3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/share/man/man9/random.9 b/share/man/man9/random.9 index b0c0ff1ea51..3e184065f47 100644 --- a/share/man/man9/random.9 +++ b/share/man/man9/random.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: random.9,v 1.11 2001/09/28 16:02:52 heko Exp $ +.\" $OpenBSD: random.9,v 1.12 2002/05/27 01:59:58 deraadt Exp $ .\" .\" Copyright (c) 1996,2000 Michael Shalayeff .\" All rights reserved. @@ -52,8 +52,6 @@ .Fn add_audio_randomness "int" .Ft void .Fn get_random_bytes "void *buf" "size_t nbytes" -.Ft u_int8_t -.Fn arc4random_8 "void" .Ft u_int32_t .Fn arc4random "void" .br @@ -85,9 +83,8 @@ as it would by .Xr srandom 4 device. .br -.Nm arc4random , -.Nm arc4random_8 -will give random 32 and 8 respectively bit numbers hashed with +.Nm arc4random +will give random 32 bit numbers hashed with the ARC4 algorithm, which appears to be faster and less abusive to the entropy pool. .Sh SEE ALSO diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index 4685171d9ab..368e458e484 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.57 2002/04/01 08:25:58 mickey Exp $ */ +/* $OpenBSD: rnd.c,v 1.58 2002/05/27 01:59:58 deraadt Exp $ */ /* * random.c -- A strong random number generator @@ -553,7 +553,9 @@ arc4_reinit(v) arc4random_initialized = 0; } -int +static int arc4random_8(void); + +static int arc4random_8(void) { arc4maybeinit(); diff --git a/sys/dev/rndvar.h b/sys/dev/rndvar.h index 71ed91ece86..2267dee3a6f 100644 --- a/sys/dev/rndvar.h +++ b/sys/dev/rndvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rndvar.h,v 1.16 2002/03/14 01:26:52 millert Exp $ */ +/* $OpenBSD: rndvar.h,v 1.17 2002/05/27 01:59:58 deraadt Exp $ */ /* * Copyright (c) 1996,2000 Michael Shalayeff. @@ -92,7 +92,6 @@ extern struct rndstats rndstats; void enqueue_randomness(int, int); void get_random_bytes(void *, size_t); u_int32_t arc4random(void); -int arc4random_8(void); #endif /* _KERNEL */ -- cgit v1.2.3-59-g8ed1b