308件ヒット
[1-100件を表示]
(0.112秒)
ライブラリ
- openssl (308)
クラス
-
OpenSSL
:: BN (308)
キーワード
- % (11)
- * (11)
- ** (11)
- + (11)
- - (11)
-
/ (11) - << (11)
- >> (11)
-
clear
_ bit! (11) - copy (11)
- gcd (11)
- lshift! (11)
-
mask
_ bits! (11) -
mod
_ add (11) -
mod
_ exp (11) -
mod
_ inverse (11) -
mod
_ mul (11) -
mod
_ sqr (11) -
mod
_ sub (11) - prime? (22)
-
prime
_ fasttest? (11) - rshift! (11)
-
set
_ bit! (11) - sqr (11)
-
to
_ i (11) -
to
_ int (11) -
to
_ s (11)
検索結果
先頭5件
-
OpenSSL
:: BN # mask _ bits!(n) -> self (13.0) -
自身を下位 n ビットでマスクし、破壊的に変更します。
...場合は例外 OpenSSL::BNError
が発生します。
//emlist[][ruby]{
require 'openssl'
bn = 0b1111_1111.to_bn
bn.mask_bits!(8)
p "%b" % bn # => "11111111"
bn.mask_bits!(3)
p "%b" % bn # => "111"
//}
@param n マスクするビット数
@raise OpenSSL::BNError 計算時エラ... -
OpenSSL
:: BN # mod _ inverse(m) -> OpenSSL :: BN (13.0) -
自身の mod m における逆元を返します。
...(self * r) % m == 1 となる r を返します。
存在しない場合は例外 OpenSSL::BNError が発生します。
//emlist[][ruby]{
require 'openssl'
p 3.to_bn.mod_inverse(5) # => 2
p (3 * 2) % 5 # => 1
//}
@param m mod を取る数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # %(other) -> OpenSSL :: BN (7.0) -
自身を other で割り算した余りを返します。
...自身を other で割り算した余りを返します。
@param other 除数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # *(other) -> OpenSSL :: BN (7.0) -
自身と other の積を返します。
...自身と other の積を返します。
@param other かける数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_mul... -
OpenSSL
:: BN # **(other) -> OpenSSL :: BN (7.0) -
自身の other 乗を返します。
...自身の other 乗を返します。
@param other 指数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_exp... -
OpenSSL
:: BN # +(other) -> OpenSSL :: BN (7.0) -
自身と other の和を返します。
...自身と other の和を返します。
@param other 足す整数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_add... -
OpenSSL
:: BN # -(other) -> OpenSSL :: BN (7.0) -
自身から other を引いた値を返します。
...自身から other を引いた値を返します。
@param other 引く整数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_sub... -
OpenSSL
:: BN # / (other) -> [OpenSSL :: BN , OpenSSL :: BN] (7.0) -
自身を other で割った商と余りを配列で返します。
...自身を other で割った商と余りを配列で返します。
@param other 除数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_inverse... -
OpenSSL
:: BN # <<(other) -> OpenSSL :: BN (7.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 # >>(other) -> OpenSSL :: BN (7.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!...