Of the use of unpredictableSeed
Shachar Shemesh via Digitalmars-d
digitalmars-d at puremagic.com
Mon Mar 6 23:20:03 PST 2017
On 07/03/17 00:19, sarn wrote:
> On Monday, 6 March 2017 at 10:12:09 UTC, Shachar Shemesh wrote:
>> Excuse me if I'm asking a trivial question. Why not just seed it from
>> /dev/urandom? (or equivalent on non-Linux platforms. I know at least
>> Windows has an equivalent).
>>
>> Shachar
>
> One reason is that /dev/urandom isn't always available, e.g., in a
> chroot. Sure, these are corner cases, but it's annoying when stuff like
> this doesn't "just work".
If I write a program that relies on there being /dev/null, /dev/zero or
/dev/tty, I don't go ahead and publish this on the program requirements.
It is okay to assume those are available to me, and if your chroot/LFS
install doesn't have them and my program breaks, well, tough to be you.
I don't think /dev/urandom is any different in that regard. Worst case,
you can try to use it, and fall back to whatever it is we're doing today
if it doesn't work. I don't think the chroot argument is a good one, though.
Shachar
More information about the Digitalmars-d
mailing list