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