524件ヒット
[201-300件を表示]
(0.065秒)
ライブラリ
- openssl (524)
キーワード
- % (12)
- * (12)
- ** (12)
- + (12)
- - (12)
-
/ (12) - << (12)
- <=> (12)
- == (12)
- === (12)
- >> (12)
-
bit
_ set? (12) -
clear
_ bit! (12) - cmp (12)
- coerce (12)
- copy (12)
- eql? (12)
- gcd (12)
- lshift! (12)
-
mask
_ bits! (12) -
mod
_ add (12) -
mod
_ exp (12) -
mod
_ inverse (12) -
mod
_ mul (12) -
mod
_ sqr (12) -
mod
_ sub (12) - negative? (8)
-
num
_ bits (12) -
num
_ bytes (12) - odd? (12)
- one? (12)
-
pretty
_ print (12) - prime? (24)
-
prime
_ fasttest? (12) - rshift! (12)
-
set
_ bit! (12) - sqr (12)
-
to
_ bn (12) -
to
_ i (12) -
to
_ int (12) -
to
_ s (12) - ucmp (12)
- zero? (12)
検索結果
先頭5件
-
OpenSSL
:: BN # eql?(other) -> bool (2.0) -
自身と other が等しい場合に true を返します。
自身と other が等しい場合に true を返します。
@param other 比較する数 -
OpenSSL
:: BN # gcd(other) -> OpenSSL :: BN (2.0) -
GCD(最大公約数)を返します。
...GCD(最大公約数)を返します。
@param other 自身との GCD を計算する数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # lshift!(n) -> self (2.0) -
自身を n ビット左シフトします。 OpenSSL::BN#<<と異なり、破壊的メソッドです。
...す。
OpenSSL::BN#<<と異なり、破壊的メソッドです。
//emlist[][ruby]{
require 'openssl'
bn = 1.to_bn
bn.lshift!(2) # => #<OpenSSL::BN 4>
bn # => #<OpenSSL::BN 4>
//}
@param n シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#<<... -
OpenSSL
:: BN # mask _ bits!(n) -> self (2.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 計算時エ... -
OpenSSL
:: BN # mod _ add(other , m) -> OpenSSL :: BN (2.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 (2.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 _ inverse(m) -> OpenSSL :: BN (2.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 _ mul(other , m) -> OpenSSL :: BN (2.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 _ sqr(m) -> OpenSSL :: BN (2.0) -
(self ** 2) % m を返します。
...(self ** 2) % m を返します。
@param m mod を取る数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#sqr...