- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- SEE ALSO
- COPYRIGHT

# NAME

rand - generate pseudo-random bytes

# SYNOPSIS

gmssl rand [-help] [-out file] [-rand file(s)] [-base64] [-hex] num

# DESCRIPTION

The rand command outputs num pseudo-random bytes after seeding the random number generator once. As in other gmssl command line tools, PRNG seeding uses the file $HOME/.rnd or .rnd in addition to the files given in the -rand option. A new $HOME/.rnd or .rnd file will be written back if enough seeding was obtained from these sources.

rand命令在播放随机数生成器一次后输出num伪随机字节。 与其他gmssl命令行工具一样， 除了-rand选项中提供的文件外，PRNG种子使用文件$ HOME / .rnd或.rnd。 如果从这些来源获得足够的播种，将会写入新的$ HOME / .rnd或.rnd文件。

# OPTIONS

-help

  Print out a usage message.

  输出使用信息

-out file

  Write to file instead of standard output.

  写入file而不是标准输出。

-rand file(s)

  Use specified file or files or EGD socket (see -base64

  Perform base64 encoding on the output.

  在输出上执行base64编码。

-hex

  Show the output as a hex string.

  将输出显示为十六进制字符串。

# SEE ALSO

COPYRIGHT

Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the GmSSL 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 https://www.openssl.org/source/license.html.