openssl rand

用途:
生成随机数
语法:
openssl rand
[-out file] [-rand file(s)] [-base64] [-hex] num
参数说明:
-out :指定随机数输出文件,否则输出到标准输出。
-rand file :指定随机数种子文件。种子文件中的字符越随机,openssl rand生成随机数的速度越快,随机度越高。
-base64 :指定生成的随机数的编码格式为base64。
-hex :指定生成的随机数的编码格式为hex。
num :指定随机数的长度。
例子:
[root@xuexi tmp]# openssl rand -base64 30;
openssl rand -hex 30;
openssl rand 30

 

openssl系列命令大纲:http://www.cnblogs.com/aixiaoxiaoyu/p/8650180.html

posted @ 2018-04-16 16:31  艾小小雨  阅读(2525)  评论(0编辑  收藏  举报