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