るりまサーチ

最速Rubyリファレンスマニュアル検索!
145件ヒット [1-100件を表示] (0.059秒)

別のキーワード

  1. openssl new
  2. openssl digest
  3. openssl to_der
  4. openssl to_s
  5. openssl hexdigest

検索結果

<< 1 2 > >>

OpenSSL::BN#%(other) -> OpenSSL::BN (29207.0)

自身を other で割り算した余りを返します。

...自身を other で割り算した余りを返します。

@param other 除数
@raise OpenSSL::BNError 計算時エラー...

OpenSSL::BN#mod_add(other, m) -> OpenSSL::BN (11147.0)

(self + other) % m を返します。

...(self + other) % m を返します。

//emlist[][ruby]{
require 'openssl'

OpenSSL
::BN.new("7").mod_add(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 4
//}

@param other 和を取る数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー...

OpenSSL::BN#mod_exp(other, m) -> OpenSSL::BN (11147.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#mod_mul(other, m) -> OpenSSL::BN (11147.0)

(self * other) % m を返します。

...(self * other) % m を返します。

//emlist[][ruby]{
require 'openssl'

OpenSSL
::BN.new("7").mod_mul(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 3
//}

@param other 積を取る数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー...

OpenSSL::BN#mod_sub(other, m) -> OpenSSL::BN (11147.0)

(self - other) % m を返します。

...(self - other) % m を返します。

//emlist[][ruby]{
require 'openssl'

OpenSSL
::BN.new("27").mod_sub(OpenSSL::BN.new("3"), OpenSSL::BN.new("5")) # => 4
//}

@param other 引く数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー...

絞り込み条件を変える

OpenSSL::BN#mod_inverse(m) -> OpenSSL::BN (11131.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#mod_sqr(m) -> OpenSSL::BN (11129.0)

(self ** 2) % m を返します。

...(self ** 2) % m を返します。

@param m mod を取る数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#sqr...

OpenSSL::BN.generate_prime(bits, safe=true, add=nil, rem=nil) -> OpenSSL::BN (11113.0)

ランダム(擬似乱数的)な bits ビットの素数を返します。

...しません。

safe が真であれば、「安全な」素数((p-1)/2が素数である素数p)を
返します。

add に整数を渡すと、 p % add == rem であるような
素数pのみを返します。rem が nil の場合は rem=1と見なします。

@param bits 生成するランダ...
...ム素数のビット数
@param safe true で安全な素数のみを生成する
@param add 生成する素数の剰余の条件
@param rem 生成する素数の剰余の条件
@raise OpenSSL::BNError 素数の生成に失敗した場合に発生します...

OpenSSL::BN#mask_bits!(n) -> self (11030.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 計算時...

NEWS for Ruby 2.0.0 (156.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...い。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
* デフォルトのソースエンコーディングを US-ASCII から UTF-8 に変更...
...tSpace.#reachable_objects_from

* openssl
* Consistently raise an error when trying to encode nil values. All instances
of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
raise No...
...itted.
* TLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to
:TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
:TLSv1_1_client. The version being effectively used can be queried
with OpenSSL::SSL#ssl_version. Furthermore, it is also po...

絞り込み条件を変える

<< 1 2 > >>