class Crypto::Prime::TrialDivisionGenerator

Overview

An implementation of PseudoPrimeGenerator which uses a prime table generated by trial division.

Defined in:

crypto/utils/prime.cr

Constructors

Instance Method Summary

Instance methods inherited from class Crypto::Prime::PseudoPrimeGenerator

each(&) each, next next, rewind : self rewind, size size, succ : Int::Signed succ, upper_bound : Int128 | Int16 | Int32 | Int64 | Int8 | Nil upper_bound, upper_bound=(ubound : Int128 | Int16 | Int32 | Int64 | Int8 | Nil) upper_bound=

Constructor methods inherited from class Crypto::Prime::PseudoPrimeGenerator

new(ubound : Int128 | Int16 | Int32 | Int64 | Int8 | Nil = nil) new

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def rewind : self #
Description copied from class Crypto::Prime::PseudoPrimeGenerator

Rewinds the internal position for enumeration.


[View source]
def succ : Int::Signed #
Description copied from class Crypto::Prime::PseudoPrimeGenerator

returns the next pseudo-prime number, and move the internal position forward.


[View source]