2件ヒット
[1-2件を表示]
(0.228秒)
ライブラリ
- openssl (2)
クラス
-
OpenSSL
:: BN (2)
検索結果
-
OpenSSL
:: BN # mod _ inverse(m) -> OpenSSL :: BN (90961.0) -
自身の mod m における逆元を返します。
自身の 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 , OpenSSL :: BN] (9622.0) -
自身を other で割った商と余りを配列で返します。
自身を other で割った商と余りを配列で返します。
@param other 除数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_inverse