るりまサーチ

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

別のキーワード

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

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

OpenSSL::BNError (29018.0)

OpenSSL::BN 関連のエラーを表す例外です。

...OpenSSL::BN 関連のエラーを表す例外です。...

OpenSSL::BN#/(other) -> [OpenSSL::BN, OpenSSL::BN] (11222.0)

自身を other で割った商と余りを配列で返します。

...自身を other で割った商と余りを配列で返します。

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

OpenSSL::BN.new(str, base=10) -> OpenSSL::BN (11202.0)

文字列を多倍長整数オブジェクト(OpenSSL::BN)を生成します。

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

base で、変換方法(基数)を指定します。
デフォルトは 10 で、他に 16, 2, 0 を指定できます。

10 引数の文字列を 10進数とみなして、変換します。
16 引数の文字...
...{
require 'openssl'

OpenSSL
::BN.new("-241") # => -241
OpenSSL
::BN.new("ff00",16) # => 65280
OpenSSL
::BN.new("\x81",2) # => 129
OpenSSL
::BN.new("\xff\x81",2) # => 65409
OpenSSL
::BN.new("\x00\x00\x00\x02\x00\x81", 0) # => 129
OpenSSL
::BN.new("\x00\x00\x00\x02\x80\x81", 0) # => -129
OpenSSL
::BN.new(12...
...を表す文字列
@param base 文字列から整数に変換するときの基数
@raise OpenSSL::BNError 変換に失敗した場合に発生します

反対に、OpenSSL::BN クラスのオブジェクトを文字列にするには、
OpenSSL
::BN#to_s を用います。

@see OpenSSL::BN#to_s...

OpenSSL::BN.new(bn) -> OpenSSL::BN (11142.0)

OpenSSL::BN を複製して返します。

...
OpenSSL
::BN を複製して返します。

@param bn 複製する OpenSSL::BN オブジェクト...

OpenSSL::BN#>>(other) -> OpenSSL::BN (11139.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#mod_add(other, m) -> OpenSSL::BN (11139.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 (11139.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 (11139.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 (11139.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.new(integer) -> OpenSSL::BN (11137.0)

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

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

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

絞り込み条件を変える

<< 1 2 3 ... > >>