diff options
| author | deraadt <> | 2013-10-21 20:33:23 +0000 |
|---|---|---|
| committer | deraadt <> | 2013-10-21 20:33:23 +0000 |
| commit | 33f9ccc1dc3260a80c11229729997d440367a1b3 (patch) | |
| tree | 13eebb874a399a3b218ec0e8f4a27008d3c1e547 /src/lib/libc/crypt/arc4random.c | |
| parent | a00d346dafc9cd7e6a2ed1808fe5eb20d90d5592 (diff) | |
| download | openbsd-33f9ccc1dc3260a80c11229729997d440367a1b3.tar.gz openbsd-33f9ccc1dc3260a80c11229729997d440367a1b3.tar.bz2 openbsd-33f9ccc1dc3260a80c11229729997d440367a1b3.zip | |
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
Diffstat (limited to 'src/lib/libc/crypt/arc4random.c')
| -rw-r--r-- | src/lib/libc/crypt/arc4random.c | 27 |
1 files changed, 1 insertions, 26 deletions
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 @@ | |||
| 1 | /* $OpenBSD: arc4random.c,v 1.25 2013/10/01 18:34:57 markus Exp $ */ | 1 | /* $OpenBSD: arc4random.c,v 1.26 2013/10/21 20:33:23 deraadt Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> |
| @@ -158,31 +158,6 @@ _rs_random_u32(u_int32_t *val) | |||
| 158 | return; | 158 | return; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | void | ||
| 162 | arc4random_stir(void) | ||
| 163 | { | ||
| 164 | _ARC4_LOCK(); | ||
| 165 | _rs_stir(); | ||
| 166 | _ARC4_UNLOCK(); | ||
| 167 | } | ||
| 168 | |||
| 169 | void | ||
| 170 | arc4random_addrandom(u_char *dat, int datlen) | ||
| 171 | { | ||
| 172 | int m; | ||
| 173 | |||
| 174 | _ARC4_LOCK(); | ||
| 175 | if (!rs_initialized) | ||
| 176 | _rs_stir(); | ||
| 177 | while (datlen > 0) { | ||
| 178 | m = MIN(datlen, KEYSZ + IVSZ); | ||
| 179 | _rs_rekey(dat, m); | ||
| 180 | dat += m; | ||
| 181 | datlen -= m; | ||
| 182 | } | ||
| 183 | _ARC4_UNLOCK(); | ||
| 184 | } | ||
| 185 | |||
| 186 | u_int32_t | 161 | u_int32_t |
| 187 | arc4random(void) | 162 | arc4random(void) |
| 188 | { | 163 | { |
