diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-06-09 07:07:18 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-06-09 07:07:18 +0000 |
commit | dbc8994d667f55793aa0ca89944b34e9b027ccad (patch) | |
tree | 9190acdfd8ec27a88a4b4e9caa9cf6963eb7b419 /sys/dev/rnd.c | |
parent | 4c1ad4a6cb68b98b13b7a966950ddb4ed17ce8a0 (diff) |
rename arc4random_bytes => arc4random_buf to match libc's nicer name;
ok deraadt@
Diffstat (limited to 'sys/dev/rnd.c')
-rw-r--r-- | sys/dev/rnd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index c2692c62305..328919de450 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.88 2008/06/04 00:50:23 djm Exp $ */ +/* $OpenBSD: rnd.c,v 1.89 2008/06/09 07:07:16 djm Exp $ */ /* * rnd.c -- A strong random number generator @@ -564,7 +564,7 @@ arc4random(void) } static void -arc4random_bytes_large(void *buf, size_t n) +arc4random_buf_large(void *buf, size_t n) { u_char lbuf[ARC4_SUB_KEY_BYTES]; struct rc4_ctx lctx; @@ -583,13 +583,13 @@ arc4random_bytes_large(void *buf, size_t n) } void -arc4random_bytes(void *buf, size_t n) +arc4random_buf(void *buf, size_t n) { arc4maybeinit(); /* Satisfy large requests via an independent ARC4 instance */ if (n > ARC4_MAIN_MAX_BYTES) { - arc4random_bytes_large(buf, n); + arc4random_buf_large(buf, n); return; } @@ -1035,7 +1035,7 @@ randomread(dev_t dev, struct uio *uio, int ioflag) buf[i] = random() << 16 | (random() & 0xFFFF); break; case RND_ARND: - arc4random_bytes(buf, n); + arc4random_buf(buf, n); break; default: ret = ENXIO; |