diff options
author | Rob Austein <sra@hactrn.net> | 2006-10-09 16:31:22 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2006-10-09 16:31:22 +0000 |
commit | aba277548b76071e75fc9478002a6fc2145f64f1 (patch) | |
tree | f07acb17076536343634c4d3c1938b56c60816b8 /openssl/vendor/0.9.8d/MacOS/Randomizer.h | |
parent | 1b2aa7959c86a835491c8cfca8c0683b747c1855 (diff) |
Tag vendor OpenSSL 0.9.8d
svn path=/openssl/vendor/0.9.8d; revision=376
Diffstat (limited to 'openssl/vendor/0.9.8d/MacOS/Randomizer.h')
-rw-r--r-- | openssl/vendor/0.9.8d/MacOS/Randomizer.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/openssl/vendor/0.9.8d/MacOS/Randomizer.h b/openssl/vendor/0.9.8d/MacOS/Randomizer.h new file mode 100644 index 00000000..565537b1 --- /dev/null +++ b/openssl/vendor/0.9.8d/MacOS/Randomizer.h @@ -0,0 +1,43 @@ + +// Gathers unpredictable system data to be used for generating +// random bits + +#include <MacTypes.h> + +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; +}; |