]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man1/openssl-rand.pod
Add '=for comment ifdef' to pod pages
[thirdparty/openssl.git] / doc / man1 / openssl-rand.pod
CommitLineData
55f7d65d
BM
1=pod
2
3=head1 NAME
4
b6b66573 5openssl-rand - generate pseudo-random bytes
55f7d65d
BM
6
7=head1 SYNOPSIS
8
9B<openssl rand>
169394d4 10[B<-help>]
55f7d65d 11[B<-out> I<file>]
e8769719
RS
12[B<-rand> I<file...>]
13[B<-writerand> I<file>]
55f7d65d 14[B<-base64>]
7ca1cfba 15[B<-hex>]
55f7d65d
BM
16I<num>
17
1738c0ce
RS
18=for comment ifdef engine
19
55f7d65d
BM
20=head1 DESCRIPTION
21
22The B<rand> command outputs I<num> pseudo-random bytes after seeding
3b80e3aa 23the random number generator once. As in other B<openssl> command
55f7d65d
BM
24line tools, PRNG seeding uses the file I<$HOME/>B<.rnd> or B<.rnd>
25in addition to the files given in the B<-rand> option. A new
26I<$HOME>/B<.rnd> or B<.rnd> file will be written back if enough
27seeding was obtained from these sources.
28
29=head1 OPTIONS
30
31=over 4
32
169394d4
MR
33=item B<-help>
34
35Print out a usage message.
36
e8769719 37=item B<-out> I<file>
55f7d65d
BM
38
39Write to I<file> instead of standard output.
40
e8769719 41=item B<-rand> I<file...>
55f7d65d 42
3ee1eac2
RS
43A file or files containing random data used to seed the random number
44generator.
35ed393e 45Multiple files can be specified separated by an OS-dependent character.
b87ef946 46The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
55f7d65d
BM
47all others.
48
e8769719 49=item B<-writerand> I<file>
3ee1eac2
RS
50
51Writes random data to the specified I<file> upon exit.
52This can be used with a subsequent B<-rand> flag.
53
55f7d65d
BM
54=item B<-base64>
55
56Perform base64 encoding on the output.
57
7ca1cfba
BM
58=item B<-hex>
59
60Show the output as a hex string.
61
55f7d65d
BM
62=back
63
afbd0746
BM
64=head1 SEE ALSO
65
b6b66573 66L<openssl(1)>,
9b86974e 67L<RAND_bytes(3)>
afbd0746 68
e2f92610
RS
69=head1 COPYRIGHT
70
b6b66573 71Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 72
449040b4 73Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
74this file except in compliance with the License. You can obtain a copy
75in the file LICENSE in the source distribution or at
76L<https://www.openssl.org/source/license.html>.
77
78=cut