2000-03-01 15:57:25 +08:00
|
|
|
=pod
|
2019-10-31 11:35:08 +08:00
|
|
|
{- OpenSSL::safe::output_do_not_edit_headers(); -}
|
2019-10-13 05:45:56 +08:00
|
|
|
|
2000-03-01 15:57:25 +08:00
|
|
|
=head1 NAME
|
|
|
|
|
2019-08-22 07:04:41 +08:00
|
|
|
openssl-rand - generate pseudo-random bytes
|
2000-03-01 15:57:25 +08:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
B<openssl rand>
|
2016-02-06 00:58:45 +08:00
|
|
|
[B<-help>]
|
2000-03-01 15:57:25 +08:00
|
|
|
[B<-out> I<file>]
|
|
|
|
[B<-base64>]
|
2009-02-02 08:01:28 +08:00
|
|
|
[B<-hex>]
|
2020-09-21 17:56:01 +08:00
|
|
|
{- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_r_synopsis -}
|
2020-02-25 12:29:30 +08:00
|
|
|
{- $OpenSSL::safe::opt_provider_synopsis -}
|
2000-03-01 15:57:25 +08:00
|
|
|
I<num>
|
|
|
|
|
2019-10-11 23:52:12 +08:00
|
|
|
=for openssl ifdef engine
|
2019-09-23 07:49:25 +08:00
|
|
|
|
2000-03-01 15:57:25 +08:00
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2020-03-02 07:25:29 +08:00
|
|
|
This command generates I<num> random bytes using a cryptographically
|
|
|
|
secure pseudo random number generator (CSPRNG).
|
|
|
|
|
|
|
|
The random bytes are generated using the L<RAND_bytes(3)> function,
|
|
|
|
which provides a security level of 256 bits, provided it managed to
|
|
|
|
seed itself successfully from a trusted operating system entropy source.
|
2020-03-03 22:34:53 +08:00
|
|
|
Otherwise, the command will fail with a nonzero error code.
|
2020-07-22 10:55:31 +08:00
|
|
|
For more details, see L<RAND_bytes(3)>, L<RAND(7)>, and L<EVP_RAND(7)>.
|
2000-03-01 15:57:25 +08:00
|
|
|
|
|
|
|
=head1 OPTIONS
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
2016-02-06 00:58:45 +08:00
|
|
|
=item B<-help>
|
|
|
|
|
|
|
|
Print out a usage message.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-out> I<file>
|
2000-03-01 15:57:25 +08:00
|
|
|
|
|
|
|
Write to I<file> instead of standard output.
|
|
|
|
|
|
|
|
=item B<-base64>
|
|
|
|
|
|
|
|
Perform base64 encoding on the output.
|
|
|
|
|
2009-02-02 08:01:28 +08:00
|
|
|
=item B<-hex>
|
|
|
|
|
|
|
|
Show the output as a hex string.
|
|
|
|
|
Document most missing options
Add cmd-nits make target.
Listing options should stop when it hits the "parameters" separator.
Add missing .pod.in files to doc/man1/build.info
Tweak find-doc-nits to try openssl-XXX before XXX for POD files and
change an error messavge to be more useful.
Fix the following pages: ca, cms, crl, dgst, enc,
engine, errstr, gendsa, genrsa, list, ocsp, passwd, pkcs7, pkcs12, rand,
rehash, req, rsautil, s_server, speed, s_time,
sess_id, smime, srp, ts, x509.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10873)
2020-01-17 02:40:52 +08:00
|
|
|
{- $OpenSSL::safe::opt_engine_item -}
|
|
|
|
|
2019-10-13 05:45:56 +08:00
|
|
|
{- $OpenSSL::safe::opt_r_item -}
|
|
|
|
|
2020-02-25 12:29:30 +08:00
|
|
|
{- $OpenSSL::safe::opt_provider_item -}
|
|
|
|
|
2000-03-01 15:57:25 +08:00
|
|
|
=back
|
|
|
|
|
2000-03-01 19:45:53 +08:00
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2019-08-22 07:04:41 +08:00
|
|
|
L<openssl(1)>,
|
2020-03-02 07:25:29 +08:00
|
|
|
L<RAND_bytes(3)>,
|
|
|
|
L<RAND(7)>,
|
2020-07-22 10:55:31 +08:00
|
|
|
L<EVP_RAND(7)>
|
2000-03-01 19:45:53 +08:00
|
|
|
|
2020-06-25 09:27:51 +08:00
|
|
|
=head1 HISTORY
|
|
|
|
|
|
|
|
The B<-engine> option was deprecated in OpenSSL 3.0.
|
|
|
|
|
2016-05-18 23:44:05 +08:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2020-04-23 20:55:52 +08:00
|
|
|
Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
|
2016-05-18 23:44:05 +08:00
|
|
|
|
2018-12-06 21:04:11 +08:00
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 23:44:05 +08:00
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|