Passenger::RandomGenerator Class Reference

A random data generator. More...

#include <RandomGenerator.h>

List of all members.


Detailed Description

A random data generator.

Data is generated using /dev/urandom, and is cryptographically secure. Unlike rand() and friends, RandomGenerator does not require seeding.

The reason why RandomGenerator isn't a singleton is because opening /dev/urandom is *very* slow on Mac OS X and OpenBSD. Each object of this class caches the /dev/urandom file handle.

This class is thread-safe as long as there are no concurrent calls to reopen() or close().


The documentation for this class was generated from the following file:

Generated on Sun Feb 21 12:22:48 2010 for Passenger by  doxygen 1.5.8