Re: [ILUG] Random number?

From: Kenn Humborg (kenn at domain linux.ie)
Date: Sun 25 Feb 2001 - 21:16:39 GMT


On Sun, Feb 25, 2001 at 10:03:16PM +0000, Sean O'Riordain wrote:
> under more recent kernels >2.2? there is an entropy pool which is taken
> from things like disk activity etc... which is designed to be pretty
> random... openssl will have routines to use it... no idea how to use it
> in a shell script though...

This will give you 128 bits of randomness:

   dd if=/dev/random bs=16 count=1 2>/dev/null

Then pipe it through od(1) or a little perl or awk script to format it
in decimal (exercise for reader).

Later,
Kenn



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:09:06 GMT