568件ヒット
[1-100件を表示]
(0.064秒)
種類
- インスタンスメソッド (480)
- 特異メソッド (88)
キーワード
- % (11)
- * (11)
- ** (11)
- + (11)
- - (11)
-
/ (11) - << (11)
- <=> (11)
- == (11)
- === (11)
- >> (11)
-
bit
_ set? (11) -
clear
_ bit! (11) - cmp (11)
- coerce (11)
- copy (11)
- eql? (11)
- gcd (11)
-
generate
_ prime (11) - lshift! (11)
-
mask
_ bits! (11) -
mod
_ add (11) -
mod
_ exp (11) -
mod
_ inverse (11) -
mod
_ mul (11) -
mod
_ sqr (11) -
mod
_ sub (11) - negative? (7)
- new (33)
-
num
_ bits (11) -
num
_ bytes (11) - odd? (11)
- one? (11)
-
pretty
_ print (11) - prime? (22)
-
prime
_ fasttest? (11) -
pseudo
_ rand (11) -
pseudo
_ rand _ range (11) - rand (11)
-
rand
_ range (11) - rshift! (11)
-
set
_ bit! (11) - sqr (11)
-
to
_ bn (11) -
to
_ i (11) -
to
_ int (11) -
to
_ s (11) - ucmp (11)
- zero? (11)
検索結果
先頭5件
-
OpenSSL
:: BN # / (other) -> [OpenSSL :: BN , OpenSSL :: BN] (11217.0) -
自身を other で割った商と余りを配列で返します。
...自身を other で割った商と余りを配列で返します。
@param other 除数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_inverse... -
OpenSSL
:: BN . new(str , base=10) -> OpenSSL :: BN (11197.0) -
文字列を多倍長整数オブジェクト(OpenSSL::BN)を生成します。
...文字列を多倍長整数オブジェクト(OpenSSL::BN)を生成します。
base で、変換方法(基数)を指定します。
デフォルトは 10 で、他に 16, 2, 0 を指定できます。
10 引数の文字列を 10進数とみなして、変換します。
16 引数の文字......require 'openssl'
OpenSSL::BN.new("-241") # => -241
OpenSSL::BN.new("ff00",16) # => 65280
OpenSSL::BN.new("\x81",2) # => 129
OpenSSL::BN.new("\xff\x81",2) # => 65409
OpenSSL::BN.new("\x00\x00\x00\x02\x00\x81", 0) # => 129
OpenSSL::BN.new("\x00\x00\x00\x02\x80\x81", 0) # => -129
OpenSSL::BN.new(1209......を表す文字列
@param base 文字列から整数に変換するときの基数
@raise OpenSSL::BNError 変換に失敗した場合に発生します
反対に、OpenSSL::BN クラスのオブジェクトを文字列にするには、
OpenSSL::BN#to_s を用います。
@see OpenSSL::BN#to_s... -
OpenSSL
:: BN . new(bn) -> OpenSSL :: BN (11142.0) -
OpenSSL::BN を複製して返します。
...
OpenSSL::BN を複製して返します。
@param bn 複製する OpenSSL::BN オブジェクト... -
OpenSSL
:: BN . new(integer) -> OpenSSL :: BN (11137.0) -
整数オブジェクト(Integer)から多倍長整数オブジェクト (OpenSSL::BN)を生成します。
...整数オブジェクト(Integer)から多倍長整数オブジェクト
(OpenSSL::BN)を生成します。
@param integer 整数オブジェクト
@see Integer#to_bn... -
OpenSSL
:: BN # >>(other) -> OpenSSL :: BN (11134.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 # mod _ add(other , m) -> OpenSSL :: BN (11134.0) -
(self + other) % m を返します。
...(self + other) % m を返します。
//emlist[][ruby]{
require 'openssl'
OpenSSL::BN.new("7").mod_add(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 4
//}
@param other 和を取る数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # mod _ exp(other , m) -> OpenSSL :: BN (11134.0) -
(self ** other) % m を返します。
...(self ** other) % m を返します。
//emlist[][ruby]{
require 'openssl'
OpenSSL::BN.new("7").mod_exp(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 1
//}
@param other 指数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # mod _ mul(other , m) -> OpenSSL :: BN (11134.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 # mod _ sub(other , m) -> OpenSSL :: BN (11134.0) -
(self - other) % m を返します。
...(self - other) % m を返します。
//emlist[][ruby]{
require 'openssl'
OpenSSL::BN.new("27").mod_sub(OpenSSL::BN.new("3"), OpenSSL::BN.new("5")) # => 4
//}
@param other 引く数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # <<(other) -> OpenSSL :: BN (11128.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!...