HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //usr/local/openssl/man/man1/rand.1
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "RAND 1"
.TH RAND 1 2019-12-20 1.0.2u OpenSSL
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
openssl\-rand,
rand \- generate pseudo\-random bytes
.SH SYNOPSIS
.IX Header "SYNOPSIS"
\&\fBopenssl rand\fR
[\fB\-out\fR \fIfile\fR]
[\fB\-rand\fR \fIfile(s)\fR]
[\fB\-base64\fR]
[\fB\-hex\fR]
\&\fInum\fR
.SH DESCRIPTION
.IX Header "DESCRIPTION"
The \fBrand\fR command outputs \fInum\fR pseudo-random bytes after seeding
the random number generator once.  As in other \fBopenssl\fR command
line tools, PRNG seeding uses the file \fR\f(CI$HOME\fR\fI/\fR\fB.rnd\fR or \fB.rnd\fR
in addition to the files given in the \fB\-rand\fR option.  A new
\&\fI\fR\f(CI$HOME\fR\fI\fR/\fB.rnd\fR or \fB.rnd\fR file will be written back if enough
seeding was obtained from these sources.
.SH OPTIONS
.IX Header "OPTIONS"
.IP "\fB\-out\fR \fIfile\fR" 4
.IX Item "-out file"
Write to \fIfile\fR instead of standard output.
.IP "\fB\-rand\fR \fIfile(s)\fR" 4
.IX Item "-rand file(s)"
Use specified file or files or EGD socket (see \fBRAND_egd\fR\|(3))
for seeding the random number generator.
Multiple files can be specified separated by a OS-dependent character.
The separator is \fB;\fR for MS-Windows, \fB,\fR for OpenVMS, and \fB:\fR for
all others.
.IP \fB\-base64\fR 4
.IX Item "-base64"
Perform base64 encoding on the output.
.IP \fB\-hex\fR 4
.IX Item "-hex"
Show the output as a hex string.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBRAND_bytes\fR\|(3)