summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/RAND_bytes.3
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 15:48:22 +0000
committerschwarze <>2016-11-03 15:48:22 +0000
commitb55a697c676bec213476fdf1525e9291c5d4aaf6 (patch)
treed168499a4dfb3fdd832a07f798870ad797dfd972 /src/lib/libcrypto/man/RAND_bytes.3
parent67adc08f675407bec0b8772e99ac4b939530d7e9 (diff)
downloadopenbsd-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.352
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
22puts
23.Fa num
24cryptographically strong pseudo-random bytes into
25.Fa buf .
26.Pp
27.Fn RAND_pseudo_bytes
28puts
29.Fa num
30pseudo-random bytes into
31.Fa buf .
32Pseudo-random byte sequences generated by
33.Fn RAND_pseudo_bytes
34will be unique if they are of sufficient length, but are not necessarily
35unpredictable.
36They can be used for non-cryptographic purposes and for certain purposes
37in cryptographic protocols, but usually not for key generation etc.
38.Sh RETURN VALUES
39.Fn RAND_bytes
40returns 1.
41.Fn RAND_pseudo_bytes
42returns 1.
43.Sh SEE ALSO
44.Xr ERR_get_error 3 ,
45.Xr RAND_add 3
46.Sh HISTORY
47.Fn RAND_bytes
48is available in all versions of SSLeay and OpenSSL.
49It has a return
50value since OpenSSL 0.9.5.
51.Fn RAND_pseudo_bytes
52was added in OpenSSL 0.9.5.