]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/random-util.h
basic/random-util: use most of the pseudorandom bytes from rand()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 25 Jun 2017 21:32:53 +0000 (17:32 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 28 Jun 2017 14:24:53 +0000 (10:24 -0400)
commit6a06b1a5d9d6a05404ea6ace739d39e6256968c3
tree0fc2aaa2b7c03a34e4149a059856325ebf69e2ec
parent66c36247e95e598d5cf6d78a627946d10f8c576f
basic/random-util: use most of the pseudorandom bytes from rand()

The only implementation that we care about — glibc — provides us
with 31 bits of entropy. Let's use 24 bits of that, instead of throwing
all but 8 away.
src/basic/random-util.c
src/basic/random-util.h