diff options
author | Paul R. Eggert <eggert@cs.ucla.edu> | 2010-07-20 09:50:37 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-07-20 09:51:12 -0700 |
commit | c1d8e6e458c2f9deb3013538d6db8da8f7f4e9f1 (patch) | |
tree | 8b541824476fa9f641b11ab89d89a3ebf3743aac /src | |
parent | e5444fa2a7a2ad4246e7a5e961d5c4aad2aecbe9 (diff) | |
download | coreutils-c1d8e6e458c2f9deb3013538d6db8da8f7f4e9f1.tar.xz |
randread: use /dev/urandom to seed, not just getpid etc
* gl/lib/rand-isaac.c (isaac_seed_start): New arg SEEDED.
(isaac_seed): New args FD and BYTES_BOUND. Read from FD if possible.
Don't bother with low-quality sources if FD has enough bytes.
* gl/lib/rand-isaac.h: New size_t arg for isaac_seed.
* gl/lib/randread.c: Include fcntl.h, unistd.h.
(NAME_OF_NONCE_DEVICE): New #define.
(nonce_device): New static var.
(randread_new): Use nonce device if available.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions