]>
Commit | Line | Data |
---|---|---|
0ea34655 AP |
1 | |
2 | // Gathers unpredictable system data to be used for generating | |
3 | // random bits | |
4 | ||
5 | #include <MacTypes.h> | |
6 | ||
7 | class CRandomizer | |
8 | { | |
9 | public: | |
10 | CRandomizer (void); | |
11 | void PeriodicAction (void); | |
12 | ||
13 | private: | |
14 | ||
15 | // Private calls | |
16 | ||
17 | void AddTimeSinceMachineStartup (void); | |
18 | void AddAbsoluteSystemStartupTime (void); | |
19 | void AddAppRunningTime (void); | |
20 | void AddStartupVolumeInfo (void); | |
21 | void AddFiller (void); | |
22 | ||
23 | void AddCurrentMouse (void); | |
24 | void AddNow (double millisecondUncertainty); | |
25 | void AddBytes (void *data, long size, double entropy); | |
26 | ||
27 | void GetTimeBaseResolution (void); | |
28 | unsigned long SysTimer (void); | |
29 | ||
30 | // System Info | |
31 | bool mSupportsLargeVolumes; | |
32 | bool mIsPowerPC; | |
33 | bool mIs601; | |
34 | ||
35 | // Time info | |
36 | double mTimebaseTicksPerMillisec; | |
37 | unsigned long mLastPeriodicTicks; | |
38 | ||
39 | // Mouse info | |
40 | long mSamplePeriod; | |
41 | Point mLastMouse; | |
42 | long mMouseStill; | |
43 | }; |