samedi 30 décembre 2017

PHP code for random number using /dev/random

Im running Ubuntu Server 16.04.3 LTS with TrueRNG V3 USB and rng-tools setup to use the hardware random number generator. I am not worried about blocking with this setup. My understanding is that the hardware RNG will fill /dev/random not /dev/urandom.

What code could I use in PHP to get a random number between min and max that uses /dev/random and thus my hardware RNG. There are plenty of articles about why not to use /dev/random, the use of mt_rand, etc but I cannot find any code on using /dev/random now that I have the hardware RNG installed.

I have done a lot of research but come up empty this time.

Can anyone help?




Aucun commentaire:

Enregistrer un commentaire