1件ヒット
[1-1件を表示]
(0.072秒)
ライブラリ
- securerandom (1)
検索結果
-
SecureRandom
. hex(n = nil) -> String (18607.0) -
ランダムな hex 文字列を生成して返します。
...n の 2 倍になります。nil を指定した場合 n として 16 が使われます。
@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。
require 'securerandom'
p SecureRandom.hex(3) #=> "f72233" (文字列のサイズは 3 でない)...