1OPENSSL-RAND(1ossl)                 OpenSSL                OPENSSL-RAND(1ossl)
2
3
4

NAME

6       openssl-rand - generate pseudo-random bytes
7

SYNOPSIS

9       openssl rand [-help] [-out file] [-base64] [-hex] [-engine id] [-rand
10       files] [-writerand file] [-provider name] [-provider-path path]
11       [-propquery propq] num
12

DESCRIPTION

14       This command generates num random bytes using a cryptographically
15       secure pseudo random number generator (CSPRNG).
16
17       The random bytes are generated using the RAND_bytes(3) function, which
18       provides a security level of 256 bits, provided it managed to seed
19       itself successfully from a trusted operating system entropy source.
20       Otherwise, the command will fail with a nonzero error code.  For more
21       details, see RAND_bytes(3), RAND(7), and EVP_RAND(7).
22

OPTIONS

24       -help
25           Print out a usage message.
26
27       -out file
28           Write to file instead of standard output.
29
30       -base64
31           Perform base64 encoding on the output.
32
33       -hex
34           Show the output as a hex string.
35
36       -engine id
37           See "Engine Options" in openssl(1).  This option is deprecated.
38
39       -rand files, -writerand file
40           See "Random State Options" in openssl(1) for details.
41
42       -provider name
43       -provider-path path
44       -propquery propq
45           See "Provider Options" in openssl(1), provider(7), and property(7).
46

SEE ALSO

48       openssl(1), RAND_bytes(3), RAND(7), EVP_RAND(7)
49

HISTORY

51       The -engine option was deprecated in OpenSSL 3.0.
52
54       Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
55
56       Licensed under the Apache License 2.0 (the "License").  You may not use
57       this file except in compliance with the License.  You can obtain a copy
58       in the file LICENSE in the source distribution or at
59       <https://www.openssl.org/source/license.html>.
60
61
62
633.0.9                             2023-07-27               OPENSSL-RAND(1ossl)
Impressum