News for hackers. Stuff that matters.
Re:Random Numbers in Bash by pmarreck on Monday March 27, 2023 @11:46AM (#35328180)
Anyone want to critique this deterministic random number generator I wrote not long ago in Bash that takes advantage of sha256 sums?

https://gist.github.com/pmarreck/e65f457e8755e461a87db7c94d4...

Re:Random Numbers in Bash by sltkr on Monday March 27, 2023 @12:19PM (#35328593)
$((32#$DRANDOM_SEED)) is not correct: the sha256 hash is in base 16, not 32. With your current implementation every fifth bit is always 0.
Re:Random Numbers in Bash by pmarreck on Monday March 27, 2023 @12:30PM (#35328738)
Ooooh, good find!