linux - Something similar to /dev/urandom with configurable seed? -


i'm dd'ing /dev/urandom in order create files random contents. works well, able reproduce file contents @ later point running prng again same seed. there seedable prng exposes character device?

i'm using recent linux 3.x kernels.

taken urandom documentation

when linux system starts without operator interaction, entropy pool may in predictable state. reduces actual amount of noise in entropy pool below estimate. in order counteract effect, helps carry entropy pool information across shut-downs , start-ups. this, add following lines appropriate script run during linux system start-up sequence:

    echo "initializing kernel random number generator..."     # initialize kernel random number generator random seed      # last shut-down (or start-up) start-up.  load ,      # save 512 bytes, size of entropy pool.     if [ -f /var/random-seed ];             cat /var/random-seed >/dev/urandom     fi     dd if=/dev/urandom of=/var/random-seed count=1 

Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -