Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

OpenSSL::BN.new

OpenSSL::BN.new(bn) => aBN
OpenSSL::BN.new(integer) => aBN
OpenSSL::BN.new(string) => aBN
OpenSSL::BN.new(string, 0 | 2 | 10 | 16) => aBN

Construct a new OpenSSL BIGNUM object.

See also .generate_prime #% #* also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1