2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
6 openssl-rand - generate pseudo-random bytes
15 {- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_r_synopsis -}
16 {- $OpenSSL::safe::opt_provider_synopsis -}
19 =for openssl ifdef engine
23 This command generates I<num> random bytes using a cryptographically
24 secure pseudo random number generator (CSPRNG).
26 The random bytes are generated using the L<RAND_bytes(3)> function,
27 which provides a security level of 256 bits, provided it managed to
28 seed itself successfully from a trusted operating system entropy source.
29 Otherwise, the command will fail with a nonzero error code.
30 For more details, see L<RAND_bytes(3)>, L<RAND(7)>, and L<EVP_RAND(7)>.
38 Print out a usage message.
42 Write to I<file> instead of standard output.
46 Perform base64 encoding on the output.
50 Show the output as a hex string.
52 {- $OpenSSL::safe::opt_engine_item -}
54 {- $OpenSSL::safe::opt_r_item -}
56 {- $OpenSSL::safe::opt_provider_item -}
69 The B<-engine> option was deprecated in OpenSSL 3.0.
73 Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
75 Licensed under the Apache License 2.0 (the "License"). You may not use
76 this file except in compliance with the License. You can obtain a copy
77 in the file LICENSE in the source distribution or at
78 L<https://www.openssl.org/source/license.html>.