From 390e9177b6abd61dc70c43919a1ef0ec18aeda32 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Mon, 21 Oct 2013 20:33:23 +0000 Subject: Remove arc4random_stir() and arc4random_addrandom(), which none should be using directly. Well, a few rare people cloned it upstream and it will take a bit of time for them to learn. ok various --- src/lib/libc/crypt/arc4random.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'src/lib/libc/crypt/arc4random.c') diff --git a/src/lib/libc/crypt/arc4random.c b/src/lib/libc/crypt/arc4random.c index 356e231815..e836395803 100644 --- a/src/lib/libc/crypt/arc4random.c +++ b/src/lib/libc/crypt/arc4random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random.c,v 1.25 2013/10/01 18:34:57 markus Exp $ */ +/* $OpenBSD: arc4random.c,v 1.26 2013/10/21 20:33:23 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -158,31 +158,6 @@ _rs_random_u32(u_int32_t *val) return; } -void -arc4random_stir(void) -{ - _ARC4_LOCK(); - _rs_stir(); - _ARC4_UNLOCK(); -} - -void -arc4random_addrandom(u_char *dat, int datlen) -{ - int m; - - _ARC4_LOCK(); - if (!rs_initialized) - _rs_stir(); - while (datlen > 0) { - m = MIN(datlen, KEYSZ + IVSZ); - _rs_rekey(dat, m); - dat += m; - datlen -= m; - } - _ARC4_UNLOCK(); -} - u_int32_t arc4random(void) { -- cgit v1.2.3-55-g6feb