るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

クラス

キーワード

検索結果

Integer#to_bn -> OpenSSL::BN (54397.0)

Integer を同じ数を表す OpenSSL::BN のオブジェクトに 変換します。

Integer を同じ数を表す OpenSSL::BN のオブジェクトに
変換します。

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

pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}

なお、実装は、以下のようになっています。

//emlist[][ruby]{
class Integer
def to_bn
OpenSSL::BN::new(self)
end
end
//}

@see OpenSSL::BN.new, OpenSSL::...

OpenSSL::BN#pretty_print(pp) (463.0)

Kernel.#pp でオブジェクトの内容を出力するときに、内部で呼ばれるメソッドです。

Kernel.#pp でオブジェクトの内容を出力するときに、内部で呼ばれるメソッドです。

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

pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}

@param pp PP クラスのインスタンスオブジェクト

OpenSSL::BN#<<(other) -> OpenSSL::BN (58.0)

自身を other ビット左シフトした値を返します。

自身を other ビット左シフトした値を返します。

//emlist[][ruby]{
bn = 1.to_bn
pp bn << 1 # => #<OpenSSL::BN 2>
pp bn # => #<OpenSSL::BN 1>
//}

@param other シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#lshift!