るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.064秒)
トップページ > クエリ:openssl[x] > クエリ:new[x] > クエリ:mod_exp[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

クラス

検索結果

OpenSSL::BN#mod_exp(other, m) -> OpenSSL::BN (29256.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 計算時エラー...