Class

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Returns true only if obj has the same value as bn. Contrast this with OpenSSL::BN#eql?, which requires obj to be OpenSSL::BN.

No documentation available
No documentation available

Tests bit bit in bn and returns true if set, false if not set.

No documentation available
No documentation available
No documentation available
No documentation available

Returns true only if obj is a OpenSSL::BN with the same value as bn. Contrast this with OpenSSL::BN#==, which performs type conversions.

No documentation available

Generates a random prime number of bit length bits. If safe is set to true, generates a safe prime. If add is specified, generates a prime that fulfills condition p % add = rem.

Parameters

  • bits - integer

  • safe - boolean

  • add - BN

  • rem - BN

Returns a hash code for this object.

See also Object#hash.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Performs a Miller-Rabin probabilistic primality test with checks iterations. If checks is not specified, a number of iterations is used that yields a false positive rate of at most 2^-80 for random input.

Parameters

  • checks - integer

Performs a Miller-Rabin primality test. This is same as prime? except this first attempts trial divisions with some small primes.

Parameters

  • checks - integer

  • trial_div - boolean

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Parameters

  • base - Integer Valid values:

    • 0 - MPI

    • 2 - binary

    • 10 - the default

    • 16 - hex

No documentation available
No documentation available