instance method OpenSSL::BN#mod_exp
mod_exp(other, m) -> OpenSSL::BN
-
(self ** other) % m を返します。
例:
BN.new("7").mod_exp(BN.new("3"), BN.new("6")) # => 1
- [PARAM] other:
- 指数
- [PARAM] m:
- 剰余を取る数
- [EXCEPTION] OpenSSL::BNError:
- 計算時エラー
class OpenSSL::BN
mod_exp(other, m) -> OpenSSL::BN
(self ** other) % m を返します。
例:
BN.new("7").mod_exp(BN.new("3"), BN.new("6")) # => 1