[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Robert Connolly
Subject: arc4random()
Date: Thu, 26 Apr 2007 01:38:46 -0400
User-agent: KMail/1.9.4

Hello. I have attached a very simple patch to add arc4random() to Bash for 
setting $RANDOM. It does not break the expected behavior of $RANDOM. It 
simply replaces getpid()+gettimeofday() with arc4random(). arc4random() is 
available on all BSD variants, and is used to get random numbers for 
non-cryptographic applications using little or no kernel entropy.

The behavior of being able to set 'RANDOM=1' to get a predictable number is 
unaffected by this patch. Please consider adding this patch so an 
uninitialized $RANDOM variable will be slightly better quality.


Attachment: bash-3.2-arc4random.diff
Description: Text Data

Attachment: pgpFp_2g3OWqy.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]