]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man1/openssl-rand.pod.in
TLS Cipher Suite 0xC102 Support
[thirdparty/openssl.git] / doc / man1 / openssl-rand.pod.in
CommitLineData
55f7d65d 1=pod
625c781d 2{- OpenSSL::safe::output_do_not_edit_headers(); -}
9fcb9702 3
55f7d65d
BM
4=head1 NAME
5
b6b66573 6openssl-rand - generate pseudo-random bytes
55f7d65d
BM
7
8=head1 SYNOPSIS
9
10B<openssl rand>
169394d4 11[B<-help>]
55f7d65d 12[B<-out> I<file>]
55f7d65d 13[B<-base64>]
7ca1cfba 14[B<-hex>]
65718c51 15{- $OpenSSL::safe::opt_engine_synopsis -}
9fcb9702 16{- $OpenSSL::safe::opt_r_synopsis -}
6bd4e3f2 17{- $OpenSSL::safe::opt_provider_synopsis -}
55f7d65d
BM
18I<num>
19
9f3c076b 20=for openssl ifdef engine
1738c0ce 21
55f7d65d
BM
22=head1 DESCRIPTION
23
88398d2a
DMSP
24This command generates I<num> random bytes using a cryptographically
25secure pseudo random number generator (CSPRNG).
26
27The random bytes are generated using the L<RAND_bytes(3)> function,
28which provides a security level of 256 bits, provided it managed to
29seed itself successfully from a trusted operating system entropy source.
4a98ad08 30Otherwise, the command will fail with a nonzero error code.
88398d2a 31For more details, see L<RAND_bytes(3)>, L<RAND(7)>, and L<RAND_DRBG(7)>.
55f7d65d
BM
32
33=head1 OPTIONS
34
35=over 4
36
169394d4
MR
37=item B<-help>
38
39Print out a usage message.
40
e8769719 41=item B<-out> I<file>
55f7d65d
BM
42
43Write to I<file> instead of standard output.
44
55f7d65d
BM
45=item B<-base64>
46
47Perform base64 encoding on the output.
48
7ca1cfba
BM
49=item B<-hex>
50
51Show the output as a hex string.
52
65718c51
RS
53{- $OpenSSL::safe::opt_engine_item -}
54
9fcb9702
RS
55{- $OpenSSL::safe::opt_r_item -}
56
6bd4e3f2
P
57{- $OpenSSL::safe::opt_provider_item -}
58
55f7d65d
BM
59=back
60
afbd0746
BM
61=head1 SEE ALSO
62
b6b66573 63L<openssl(1)>,
88398d2a
DMSP
64L<RAND_bytes(3)>,
65L<RAND(7)>,
66L<RAND_DRBG(7)>
afbd0746 67
e2f92610
RS
68=head1 COPYRIGHT
69
b6b66573 70Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 71
449040b4 72Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
73this file except in compliance with the License. You can obtain a copy
74in the file LICENSE in the source distribution or at
75L<https://www.openssl.org/source/license.html>.
76
77=cut