あるフリーランスエンジニアの色んなメモ!! ITスキル・ライフハックとか

OpenSSL:1linerでランダムな16進数文字列を得る

凡例

openssl rand -hex byte数

16進数を64文字出力

コマンド

openssl rand -hex 32

出力例

880e676a0f903c9a00820af91e2d1da398c7751286da2cb7f196c4e4f3995fdf

※1byteごとに 00~ff のいずれかが出力されるため、文字列長はbyte数の2倍となる

comments powered by Disqus