diff options
author | schwarze <> | 2016-11-03 15:48:22 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-03 15:48:22 +0000 |
commit | b55a697c676bec213476fdf1525e9291c5d4aaf6 (patch) | |
tree | d168499a4dfb3fdd832a07f798870ad797dfd972 /src/lib/libcrypto/man/RAND_bytes.3 | |
parent | 67adc08f675407bec0b8772e99ac4b939530d7e9 (diff) | |
download | openbsd-b55a697c676bec213476fdf1525e9291c5d4aaf6.tar.gz openbsd-b55a697c676bec213476fdf1525e9291c5d4aaf6.tar.bz2 openbsd-b55a697c676bec213476fdf1525e9291c5d4aaf6.zip |
convert RAND manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/RAND_bytes.3')
-rw-r--r-- | src/lib/libcrypto/man/RAND_bytes.3 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/RAND_bytes.3 b/src/lib/libcrypto/man/RAND_bytes.3 new file mode 100644 index 0000000000..41f0950fe3 --- /dev/null +++ b/src/lib/libcrypto/man/RAND_bytes.3 | |||
@@ -0,0 +1,52 @@ | |||
1 | .Dd $Mdocdate: November 3 2016 $ | ||
2 | .Dt RAND_BYTES 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm RAND_bytes , | ||
6 | .Nm RAND_pseudo_bytes | ||
7 | .Nd generate random data | ||
8 | .Sh SYNOPSIS | ||
9 | .In openssl/rand.h | ||
10 | .Ft int | ||
11 | .Fo RAND_bytes | ||
12 | .Fa "unsigned char *buf" | ||
13 | .Fa "int num" | ||
14 | .Fc | ||
15 | .Ft int | ||
16 | .Fo RAND_pseudo_bytes | ||
17 | .Fa "unsigned char *buf" | ||
18 | .Fa "int num" | ||
19 | .Fc | ||
20 | .Sh DESCRIPTION | ||
21 | .Fn RAND_bytes | ||
22 | puts | ||
23 | .Fa num | ||
24 | cryptographically strong pseudo-random bytes into | ||
25 | .Fa buf . | ||
26 | .Pp | ||
27 | .Fn RAND_pseudo_bytes | ||
28 | puts | ||
29 | .Fa num | ||
30 | pseudo-random bytes into | ||
31 | .Fa buf . | ||
32 | Pseudo-random byte sequences generated by | ||
33 | .Fn RAND_pseudo_bytes | ||
34 | will be unique if they are of sufficient length, but are not necessarily | ||
35 | unpredictable. | ||
36 | They can be used for non-cryptographic purposes and for certain purposes | ||
37 | in cryptographic protocols, but usually not for key generation etc. | ||
38 | .Sh RETURN VALUES | ||
39 | .Fn RAND_bytes | ||
40 | returns 1. | ||
41 | .Fn RAND_pseudo_bytes | ||
42 | returns 1. | ||
43 | .Sh SEE ALSO | ||
44 | .Xr ERR_get_error 3 , | ||
45 | .Xr RAND_add 3 | ||
46 | .Sh HISTORY | ||
47 | .Fn RAND_bytes | ||
48 | is available in all versions of SSLeay and OpenSSL. | ||
49 | It has a return | ||
50 | value since OpenSSL 0.9.5. | ||
51 | .Fn RAND_pseudo_bytes | ||
52 | was added in OpenSSL 0.9.5. | ||