1822504 Members
2618 Online
109642 Solutions
New Discussion юеВ

random number generator

 
Yewen Tang
Occasional Contributor

random number generator

I'm working on HP-UX 11.00 (visulize workstation 785). It seems to be lack of a random number source like /dev/random on other UNIX. I installed a EGD. Some applications work with it. Some don't. Can I install something like /dev/random as a default random number source for other application? What software should I install?

random number generater
5 REPLIES 5
Cheryl Griffin
Honored Contributor

Re: random number generator

HP-UX does not have a /dev/random but does have random(3M) that will generate random numbers using a different method.
"Downtime is a Crime."
melvyn burnard
Honored Contributor

Re: random number generator

HP-UX does not have an equivalent of /dev/random, but you could take a look at the command
random(3m)

DESCRIPTION
The random() and srandom() functions are random-number generators that
have virtually the same calling sequence and initialization properties
as the rand() and srand() functions,
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Brian M. Fisher
Honored Contributor

Re: random number generator

To generate a random number between 1 & 10

((num=RANDOM %10 + 1)) ; print $num

Brian
<*(((>< er
Perception IS Reality
Ralf Hildebrandt
Valued Contributor

Re: random number generator

For cryptographical use, random is of course worthless. IMHO HP has totally forgotten to offer a decent source for random number generation -- thus EGD is your only chance.
Postfix/BIND/Security/IDS/Scanner, you name it...
Tom Danzig
Honored Contributor

Re: random number generator

I believe awk also offers random number generation via rand().