2000-03-01 15:57:25 +08:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=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>]
|
2019-10-01 16:00:14 +08:00
|
|
|
[B<-rand> I<files>]
|
2019-09-26 03:20:11 +08:00
|
|
|
[B<-writerand> I<file>]
|
2000-03-01 15:57:25 +08:00
|
|
|
[B<-base64>]
|
2009-02-02 08:01:28 +08:00
|
|
|
[B<-hex>]
|
2000-03-01 15:57:25 +08:00
|
|
|
I<num>
|
|
|
|
|
2019-09-23 07:49:25 +08:00
|
|
|
=for comment ifdef engine
|
|
|
|
|
2000-03-01 15:57:25 +08:00
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-02 01:43:36 +08:00
|
|
|
This command outputs I<num> pseudo-random bytes after seeding
|
2001-09-07 14:13:40 +08:00
|
|
|
the random number generator once. As in other B<openssl> command
|
2000-03-01 15:57:25 +08:00
|
|
|
line tools, PRNG seeding uses the file I<$HOME/>B<.rnd> or B<.rnd>
|
|
|
|
in addition to the files given in the B<-rand> option. A new
|
|
|
|
I<$HOME>/B<.rnd> or B<.rnd> file will be written back if enough
|
|
|
|
seeding was obtained from these sources.
|
|
|
|
|
|
|
|
=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.
|
|
|
|
|
2019-10-01 16:00:14 +08:00
|
|
|
=item B<-rand> I<files>
|
2000-03-01 15:57:25 +08:00
|
|
|
|
2019-10-01 16:00:14 +08:00
|
|
|
The files containing random data used to seed the random number generator.
|
2016-03-20 00:28:58 +08:00
|
|
|
Multiple files can be specified separated by an OS-dependent character.
|
2000-04-13 00:48:20 +08:00
|
|
|
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
2000-03-01 15:57:25 +08:00
|
|
|
all others.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-writerand> I<file>
|
2017-07-05 22:58:48 +08:00
|
|
|
|
|
|
|
Writes random data to the specified I<file> upon exit.
|
|
|
|
This can be used with a subsequent B<-rand> flag.
|
|
|
|
|
2000-03-01 15:57:25 +08:00
|
|
|
=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.
|
|
|
|
|
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)>,
|
2015-08-18 03:21:33 +08:00
|
|
|
L<RAND_bytes(3)>
|
2000-03-01 19:45:53 +08:00
|
|
|
|
2016-05-18 23:44:05 +08:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2019-08-22 07:04:41 +08:00
|
|
|
Copyright 2000-2019 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
|