ライブラリ
- ビルトイン (33)
- base64 (84)
- nkf (24)
- openssl (12)
- securerandom (36)
クラス
- Array (21)
-
OpenSSL
:: SSL :: SSLContext (12) - String (12)
モジュール
- Base64 (72)
- NKF (12)
- SecureRandom (24)
キーワード
-
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NKF (12)
- SecureRandom (12)
- base64 (24)
-
ca
_ file= (12) - decode64 (12)
- encode64 (12)
- nkf (12)
- pack (21)
- pack テンプレート文字列 (12)
-
strict
_ decode64 (12) -
strict
_ encode64 (12) - unpack (12)
-
urlsafe
_ base64 (12) -
urlsafe
_ decode64 (12) -
urlsafe
_ encode64 (12)
検索結果
先頭5件
-
Base64 (38016.0)
-
Base64 エンコード / デコードするためのメソッドを定義したモジュールです。
...Base64 エンコード / デコードするためのメソッドを定義したモジュールです。... -
Base64
. # urlsafe _ encode64(bin , padding: true) -> String (21046.0) -
与えられたデータを Base64 エンコードした文字列を返します。
...与えられたデータを Base64 エンコードした文字列を返します。
このメソッドは 4648 の "Base 64 Encoding with URL and Filename Safe Alphabet" に対応しています。
"+" を "-" に "/" を "_" に置き換えます。
デフォルトでは戻り値は = による......い。
@param bin Base64 エンコードするデータを指定します。
@param padding false を指定した場合、 = によるパディングが行われなくなります。
//emlist[例][ruby]{
require 'base64'
p Base64.urlsafe_encode64('hoge')
# => "aG9nZQ=="
p Base64.urlsafe_encode64... -
Base64
. # decode64(str) -> String (21034.0) -
与えられた文字列を Base64 デコードしたデータを返します。
...与えられた文字列を Base64 デコードしたデータを返します。
このメソッドは 2045 に対応しています。
@param str Base64 デコードする文字列を指定します。
require 'base64'
str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
'lzIGxpbmUgdHdvClRoaX......MgaXMgbGlu' +
'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
puts Base64.decode64(str)
# This is line one
# This is line two
# This is line three
# And so on...... -
Base64
. # encode64(bin) -> String (21034.0) -
与えられたデータを Base64 エンコードした文字列を返します。
...を Base64 エンコードした文字列を返します。
このメソッドは 2045 に対応しています。
エンコード後の文字で 60 文字ごとに改行を追加します。
@param bin Base64 エンコードするデータを指定します。
require 'base64'
Base64.en... -
Base64
. # urlsafe _ decode64(str) -> String (21034.0) -
与えられた文字列を Base64 デコードしたデータを返します。
...与えられた文字列を Base64 デコードしたデータを返します。
このメソッドは 4648 の "Base 64 Encoding with URL and Filename Safe Alphabet" に対応しています。
"+" を "-" に "/" を "_" に置き換えます。
@param str Base64 デコードする文字列を......指定します。
@raise ArgumentError 与えられた引数が Base64 エンコードされたデータとして正しい形式ではない場合に発生します。
例えば、アルファベットでない文字列や CR, LF などが含まれている場合にこの例外は発生し... -
Base64
. # strict _ decode64(str) -> String (21028.0) -
与えられた文字列を Base64 デコードしたデータを返します。
...与えられた文字列を Base64 デコードしたデータを返します。
このメソッドは 4648 に対応しています。
@param str Base64 デコードする文字列を指定します。
@raise ArgumentError 与えられた引数が Base64 エンコードされたデータとし... -
Base64
. # strict _ encode64(bin) -> String (21022.0) -
与えられたデータを Base64 エンコードした文字列を返します。
...与えられたデータを Base64 エンコードした文字列を返します。
このメソッドは 4648 に対応しています。
改行コードを追加することはありません。
@param bin Base64 エンコードするデータを指定します。... -
SecureRandom
. urlsafe _ base64(n = nil , padding = false) -> String (6147.0) -
ランダムで URL-safe な base64 文字列を生成して返します。
...ランダムで URL-safe な base64 文字列を生成して返します。
@param n 文字列の生成に使われるランダムネスのサイズを整数で指定します。
生成される文字列のサイズはn の約 4/3 倍になります。
nil を指定した場合 n......ureRandom.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, 3548... -
SecureRandom
. base64(n = nil) -> String (6123.0) -
ランダムな base64 文字列を生成して返します。
...ランダムな base64 文字列を生成して返します。
@param n 文字列の生成に使われるランダムネスのサイズを整数で指定します。
生成される文字列のサイズではないことに注意して下さい。生成される文字列のサイズは......3 倍になります。nil を指定した場合 n として 16 が使われます。
@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。
require 'securerandom'
p SecureRandom.base64(3) #=> "4pYO" (文字列のサイズは 3 でない)
@see 3548...