るりまサーチ

最速Rubyリファレンスマニュアル検索!
1085件ヒット [101-200件を表示] (0.021秒)

別のキーワード

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

モジュール

キーワード

検索結果

<< < 1 2 3 4 ... > >>

OpenSSL::BN#>>(other) -> OpenSSL::BN (3145.0)

自身を other ビット右シフトした値を返します。

...自身を other ビット右シフトした値を返します。

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

bn
= 2.to_bn
bn
>> 1 # => #<OpenSSL::BN 1>
bn
# => #<OpenSSL::BN 2>
//}

@param other シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#rshift!...

OpenSSL::BN.new(integer) -> OpenSSL::BN (3142.0)

整数オブジェクト(Integer)から多倍長整数オブジェクト (OpenSSL::BN)を生成します。

...整数オブジェクト(Integer)から多倍長整数オブジェクト
(OpenSSL::BN)を生成します。

@param integer 整数オブジェクト
@see Integer#to_bn...

OpenSSL::BN#mod_add(other, m) -> OpenSSL::BN (3121.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 (3121.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 (3121.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 (3121.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.pseudo_rand(bits, fill=0, odd=false) -> OpenSSL::BN (3115.0)

乱数を生成し、返します。

...@param bits 発生させる数のビット数
@param fill 上位ビットの性質を決める整数
@param odd 真なら発生させる数は奇数のみとなる
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.rand, OpenSSL::BN.pseudo_rand_range...

OpenSSL::BN.pseudo_rand_range(range) -> OpenSSL::BN (3115.0)

乱数を 0 から range-1 までの間で生成し、返します。

...を 0 から range-1 までの間で生成し、返します。

乱数系列に暗号論的な強さはありません。

@param range 生成する乱数の範囲
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.pseudo_rand, OpenSSL::BN.rand_range...

OpenSSL::BN.rand(bits, fill=0, odd=false) -> OpenSSL::BN (3115.0)

暗号論的に強い擬似乱数を生成し、返します。

...@param bits 発生させる数のビット数
@param fill 上位ビットの性質を決める整数
@param odd 真なら発生させる数は奇数のみとなる
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.pseudo_rand, OpenSSL::BN.rand_range...

OpenSSL::BN.rand_range(range) -> OpenSSL::BN (3115.0)

暗号論的に強い擬似乱数を 0 から range-1 までの間で生成し、返します。

...暗号論的に強い擬似乱数を 0 から range-1 までの間で生成し、返します。

@param range 生成する乱数の範囲
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.rand, OpenSSL::BN.pseudo_rand_range...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>