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