|
From: | Luuk |
Subject: | Re: $RANDOM not Cryptographically secure pseudorandom number generator |
Date: | Wed, 2 Jan 2019 12:01:45 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2-1-2019 02:29, Ole Tange wrote:
On Mon, Dec 31, 2018 at 8:12 PM Chet Ramey <chet.ramey@case.edu> wrote: :Thanks for the patch. I'll take a look after I release bash-5.0. One question: can you reproduce the same random sequence by using the same seed? That's for backwards compatibility, even if the sequences themselves differ.Yes. Seeding with a value will give the same sequence: $ RANDOM=4; echo $RANDOM $RANDOM 21584 22135 $ RANDOM=4; echo $RANDOM $RANDOM 21584 22135
But not across systems: luuk@WINDOWS:/mnt/c/Windows/System32$ RANDOM=4;echo $RANDOM $RANDOM 1692 27588 luuk@WINDOWS:/mnt/c/Windows/System32$ RANDOM=4;echo $RANDOM $RANDOM 1692 27588 luuk@opensuse:~> RANDOM=4; echo $RANDOM $RANDOM 32221 21043 luuk@opensuse:~> RANDOM=4; echo $RANDOM $RANDOM 32221 21043
[Prev in Thread] | Current Thread | [Next in Thread] |