lkml.org 
[lkml]   [1996]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Fast random generator was: Re: Ideas for v2.1
/dev/urandom is not intended to be used for getting random data for
filling a disk. If you want to do this, write a quick user-mode program
which sends to stdout a pseudo-random stream. For example:

int main(int argc, char **argv)
{
long r;
int ret;

while (1) {
r = random();
ret = write(1, r, sizeof(r));
if (ret <= 0)
break;
}
return 0
}

There's no need for a kernel based /dev/frandom.

- Ted


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.063 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site