From 52261db09ef9dbf5abc95baed22722c5c332f9f7 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 20 Jun 2006 17:33:26 +0000 Subject: Pulling OpenSSL 0.9.8b into trunk svn path=/openssl/trunk; revision=3 --- openssl/trunk/MacOS/Randomizer.h | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 openssl/trunk/MacOS/Randomizer.h (limited to 'openssl/trunk/MacOS/Randomizer.h') diff --git a/openssl/trunk/MacOS/Randomizer.h b/openssl/trunk/MacOS/Randomizer.h new file mode 100644 index 00000000..565537b1 --- /dev/null +++ b/openssl/trunk/MacOS/Randomizer.h @@ -0,0 +1,43 @@ + +// Gathers unpredictable system data to be used for generating +// random bits + +#include + +class CRandomizer +{ +public: + CRandomizer (void); + void PeriodicAction (void); + +private: + + // Private calls + + void AddTimeSinceMachineStartup (void); + void AddAbsoluteSystemStartupTime (void); + void AddAppRunningTime (void); + void AddStartupVolumeInfo (void); + void AddFiller (void); + + void AddCurrentMouse (void); + void AddNow (double millisecondUncertainty); + void AddBytes (void *data, long size, double entropy); + + void GetTimeBaseResolution (void); + unsigned long SysTimer (void); + + // System Info + bool mSupportsLargeVolumes; + bool mIsPowerPC; + bool mIs601; + + // Time info + double mTimebaseTicksPerMillisec; + unsigned long mLastPeriodicTicks; + + // Mouse info + long mSamplePeriod; + Point mLastMouse; + long mMouseStill; +}; -- cgit v1.2.3