Operating System - HP-UX
1753490 Members
5125 Online
108794 Solutions
New Discussion юеВ

Again, random number generator

 
Yewen Tang
Occasional Contributor

Again, random number generator

What I realy want is to install two perl modules for SSL communication. The attachment is i posted on other mailing lists.

Thanks
random number generater
2 REPLIES 2
Chris Moore
Advisor

Re: Again, random number generator

It looks like SSLeay is using /dev/random to seed a random number
generator. Are you sure you need it? Have you tried just not
defining DEVRANDOM in the e_os.h?
If you really need the random number generator seeded than you
can modify crypto/rand/md5_rand.c to use something else as
a seed - maybe a call to time().
Just because it's magic doesn't mean it's easy.
Andreas Voss
Honored Contributor

Re: Again, random number generator

Hi,

here a simple C program for creating random numbers:
#include

main()
{
srandom(time(NULL));
printf("%ld\n",random());
exit(0);
}

Put the source ie. into /etc/random.c
Then compile:
cc /etc/random.c -o /etc/random

Hope this helps

Andrew