return 0;
}
- if (RAND_event(iMsg, wParam, lParam) == 1 && seeded == 0) {
- seeded = 1;
- if (RAND_write_file(filename) <= 0)
- MessageBox(hwnd, "Couldn't write random file!",
- "OpenSSL", MB_OK | MB_ICONERROR);
- PostQuitMessage(0);
- }
-
return DefWindowProc(hwnd, iMsg, wParam, lParam);
}
=head1 NAME
-RAND_add, RAND_seed, RAND_status, RAND_event - add
+RAND_add, RAND_seed, RAND_status - add
entropy to the PRNG
=head1 SYNOPSIS
int RAND_status(void);
- int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam);
-
=head1 DESCRIPTION
RAND_add() mixes the B<num> bytes at B<buf> into the PRNG state. Thus,
RAND_seed() is equivalent to RAND_add() when B<num == entropy>.
-RAND_event() collects the entropy from Windows events such as mouse
-movements and other user interaction. It should be called with the
-B<iMsg>, B<wParam> and B<lParam> arguments of I<all> messages sent to
-the window procedure. It will estimate the entropy contained in the
-event message (if any), and add it to the PRNG. The program can then
-process the messages as usual.
-
=head1 RETURN VALUES
-RAND_status() and RAND_event() return 1 if the PRNG has been seeded
+RAND_status() returns 1 if the PRNG has been seeded
with enough data, 0 otherwise.
The other functions do not return values.
const RAND_METHOD *RAND_get_rand_method(void);
RAND_METHOD *RAND_OpenSSL(void);
- /* For Win32 only */
- int RAND_event(UINT, WPARAM, LPARAM);
-
Deprecated:
#if OPENSSL_API_COMPAT < 0x10100000L