|
@@ -122,26 +122,26 @@ void noise_regular(void)
|
|
|
|
|
|
MPEXT_PUTTY_SECTION_ENTER;
|
|
|
w = GetForegroundWindow();
|
|
|
- random_add_noise(&w, sizeof(w));
|
|
|
+ random_add_noise(NOISE_SOURCE_FGWINDOW, &w, sizeof(w));
|
|
|
w = GetCapture();
|
|
|
- random_add_noise(&w, sizeof(w));
|
|
|
+ random_add_noise(NOISE_SOURCE_CAPTURE, &w, sizeof(w));
|
|
|
w = GetClipboardOwner();
|
|
|
- random_add_noise(&w, sizeof(w));
|
|
|
+ random_add_noise(NOISE_SOURCE_CLIPBOARD, &w, sizeof(w));
|
|
|
z = GetQueueStatus(QS_ALLEVENTS);
|
|
|
- random_add_noise(&z, sizeof(z));
|
|
|
+ random_add_noise(NOISE_SOURCE_QUEUE, &z, sizeof(z));
|
|
|
|
|
|
GetCursorPos(&pt);
|
|
|
- random_add_noise(&pt, sizeof(pt));
|
|
|
+ random_add_noise(NOISE_SOURCE_CURSORPOS, &pt, sizeof(pt));
|
|
|
|
|
|
GlobalMemoryStatus(&memstat);
|
|
|
- random_add_noise(&memstat, sizeof(memstat));
|
|
|
+ random_add_noise(NOISE_SOURCE_MEMINFO, &memstat, sizeof(memstat));
|
|
|
|
|
|
GetThreadTimes(GetCurrentThread(), times, times + 1, times + 2,
|
|
|
times + 3);
|
|
|
- random_add_noise(×, sizeof(times));
|
|
|
+ random_add_noise(NOISE_SOURCE_THREADTIME, ×, sizeof(times));
|
|
|
GetProcessTimes(GetCurrentProcess(), times, times + 1, times + 2,
|
|
|
times + 3);
|
|
|
- random_add_noise(×, sizeof(times));
|
|
|
+ random_add_noise(NOISE_SOURCE_PROCTIME, ×, sizeof(times));
|
|
|
MPEXT_PUTTY_SECTION_LEAVE;
|
|
|
}
|
|
|
|
|
@@ -151,18 +151,18 @@ void noise_regular(void)
|
|
|
* counter to the noise pool. It gets the scan code or mouse
|
|
|
* position passed in.
|
|
|
*/
|
|
|
-void noise_ultralight(unsigned long data)
|
|
|
+void noise_ultralight(NoiseSourceId id, unsigned long data)
|
|
|
{
|
|
|
DWORD wintime;
|
|
|
LARGE_INTEGER perftime;
|
|
|
|
|
|
MPEXT_PUTTY_SECTION_ENTER;
|
|
|
- random_add_noise(&data, sizeof(DWORD));
|
|
|
+ random_add_noise(id, &data, sizeof(DWORD));
|
|
|
|
|
|
wintime = GetTickCount();
|
|
|
- random_add_noise(&wintime, sizeof(DWORD));
|
|
|
+ random_add_noise(NOISE_SOURCE_TIME, &wintime, sizeof(DWORD));
|
|
|
|
|
|
if (QueryPerformanceCounter(&perftime))
|
|
|
- random_add_noise(&perftime, sizeof(perftime));
|
|
|
+ random_add_noise(NOISE_SOURCE_PERFCOUNT, &perftime, sizeof(perftime));
|
|
|
MPEXT_PUTTY_SECTION_LEAVE;
|
|
|
}
|