summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/RAND_add.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/doc/RAND_add.pod')
-rw-r--r--src/lib/libcrypto/doc/RAND_add.pod25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/libcrypto/doc/RAND_add.pod b/src/lib/libcrypto/doc/RAND_add.pod
index 0a13ec2a92..67c66f3e0c 100644
--- a/src/lib/libcrypto/doc/RAND_add.pod
+++ b/src/lib/libcrypto/doc/RAND_add.pod
@@ -2,7 +2,8 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5RAND_add, RAND_seed, RAND_screen - add entropy to the PRNG 5RAND_add, RAND_seed, RAND_status, RAND_event, RAND_screen - add
6entropy to the PRNG
6 7
7=head1 SYNOPSIS 8=head1 SYNOPSIS
8 9
@@ -14,6 +15,7 @@ RAND_add, RAND_seed, RAND_screen - add entropy to the PRNG
14 15
15 int RAND_status(void); 16 int RAND_status(void);
16 17
18 int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam);
17 void RAND_screen(void); 19 void RAND_screen(void);
18 20
19=head1 DESCRIPTION 21=head1 DESCRIPTION
@@ -40,17 +42,24 @@ or L<RAND_load_file(3)|RAND_load_file(3)>.
40 42
41RAND_seed() is equivalent to RAND_add() when B<num == entropy>. 43RAND_seed() is equivalent to RAND_add() when B<num == entropy>.
42 44
45RAND_event() collects the entropy from Windows events such as mouse
46movements and other user interaction. It should be called with the
47B<iMsg>, B<wParam> and B<lParam> arguments of I<all> messages sent to
48the window procedure. It will estimate the entropy contained in the
49event message (if any), and add it to the PRNG. The program can then
50process the messages as usual.
51
43The RAND_screen() function is available for the convenience of Windows 52The RAND_screen() function is available for the convenience of Windows
44programmers. It adds the current contents of the screen to the PRNG. 53programmers. It adds the current contents of the screen to the PRNG.
45For applications that can catch Windows events, seeding the PRNG with 54For applications that can catch Windows events, seeding the PRNG by
46the parameters of B<WM_MOUSEMOVE> events is a significantly better 55calling RAND_event() is a significantly better source of
47source of randomness. It should be noted that both methods cannot be 56randomness. It should be noted that both methods cannot be used on
48used on servers that run without user interaction. 57servers that run without user interaction.
49 58
50=head1 RETURN VALUES 59=head1 RETURN VALUES
51 60
52RAND_status() returns 1 if the PRNG has been seeded with enough data, 61RAND_status() and RAND_event() return 1 if the PRNG has been seeded
530 otherwise. 62with enough data, 0 otherwise.
54 63
55The other functions do not return values. 64The other functions do not return values.
56 65
@@ -63,6 +72,6 @@ L<RAND_load_file(3)|RAND_load_file(3)>, L<RAND_cleanup(3)|RAND_cleanup(3)>
63 72
64RAND_seed() and RAND_screen() are available in all versions of SSLeay 73RAND_seed() and RAND_screen() are available in all versions of SSLeay
65and OpenSSL. RAND_add() and RAND_status() have been added in OpenSSL 74and OpenSSL. RAND_add() and RAND_status() have been added in OpenSSL
660.9.5. 750.9.5, RAND_event() in OpenSSL 0.9.5a.
67 76
68=cut 77=cut