用途:

用来产生伪随机字节。随机数字产生器需要一个seed,先已经说过了,在没有/dev/srandom系统下的解决方法是自己做一个~/.rnd文件。如果该程序能让随机数字产生器很满意的被seeded。程序写回一些怪怪的东西回该文件。

用法:

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


选项说明:

-out file:结果输出到file中。

-rand  file(s):指定随机数种子文件,多个文件间用分隔符分开,windows用“;”,OpenVMS用“,“,其他系统用“:”。

-base64:输出结果为BASE64编码数据。

-hex:输出结果为16进制数据。

num:随机数长度。   

实例:

openssl rand –base64 100
openssl rand –base64 –out myr.dat 100

相关文章:

  • 2021-12-24
  • 2022-03-07
  • 2022-01-30
  • 2021-10-13
  • 2021-07-12
  • 2021-12-22
  • 2021-08-31
  • 2022-02-10
猜你喜欢
  • 2021-10-11
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-06-29
相关资源
相似解决方案