$ irb irb(main):001:0> require 'securerandom' => true irb(main):002:0> SecureRandom.hex(64) => "string------------------------" SecureRandomの使い方 base64(n=nil) nはbase64文字列の長さのバイト数 ** 実際に出力される文字列の長さはnの4/3程度 生成される文字列に含まれる文字: A-Z, a-z, 0-9, “+”, “/” and “=”