mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-28 08:12:09 -05:00
Stir in process ID at start.
[originally from svn r5655]
This commit is contained in:
parent
f2537676cc
commit
b28330fc35
@ -19,6 +19,7 @@ void noise_get_heavy(void (*func) (void *, int))
|
|||||||
{
|
{
|
||||||
HANDLE srch;
|
HANDLE srch;
|
||||||
WIN32_FIND_DATA finddata;
|
WIN32_FIND_DATA finddata;
|
||||||
|
DWORD pid;
|
||||||
char winpath[MAX_PATH + 3];
|
char winpath[MAX_PATH + 3];
|
||||||
|
|
||||||
GetWindowsDirectory(winpath, sizeof(winpath));
|
GetWindowsDirectory(winpath, sizeof(winpath));
|
||||||
@ -31,6 +32,9 @@ void noise_get_heavy(void (*func) (void *, int))
|
|||||||
FindClose(srch);
|
FindClose(srch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pid = GetCurrentProcessId();
|
||||||
|
func(&pid, sizeof(pid));
|
||||||
|
|
||||||
read_random_seed(func);
|
read_random_seed(func);
|
||||||
/* Update the seed immediately, in case another instance uses it. */
|
/* Update the seed immediately, in case another instance uses it. */
|
||||||
random_save_seed();
|
random_save_seed();
|
||||||
@ -51,7 +55,7 @@ void random_save_seed(void)
|
|||||||
/*
|
/*
|
||||||
* This function is called every time the random pool needs
|
* This function is called every time the random pool needs
|
||||||
* stirring, and will acquire the system time in all available
|
* stirring, and will acquire the system time in all available
|
||||||
* forms and the battery status.
|
* forms.
|
||||||
*/
|
*/
|
||||||
void noise_get_light(void (*func) (void *, int))
|
void noise_get_light(void (*func) (void *, int))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user