Current Path : /compat/linux/proc/self/root/usr/opt/openssl11/share/doc/openssl/html/man1/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/opt/openssl11/share/doc/openssl/html/man1/rand.html |
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>rand</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@hsxx.drive.ne.jp" /> </head> <body style="background-color: white"> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#options">OPTIONS</a></li> <li><a href="#notes">NOTES</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#copyright">COPYRIGHT</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <hr /> <h1><a name="name">NAME</a></h1> <p>openssl-rand, rand - generate pseudo-random bytes</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <p><strong>openssl rand</strong> [<strong>-help</strong>] [<strong>-out</strong> <em>file</em>] [<strong>-rand file...</strong>] [<strong>-writerand file</strong>] [<strong>-base64</strong>] [<strong>-hex</strong>] <em>num</em></p> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>This command generates <em>num</em> random bytes using a cryptographically secure pseudo random number generator (CSPRNG).</p> <p>The random bytes are generated using the <em>RAND_bytes(3)</em> function, which provides a security level of 256 bits, provided it managed to seed itself successfully from a trusted operating system entropy source. Otherwise, the command will fail with a nonzero error code. For more details, see <em>RAND_bytes(3)</em>, <em>RAND(7)</em>, and <em>RAND_DRBG(7)</em>.</p> <p> </p> <hr /> <h1><a name="options">OPTIONS</a></h1> <dl> <dt><strong><a name="help" class="item"><strong>-help</strong></a></strong></dt> <dd> <p>Print out a usage message.</p> </dd> <dt><strong><a name="out_file" class="item"><strong>-out file</strong></a></strong></dt> <dd> <p>Write to <em>file</em> instead of standard output.</p> </dd> <dt><strong><a name="rand_file" class="item"><strong>-rand file...</strong></a></strong></dt> <dd> <p>A file or files containing random data used to seed the random number generator. Multiple files can be specified separated by an OS-dependent character. The separator is <strong>;</strong> for MS-Windows, <strong>,</strong> for OpenVMS, and <strong>:</strong> for all others. Explicitly specifying a seed file is in general not necessary, see the <a href="#notes">NOTES</a> section for more information.</p> </dd> <dt><strong><a name="writerand_file" class="item">[<strong>-writerand file</strong>]</a></strong></dt> <dd> <p>Writes random data to the specified <em>file</em> upon exit. This can be used with a subsequent <strong>-rand</strong> flag.</p> </dd> <dt><strong><a name="base64" class="item"><strong>-base64</strong></a></strong></dt> <dd> <p>Perform base64 encoding on the output.</p> </dd> <dt><strong><a name="hex" class="item"><strong>-hex</strong></a></strong></dt> <dd> <p>Show the output as a hex string.</p> </dd> </dl> <p> </p> <hr /> <h1><a name="notes">NOTES</a></h1> <p>Prior to OpenSSL 1.1.1, it was common for applications to store information about the state of the random-number generator in a file that was loaded at startup and rewritten upon exit. On modern operating systems, this is generally no longer necessary as OpenSSL will seed itself from a trusted entropy source provided by the operating system. The <strong>-rand</strong> and <strong>-writerand</strong> flags are still supported for special platforms or circumstances that might require them.</p> <p>It is generally an error to use the same seed file more than once and every use of <strong>-rand</strong> should be paired with <strong>-writerand</strong>.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p><em>RAND_bytes(3)</em>, <em>RAND(7)</em>, <em>RAND_DRBG(7)</em></p> <p> </p> <hr /> <h1><a name="copyright">COPYRIGHT</a></h1> <p>Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.</p> <p>Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p> </body> </html>