1RAND(1) OpenSSL RAND(1)
2
3
4
6 openssl-rand, rand - generate pseudo-random bytes
7
9 openssl rand [-help] [-out file] [-rand file...] [-writerand file]
10 [-base64] [-hex] num
11
13 The rand command outputs num pseudo-random bytes after seeding the
14 random number generator once. As in other openssl command line tools,
15 PRNG seeding uses the file $HOME/.rnd or .rnd in addition to the files
16 given in the -rand option. A new $HOME/.rnd or .rnd file will be
17 written back if enough seeding was obtained from these sources.
18
20 -help
21 Print out a usage message.
22
23 -out file
24 Write to file instead of standard output.
25
26 -rand file...
27 A file or files containing random data used to seed the random
28 number generator. Multiple files can be specified separated by an
29 OS-dependent character. The separator is ; for MS-Windows, , for
30 OpenVMS, and : for all others.
31
32 [-writerand file]
33 Writes random data to the specified file upon exit. This can be
34 used with a subsequent -rand flag.
35
36 -base64
37 Perform base64 encoding on the output.
38
39 -hex
40 Show the output as a hex string.
41
43 RAND_bytes(3)
44
46 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
47
48 Licensed under the OpenSSL license (the "License"). You may not use
49 this file except in compliance with the License. You can obtain a copy
50 in the file LICENSE in the source distribution or at
51 <https://www.openssl.org/source/license.html>.
52
53
54
551.1.1c 2019-05-28 RAND(1)