るりまサーチ

最速Rubyリファレンスマニュアル検索!
568件ヒット [1-100件を表示] (0.121秒)
トップページ > クエリ:l[x] > クエリ:>[x] > クラス:OpenSSL::BN[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

OpenSSL::BN#>>(other) -> OpenSSL::BN (9213.0)

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

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

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

bn = 2.to_bn
bn >> 1 # => #<OpenSSL::BN 1>
bn # => #<OpenSSL::BN 2>
//}

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

OpenSSL::BN#<=>(other) -> -1 | 0 | 1 (9101.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...ときには 1 を返します。

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

OpenSSL::BN
.new(5) <=> 5 # => 0

OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@param other 比較する整数
@r...
...aise TypeError 比較できないときに発生します。
@see OpenSSL::BN#ucmp...

OpenSSL::BN#lshift!(n) -> self (6213.0)

自身を n ビット左シフトします。 OpenSSL::BN#<<と異なり、破壊的メソッドです。

...す。
OpenSSL::BN
#<<と異なり、破壊的メソッドです。

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

bn = 1.to_bn
bn.lshift!(2) # => #<OpenSSL::BN 4>
bn # => #<OpenSSL::BN 4>
//}

@param n シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#<<...

OpenSSL::BN#clear_bit!(n) -> self (6201.0)

自身の n ビット目を0にします。

...自身の n ビット目を0にします。

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

a = OpenSSL::BN.new("129")
a.clear_bit!(0)
a # => 128
//}

@param n 0にするビットの位置
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::set_bit!...

OpenSSL::BN#eql?(other) -> bool (6201.0)

自身と other が等しい場合に true を返します。

自身と other が等しい場合に true を返します。

@param other 比較する数

絞り込み条件を変える

OpenSSL::BN#mod_mul(other, m) -> OpenSSL::BN (6201.0)

(self * other) % m を返します。

...(self * other) % m を返します。

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

OpenSSL::BN
.new("7").mod_mul(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 3
//}

@param other 積を取る数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー...

OpenSSL::BN#cmp(other) -> -1 | 0 | 1 (6101.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...ときには 1 を返します。

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

OpenSSL::BN
.new(5) <=> 5 # => 0

OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@param other 比較する整数
@r...
...aise TypeError 比較できないときに発生します。
@see OpenSSL::BN#ucmp...

OpenSSL::BN#/(other) -> [OpenSSL::BN, OpenSSL::BN] (3301.0)

自身を other で割った商と余りを配列で返します。

...自身を other で割った商と余りを配列で返します。

@param other 除数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_inverse...

OpenSSL::BN#<<(other) -> OpenSSL::BN (3213.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!...

OpenSSL::BN#rshift!(n) -> self (3213.0)

自身を n ビット右シフトします。 [[m:OpenSSL::BN#>>]と異なり、破壊的メソッドです。

...[[m:OpenSSL::BN#>>]と異なり、破壊的メソッドです。

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

bn = 8.to_bn
bn.rshift!(1) # => #<OpenSSL::BN 4>
bn # => #<OpenSSL::BN 4>
//}

@param n シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#>>...

絞り込み条件を変える

<< 1 2 3 ... > >>