[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is there a reseed srandom seed feature ?
From: |
Greg Wooledge |
Subject: |
Re: is there a reseed srandom seed feature ? |
Date: |
Mon, 14 Oct 2024 07:14:26 -0400 |
On Mon, Oct 14, 2024 at 11:22:52 +0200, alex xmb sw ratchev wrote:
> as topic .. just asking ..
Are you talking about the SRANDOM variable, or the RANDOM variable?
The man page describes each of them. Assignment to RANDOM seeds that
particular random number generator. SRANDOM is not, and cannot be,
seeded. It uses the system's /dev/urandom interface.
SRANDOM
This variable expands to a 32-bit pseudo-random number each time
it is referenced. The random number generator is not linear on
systems that support /dev/urandom or arc4random, so each re‐
turned number has no relationship to the numbers preceding it.
The random number generator cannot be seeded, so assignments to
this variable have no effect. If SRANDOM is unset, it loses its
special properties, even if it is subsequently reset.