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