summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/RAND_set_rand_method.pod
diff options
context:
space:
mode:
authorbeck <>2000-03-19 11:13:58 +0000
committerbeck <>2000-03-19 11:13:58 +0000
commit796d609550df3a33fc11468741c5d2f6d3df4c11 (patch)
tree6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/doc/RAND_set_rand_method.pod
parent5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff)
downloadopenbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz
openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2
openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2 if you are using the ssl26 packages for ssh and other things to work you will need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/doc/RAND_set_rand_method.pod')
-rw-r--r--src/lib/libcrypto/doc/RAND_set_rand_method.pod57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/lib/libcrypto/doc/RAND_set_rand_method.pod b/src/lib/libcrypto/doc/RAND_set_rand_method.pod
new file mode 100644
index 0000000000..466e9b8767
--- /dev/null
+++ b/src/lib/libcrypto/doc/RAND_set_rand_method.pod
@@ -0,0 +1,57 @@
1=pod
2
3=head1 NAME
4
5RAND_set_rand_method, RAND_get_rand_method, RAND_SSLeay - select RAND method
6
7=head1 SYNOPSIS
8
9 #include <openssl/rand.h>
10
11 void RAND_set_rand_method(RAND_METHOD *meth);
12
13 RAND_METHOD *RAND_get_rand_method(void);
14
15 RAND_METHOD *RAND_SSLeay(void);
16
17=head1 DESCRIPTION
18
19A B<RAND_METHOD> specifies the functions that OpenSSL uses for random
20number generation. By modifying the method, alternative
21implementations such as hardware RNGs may be used. Initially, the
22default is to use the OpenSSL internal implementation. RAND_SSLeay()
23returns a pointer to that method.
24
25RAND_set_rand_method() sets the RAND method to B<meth>.
26RAND_get_rand_method() returns a pointer to the current method.
27
28=head1 THE RAND_METHOD STRUCTURE
29
30 typedef struct rand_meth_st
31 {
32 void (*seed)(const void *buf, int num);
33 int (*bytes)(unsigned char *buf, int num);
34 void (*cleanup)(void);
35 void (*add)(const void *buf, int num, int entropy);
36 int (*pseudorand)(unsigned char *buf, int num);
37 } RAND_METHOD;
38
39The components point to the implementation of RAND_seed(),
40RAND_bytes(), RAND_cleanup(), RAND_add() and RAND_pseudo_rand().
41Each component may be NULL if the function is not implemented.
42
43=head1 RETURN VALUES
44
45RAND_set_rand_method() returns no value. RAND_get_rand_method() and
46RAND_SSLeay() return pointers to the respective methods.
47
48=head1 SEE ALSO
49
50L<rand(3)|rand(3)>
51
52=head1 HISTORY
53
54RAND_set_rand_method(), RAND_get_rand_method() and RAND_SSLeay() are
55available in all versions of OpenSSL.
56
57=cut