Re: using /dev/random

2008-09-26 Thread RW
On Thu, 25 Sep 2008 20:33:34 +0100 Kris Kennaway <[EMAIL PROTECTED]> wrote: > RW wrote: > > On Tue, 23 Sep 2008 11:52:07 -0400 > > kern.random.sys.seeded is just a flag that gets set to 1 on each > > reseed. IIRC it's also initialized to 1 so it doesn't actually do > > anything very useful. > >

Re: using /dev/random

2008-09-25 Thread Kris Kennaway
RW wrote: On Tue, 23 Sep 2008 11:52:07 -0400 Lowell Gilbert <[EMAIL PROTECTED]> wrote: Robert Huff <[EMAIL PROTECTED]> writes: What is the canonical way to get data from /dev/random? Specifically: having opened the file, how do I read the stream? I'm currently using union { fl

Re: using /dev/random

2008-09-23 Thread RW
On Tue, 23 Sep 2008 11:52:07 -0400 Lowell Gilbert <[EMAIL PROTECTED]> wrote: > Robert Huff <[EMAIL PROTECTED]> writes: > > > What is the canonical way to get data from /dev/random? > > Specifically: having opened the file, how do I read the stream? > > I'm currently using > > > > > > union

Re: using /dev/random

2008-09-23 Thread Lowell Gilbert
Robert Huff <[EMAIL PROTECTED]> writes: > What is the canonical way to get data from /dev/random? > Specifically: having opened the file, how do I read the stream? > I'm currently using > > > union { > float f; > char c[4]; > } foo; > > foo.f = 0.0; > > fscanf(rand_fp,"%4c",f

Re: using /dev/random

2008-09-23 Thread Lowell Gilbert
Robert Huff <[EMAIL PROTECTED]> writes: > What is the canonical way to get data from /dev/random? > Specifically: having opened the file, how do I read the stream? > I'm currently using > > > union { > float f; > char c[4]; > } foo; > > foo.f = 0.0; > > fscanf(rand_fp,"%4c",f

Re: using /dev/random

2008-09-23 Thread RW
On Tue, 23 Sep 2008 13:39:35 +0100 RW <[EMAIL PROTECTED]> wrote: > On Tue, 23 Sep 2008 00:51:02 -0700 > "Ted Mittelstaedt" <[EMAIL PROTECTED]> wrote: > > If you really want to roll-your-own and not use these functions > > then you could read blocks from /dev/random and run > > a Chi-square and M

Re: using /dev/random

2008-09-23 Thread RW
On Tue, 23 Sep 2008 00:51:02 -0700 "Ted Mittelstaedt" <[EMAIL PROTECTED]> wrote: > The canonical way is to use the functions random(), or srandom() > or srandomdev() or arc4random() depending on what > you need the random data for. /dev/random is really only > useful for seeding these functions

RE: using /dev/random

2008-09-23 Thread Ted Mittelstaedt
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Robert Huff > Sent: Monday, September 22, 2008 9:54 PM > To: [EMAIL PROTECTED] > Subject: using /dev/random > > > > What is the canonical way to get data from /dev/random? > Specifically: having

Re: using /dev/random

2008-09-23 Thread Wojciech Puchar
What is the canonical way to get data from /dev/random? Specifically: having opened the file, how do I read the stream? I'm currently using union { float f; char c[4]; } foo; foo.f = 0.0; fscanf(rand_fp,"%4c",foo.c); simply read 4 bytes into foo ___