336件ヒット
[1-100件を表示]
(0.153秒)
ライブラリ
- openssl (336)
キーワード
- % (12)
- * (12)
- ** (12)
- + (12)
- - (12)
-
/ (12) - << (12)
- >> (12)
-
clear
_ bit! (12) - copy (12)
- gcd (12)
- lshift! (12)
-
mask
_ bits! (12) -
mod
_ add (12) -
mod
_ exp (12) -
mod
_ inverse (12) -
mod
_ mul (12) -
mod
_ sqr (12) -
mod
_ sub (12) - prime? (24)
-
prime
_ fasttest? (12) - rshift! (12)
-
set
_ bit! (12) - sqr (12)
-
to
_ i (12) -
to
_ int (12) -
to
_ s (12)
検索結果
先頭5件
-
OpenSSL
:: BN # mask _ bits!(n) -> self (14.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 (14.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 (8.0) -
自身を other で割り算した余りを返します。
...自身を other で割り算した余りを返します。
@param other 除数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # *(other) -> OpenSSL :: BN (8.0) -
自身と other の積を返します。
...自身と other の積を返します。
@param other かける数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_mul... -
OpenSSL
:: BN # **(other) -> OpenSSL :: BN (8.0) -
自身の other 乗を返します。
...自身の other 乗を返します。
@param other 指数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_exp... -
OpenSSL
:: BN # +(other) -> OpenSSL :: BN (8.0) -
自身と other の和を返します。
...自身と other の和を返します。
@param other 足す整数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_add... -
OpenSSL
:: BN # -(other) -> OpenSSL :: BN (8.0) -
自身から other を引いた値を返します。
...自身から other を引いた値を返します。
@param other 引く整数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_sub... -
OpenSSL
:: BN # / (other) -> [OpenSSL :: BN , OpenSSL :: BN] (8.0) -
自身を other で割った商と余りを配列で返します。
...自身を other で割った商と余りを配列で返します。
@param other 除数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_inverse... -
OpenSSL
:: BN # <<(other) -> OpenSSL :: BN (8.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!...