るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.017秒)
トップページ > クエリ:add[x] > モジュール:SecureRandom[x]

別のキーワード

  1. tracer add_filter
  2. logger add
  3. rexml/document add
  4. openssl add_extension
  5. socket ip_add_membership

ライブラリ

検索結果

SecureRandom.urlsafe_base64(n = nil, padding = false) -> String (101.0)

ランダムで URL-safe な base64 文字列を生成して返します。

...m padding 真を指定すると '=' でパディングを行います。
偽を指定するとパディングを行いません。デフォルトは偽です。

@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。

require 'securerandom'...
...p SecureRandom.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg"
p SecureRandom.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg"
p SecureRandom.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ=="
p SecureRandom.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg=="

@see SecureRandom.base64,...