674件ヒット
[201-300件を表示]
(0.100秒)
ライブラリ
- ビルトイン (318)
- matrix (22)
- objspace (11)
- openssl (220)
- securerandom (73)
- timeout (19)
-
webrick
/ utils (11)
クラス
- Array (88)
- IO (11)
- Matrix (22)
-
OpenSSL
:: Cipher (22) -
OpenSSL
:: PKey :: DSA (22) -
OpenSSL
:: PKey :: EC (11) -
OpenSSL
:: PKey :: RSA (22) - Random (130)
モジュール
- Enumerable (44)
- Kernel (44)
- ObjectSpace (11)
-
OpenSSL
:: Random (99) - SecureRandom (62)
- Timeout (19)
-
WEBrick
:: Utils (11)
キーワード
- == (11)
- Cipher (11)
- DEFAULT (9)
- RSA (11)
- RandomError (11)
- SecureRandom (11)
- Symbol (1)
- advise (11)
- alphanumeric (7)
- base64 (11)
- build (22)
-
count
_ tdata _ objects (11) - egd (11)
-
egd
_ bytes (11) - generate (44)
- hex (11)
- left (22)
-
load
_ random _ file (11) -
marshal
_ dump (11) -
marshal
_ load (11) -
max
_ by (44) -
pseudo
_ bytes (11) -
public
_ key? (11) - rand (88)
-
random
_ add (11) -
random
_ bytes (22) -
random
_ iv (11) -
random
_ key (11) -
random
_ number (11) -
random
_ string (11) - sample (44)
- seed (11)
- shuffle (22)
- shuffle! (22)
- srand (22)
- status? (11)
- timeout (19)
-
urlsafe
_ base64 (11) -
write
_ random _ file (11)
検索結果
先頭5件
-
SecureRandom
. random _ bytes(n = nil) -> String (9207.0) -
ランダムなバイト列を生成して返します。
...字列のサイズを整数で指定します。
nil を指定した場合 n として 16 が使われます。
@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。
require 'securerandom'
p SecureRandom.random_bytes(3) #=> "\321\020\203"... -
SecureRandom
. random _ number(n = 0) -> Integer | Float (9207.0) -
ランダムな数値を生成して返します。 n が 1 以上の整数の場合、0 以上 n 未満の整数を返します。 n が 0 の場合、0.0 以上 1.0 未満の実数を返します。
...1.0 未満の実数を返します。
@param n ランダムな数値の上限を数値で指定します。
@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。
require 'securerandom'
p SecureRandom.random_number(1 << 64) #=> 4078466195356651249... -
WEBrick
:: Utils . # random _ string(len) -> String (9207.0) -
A-Z, a-z, 0-9 からなる長さ len のランダムな文字列を返します。
...A-Z, a-z, 0-9 からなる長さ len のランダムな文字列を返します。
@param len 得たい文字列の長さを整数で指定します。単位はバイトです。
require 'webrick'
p WEBrick::Utils.random_string(10) #=> "xF0jwU4RJd"... -
SecureRandom
. urlsafe _ base64(n = nil , padding = false) -> String (9200.0) -
ランダムで URL-safe な base64 文字列を生成して返します。
...ランダムで URL-safe な base64 文字列を生成して返します。
@param n 文字列の生成に使われるランダムネスのサイズを整数で指定します。
生成される文字列のサイズはn の約 4/3 倍になります。
nil を指定した場合 n......otImplementedError 安全な乱数発生器が使えない場合に発生します。
require 'securerandom'
p SecureRandom.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg"
p SecureRandom.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg"
p SecureRandom.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHG......V2_BNPrdQ=="
p SecureRandom.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg=="
@see SecureRandom.base64, 3548... -
OpenSSL
:: Cipher # random _ iv -> String (9101.0) -
IV を乱数で生成し、暗号オブジェクトに設定します。
IV を乱数で生成し、暗号オブジェクトに設定します。
生成した IV を文字列で返します。 -
OpenSSL
:: Cipher # random _ key -> String (9101.0) -
鍵を乱数で生成し、暗号オブジェクトに設定します。
鍵を乱数で生成し、暗号オブジェクトに設定します。
生成した鍵を文字列で返します。 -
SecureRandom
. alphanumeric(n = nil) -> String (9100.0) -
ランダムな英数字を生成して返します。
...nil を指定した場合 n として 16 が使われます。
@return A-Z, a-z, 0-9 からなる文字列が返されます。
@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。
//emlist[][ruby]{
require 'securerandom'
p SecureRandom.alphanumeric......#=> "2BuBuLf3WfSKyQbR"
p SecureRandom.alphanumeric(10) #=> "i6K93NdqiH"
//}... -
Array
# sample(n , random: Random) -> Array (6328.0) -
配列の要素を1個(引数を指定した場合は自身の要素数を越えない範囲で n 個) ランダムに選んで返します。
...ります。
配列が空の場合、無引数の場合は nil を、個数を指定した場合は空配列を返します。
srand()が有効です。
@param n 取得する要素の数を指定します。自身の要素数(self.length)以上の
値を指定した場合は要素数と......外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@param random 乱数生成器(主に Random オブジェクト)を指定します。
選択する要素のインデックスを返す rand メソッドに応答......択可能なイン
デックスの最大値が指定されます。
Kernel.#rand、Random を使用しないオブジェク
トを指定した場合、Kernel.#srandの指定に影響されません。
@raise TypeError 引数 n に整数以外の(暗黙の... -
Array
# sample(random: Random) -> object | nil (6328.0) -
配列の要素を1個(引数を指定した場合は自身の要素数を越えない範囲で n 個) ランダムに選んで返します。
...ります。
配列が空の場合、無引数の場合は nil を、個数を指定した場合は空配列を返します。
srand()が有効です。
@param n 取得する要素の数を指定します。自身の要素数(self.length)以上の
値を指定した場合は要素数と......外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@param random 乱数生成器(主に Random オブジェクト)を指定します。
選択する要素のインデックスを返す rand メソッドに応答......択可能なイン
デックスの最大値が指定されます。
Kernel.#rand、Random を使用しないオブジェク
トを指定した場合、Kernel.#srandの指定に影響されません。
@raise TypeError 引数 n に整数以外の(暗黙の... -
Array
# shuffle!(random: Random) -> self (6326.0) -
配列を破壊的にランダムシャッフルします。
...配列を破壊的にランダムシャッフルします。
@param random 乱数生成器(主に Random オブジェクト)を指定します。
選択する要素のインデックスを返す rand メソッドに応答する
オブジェクトであれば指定する......されます。
Kernel.#rand、Random を使用しないオブジェク
トを指定した場合、Kernel.#srandの指定に影響されま
せん。
//emlist[例][ruby]{
a = [ 1, 2, 3 ] #=> [1, 2, 3]
a.shuffle! #=> [2, 3, 1]
a......#=> [2, 3, 1]
//}
@see Array#shuffle...