srand
srand - seed the random number generator
srand EXPR
Sets the random number seed for the
rand
operator. If EXPR is omitted,
does
srand(time)
. Many folks use an explicit
srand(time ^ $$)
instead. Of course, you'd need something much more random than that for
cryptographic purposes, since it's easy to guess the current time.
Checksumming the compressed output of rapidly changing operating system
status programs is the usual method. Examples are posted regularly to
the comp.security.unix newsgroup.