On 8/4/05, Scott Gifford <[EMAIL PROTECTED]> wrote: > > Pat Adams <[EMAIL PROTECTED]> writes: > > > On Thu, 2005-08-04 at 14:44 -0500, 2wsxdr5 wrote: > >> There are also several places that you can get a reasonably random > >> number for the seed from your machine. The amount of free disk space, > >> unless that doesn't change much on your machine. The amount of free > >> RAM, (up time mod cpu usage). Any number of things could be used that > >> are not very predictable, if at all. > > > > But again, those aren't truely random. They're random-enough for the > > average web applications. The original poster, if memory serves, asked > > if it was possible to get true random numbers from MySQL. True random > > numbers can't be predicted even if I know everything about your system. > > Because computers are predictable beasts, the random number generators > > that they used are constrained by the hardware limits. > > /dev/random is a source of some genuine entropy on many Unix-like > operating systems. It uses variations in system timings that are > believed to be truly random. It's not good for a large volume of > output, but it's a good seed. You could probably incorporate access > to it or its friend /dev/urandom as a UDF: > > http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Adding_UDF.html > > EGD (Entropy Gathering Daemon) is an option for other Unix-like > systems: > > http://egd.sourceforge.net/ > > or you can use a Lava Lamp: > > http://www.lavarnd.org/index.html > > I'm sure Windows has some way to do this, too. > > Many systems also have an onboard random number generator which you > should be able to access through an OS driver. > > ----ScottG. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > Thanks for the wonderful sources!
-- Power to people, Linux is here.