3件ヒット
[1-3件を表示]
(0.023秒)
クラス
- Integer (1)
-
OpenSSL
:: BN (2)
キーワード
- << (1)
-
pretty
_ print (1) -
to
_ bn (1)
検索結果
-
OpenSSL
:: BN # pretty _ print(pp) (451.0) -
Kernel.#pp でオブジェクトの内容を出力するときに、内部で呼ばれるメソッドです。
...nel.#pp でオブジェクトの内容を出力するときに、内部で呼ばれるメソッドです。
//emlist[][ruby]{
require 'pp'
require 'openssl'
pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}
@param pp PP クラスのインスタンスオブジェクト... -
Integer
# to _ bn -> OpenSSL :: BN (64.0) -
Integer を同じ数を表す OpenSSL::BN のオブジェクトに 変換します。
...Integer を同じ数を表す OpenSSL::BN のオブジェクトに
変換します。
//emlist[][ruby]{
require 'pp'
require 'openssl'
pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}
なお、実装は、以下のようになっています。
//emlist[][ruby]{
clas......s Integer
def to_bn
OpenSSL::BN::new(self)
end
end
//}
@see OpenSSL::BN.new, OpenSSL::BN#to_i... -
OpenSSL
:: BN # <<(other) -> OpenSSL :: BN (46.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!...