Class: OpenSSL::BN
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
self,
Comparable
|
|
| Inherits: | Object |
| Defined in: | ext/openssl/ossl_bn.c, ext/openssl/lib/openssl/bn.rb |
Class Method Summary
Instance Attribute Summary
- #odd? ⇒ Boolean readonly
- #one? ⇒ Boolean readonly
- #zero? ⇒ Boolean readonly
Instance Method Summary
- #%
- #*
- #**
- #+
- #-
- #/
- #<<
- #<=> (also: #cmp)
-
#==(obj) ⇒ Boolean
(also: #===)
Returns
trueonly ifobjhas the same value asbn. -
#===(obj) ⇒ Boolean
Alias for #==.
- #>>
- #bit_set? ⇒ Boolean
- #clear_bit!
-
#cmp
Alias for #<=>.
- #coerce(other)
- #copy(other)
-
#eql?(obj) ⇒ Boolean
Returns
trueonly if obj is aBNwith the same value as big. - #gcd
-
#hash ⇒ Integer
Returns a hash code for this object.
- #lshift!
- #mask_bits!
- #mod_add
- #mod_exp
- #mod_inverse
- #mod_mul
- #mod_sqr
- #mod_sub
- #num_bits
- #num_bytes
- #pretty_print(q)
-
#prime? ⇒ Boolean
Parameters *
checks- integer. -
#prime_fasttest? ⇒ Boolean
Parameters *
checks- integer *trial_div- boolean. - #rshift!
- #set_bit!
- #sqr
- #to_bn
- #to_i ⇒ Integer (also: #to_int)
-
#to_int ⇒ Integer
Alias for #to_i.
-
#to_s ⇒ String
Parameters *
base- integer * * Valid values: * * * 0 - MPI * * * 2 - binary * * * 10 - the default * * * 16 - hex. - #ucmp
Constructor Details
.new ⇒ BN
.new(bn) ⇒ BN
.new(integer) ⇒ BN
.new(string) ⇒ BN
.new(string, 0 | 2 | 10 | 16) ⇒ BN
BN
.new(bn) ⇒ BN
.new(integer) ⇒ BN
.new(string) ⇒ BN
.new(string, 0 | 2 | 10 | 16) ⇒ BN
Class Method Details
.generate_prime
.pseudo_rand
.pseudo_rand_range
.rand
.rand_range
Instance Attribute Details
#odd? ⇒ Boolean (readonly)
#one? ⇒ Boolean (readonly)
#zero? ⇒ Boolean (readonly)
Instance Method Details
#%
#*
#**
#+
#-
#/
#<<
#<=> Also known as: #cmp
#==(obj) ⇒ Boolean Also known as: #===
Returns true only if obj has the same value as bn. Contrast this with #eql?, which requires obj to be BN.
#==(obj) ⇒ Boolean
#===(obj) ⇒ Boolean
Boolean
#===(obj) ⇒ Boolean
Alias for #==.
#>>
#bit_set? ⇒ Boolean
#clear_bit!
#cmp
Alias for #<=>.
#coerce(other)
#copy(other)
#eql?(obj) ⇒ Boolean
Returns true only if obj is a BN with the same value as big. Contrast this with #==, which performs type conversions.
#gcd
#hash ⇒ Integer
Returns a hash code for this object.
See also Object#hash.
#lshift!
#mask_bits!
#mod_add
#mod_exp
#mod_inverse
#mod_mul
#mod_sqr
#mod_sub
#num_bits
#num_bytes
#pretty_print(q)
[ GitHub ]
#prime? ⇒ Boolean
#prime?(checks) ⇒ Boolean
Boolean
#prime?(checks) ⇒ Boolean
Parameters
-
checks- integer
#prime_fasttest? ⇒ Boolean
#prime_fasttest?(checks) ⇒ Boolean
#prime_fasttest?(checks, trial_div) ⇒ Boolean
Boolean
#prime_fasttest?(checks) ⇒ Boolean
#prime_fasttest?(checks, trial_div) ⇒ Boolean
Parameters
-
checks- integer -
trial_div- boolean
#rshift!
#set_bit!
#sqr
#to_bn
#to_i ⇒ Integer Also known as: #to_int
Alias for #to_i.
#to_s ⇒ String
#to_s(base) ⇒ String
String
#to_s(base) ⇒ String
Parameters
-
base- integer -
Valid values:
-
-
0 - MPI
-
-
2 - binary
-
-
10 - the default
-
-
16 - hex
-