るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.020秒)

別のキーワード

  1. base digest
  2. base ==
  3. base file
  4. base hexdigest
  5. base64 encode64

キーワード

検索結果

OpenSSL::BN#to_s(base=10) -> String (116.0)

自身を表す文字列を返します。

...ます。

base
で、変換方法(基数)を指定します。
デフォルトは 10 で、他に 16, 2, 0 を指定できます。

10 10進数の表記
16 16進数の表記
2 big-endianの符号無し整数のバイナリ列
0 MPI形式の文字列(バイト列)

@param base 文字...
...列への変換方法(基数)
@raise OpenSSL::BNError 変換に失敗した場合に発生します

//emlist[][ruby]{
require 'openssl'

p 10.to_bn.to_s # => "10"
p (-5).to_bn.to_s # => "-5"

p 0.to_bn.to_s(16) # => "0"
p 9.to_bn.to_s(16) # => "09"
p 10.to_bn.to_s(16) # => "0A"
p 16.to_bn...
...o_s(2) # => "\a"

p 0.to_bn.to_s(0) # => "\x00\x00\x00\x00"
p 6.to_bn.to_s(0) # => "\x00\x00\x00\x01\x06"
p 7.to_bn.to_s(0) # => "\x00\x00\x00\x01\a"
//}

反対に、文字列から OpenSSL::BN クラスのインスタンスを作るには
OpenSSL
::BN.new を用います。

@see OpenSSL::BN.new...

OpenSSL::SSL::SSLContext#ca_file=(ca) (15.0)

接続相手の検証のために使う、信頼している CA 証明書ファイルのパスを 設定します。

...cate in base64 encoding) ...
-----END CERTIFICATE-----

(ここに証明書の説明)

-----BEGIN CERTIFICATE-----
... (CA certificate in base64 encoding) ...
-----END CERTIFICATE-----

デフォルトは nil です。

@param ca CA証明書ファイルのパス文字列
@see OpenSSL::SSL:...