Also try /dev/rnd for random data.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@644 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Björn Groenvall
1996-08-12 10:02:20 +00:00
parent 5a382735b6
commit ade9160a68

View File

@@ -149,8 +149,19 @@ des_rand_data(unsigned char *data, int size)
{
int fd = open("/dev/random", O_RDONLY);
if (fd != -1 && read(fd, data, size) == size)
{
close(fd);
return;
if (fd != -1)
}
close(fd);
}
{
int fd = open("/dev/rnd", O_RDONLY);
if (fd != -1 && read(fd, data, size) == size)
{
close(fd);
return;
}
close(fd);
}