るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.026秒)
トップページ > ライブラリ:openssl[x] > クエリ:openssl[x] > バージョン:2.7.0[x] > クエリ:BN[x] > クエリ:mod_exp[x]

別のキーワード

  1. openssl to_bn
  2. bn new
  3. bn prime?
  4. new openssl::bn
  5. bn mod_exp

クラス

検索結果

OpenSSL::BN#mod_exp(other, m) -> OpenSSL::BN (97078.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#**(other) -> OpenSSL::BN (42685.0)

自身の other 乗を返します。

...自身の other 乗を返します。

@param other 指数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_exp...