1*ebfedea0SLionel Sambuc=pod 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel Sambuc=head1 NAME 4*ebfedea0SLionel Sambuc 5*ebfedea0SLionel Sambucrand - generate pseudo-random bytes 6*ebfedea0SLionel Sambuc 7*ebfedea0SLionel Sambuc=head1 SYNOPSIS 8*ebfedea0SLionel Sambuc 9*ebfedea0SLionel SambucB<openssl rand> 10*ebfedea0SLionel Sambuc[B<-out> I<file>] 11*ebfedea0SLionel Sambuc[B<-rand> I<file(s)>] 12*ebfedea0SLionel Sambuc[B<-base64>] 13*ebfedea0SLionel Sambuc[B<-hex>] 14*ebfedea0SLionel SambucI<num> 15*ebfedea0SLionel Sambuc 16*ebfedea0SLionel Sambuc=head1 DESCRIPTION 17*ebfedea0SLionel Sambuc 18*ebfedea0SLionel SambucThe B<rand> command outputs I<num> pseudo-random bytes after seeding 19*ebfedea0SLionel Sambucthe random number generator once. As in other B<openssl> command 20*ebfedea0SLionel Sambucline tools, PRNG seeding uses the file I<$HOME/>B<.rnd> or B<.rnd> 21*ebfedea0SLionel Sambucin addition to the files given in the B<-rand> option. A new 22*ebfedea0SLionel SambucI<$HOME>/B<.rnd> or B<.rnd> file will be written back if enough 23*ebfedea0SLionel Sambucseeding was obtained from these sources. 24*ebfedea0SLionel Sambuc 25*ebfedea0SLionel Sambuc=head1 OPTIONS 26*ebfedea0SLionel Sambuc 27*ebfedea0SLionel Sambuc=over 4 28*ebfedea0SLionel Sambuc 29*ebfedea0SLionel Sambuc=item B<-out> I<file> 30*ebfedea0SLionel Sambuc 31*ebfedea0SLionel SambucWrite to I<file> instead of standard output. 32*ebfedea0SLionel Sambuc 33*ebfedea0SLionel Sambuc=item B<-rand> I<file(s)> 34*ebfedea0SLionel Sambuc 35*ebfedea0SLionel SambucUse specified file or files or EGD socket (see L<RAND_egd(3)|RAND_egd(3)>) 36*ebfedea0SLionel Sambucfor seeding the random number generator. 37*ebfedea0SLionel SambucMultiple files can be specified separated by a OS-dependent character. 38*ebfedea0SLionel SambucThe separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for 39*ebfedea0SLionel Sambucall others. 40*ebfedea0SLionel Sambuc 41*ebfedea0SLionel Sambuc=item B<-base64> 42*ebfedea0SLionel Sambuc 43*ebfedea0SLionel SambucPerform base64 encoding on the output. 44*ebfedea0SLionel Sambuc 45*ebfedea0SLionel Sambuc=item B<-hex> 46*ebfedea0SLionel Sambuc 47*ebfedea0SLionel SambucShow the output as a hex string. 48*ebfedea0SLionel Sambuc 49*ebfedea0SLionel Sambuc=back 50*ebfedea0SLionel Sambuc 51*ebfedea0SLionel Sambuc=head1 SEE ALSO 52*ebfedea0SLionel Sambuc 53*ebfedea0SLionel SambucL<RAND_bytes(3)|RAND_bytes(3)> 54*ebfedea0SLionel Sambuc 55*ebfedea0SLionel Sambuc=cut 56