diff options
author | 2000-04-15 06:18:28 +0000 | |
---|---|---|
committer | 2000-04-15 06:18:28 +0000 | |
commit | f6e3f26248a24c86023ecf5715f4f93988bb2af0 (patch) | |
tree | ac021db17e92c0faf3fd3cde4f68d156321aa307 /lib/libssl/src/MacOS/Randomizer.h | |
parent | Modify to build with ncurses, not ocurses. A proper port to terminfo (diff) | |
download | wireguard-openbsd-f6e3f26248a24c86023ecf5715f4f93988bb2af0.tar.xz wireguard-openbsd-f6e3f26248a24c86023ecf5715f4f93988bb2af0.zip |
OpenSSL 0.9.5a merge
Diffstat (limited to 'lib/libssl/src/MacOS/Randomizer.h')
-rw-r--r-- | lib/libssl/src/MacOS/Randomizer.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/libssl/src/MacOS/Randomizer.h b/lib/libssl/src/MacOS/Randomizer.h new file mode 100644 index 00000000000..565537b15df --- /dev/null +++ b/lib/libssl/src/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; +}; |