BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | Properties | List of all members
BogaNet.TrueRandom.SequenceTRNG Class Referenceabstract

Randomizes a given interval of integers, i.e. arrange them in random order. More...

Inheritance diagram for BogaNet.TrueRandom.SequenceTRNG:
BogaNet.TrueRandom.BaseTRNG

Static Public Member Functions

static int CalcBits (int min, int max)
 Calculates needed bits (from the quota) for generating a random sequence. NOTE: The calculated value is an approximation and will may differ from the real quota deducted from the server.
 
static List< int > Generate (int min, int max, int number=0, bool prng=false)
 Generates random sequence.
 
static async Task< List< int > > GenerateAsync (int min, int max, int number=0, bool prng=false)
 Generates random sequence asynchronously.
 
static List< int > GeneratePRNG (int min, int max, int number=0, int seed=0)
 Generates a random sequence with the C#-standard Pseudo-Random-Number-Generator.
 

Properties

static List< int > Result = [] [get]
 Returns the sequence from the last generation.
 
- Properties inherited from BogaNet.TrueRandom.BaseTRNG
static int Seed [get]
 Returns a seed for the PRNG.
 

Additional Inherited Members

- Static Public Attributes inherited from BogaNet.TrueRandom.BaseTRNG
const string GENERATOR_URL = "https://www.random.org/"
 URL of the random number generator.
 
- Static Protected Attributes inherited from BogaNet.TrueRandom.BaseTRNG
static readonly Random _rnd = new()
 
static bool _isRunning
 

Detailed Description

Randomizes a given interval of integers, i.e. arrange them in random order.

Member Function Documentation

◆ CalcBits()

static int BogaNet.TrueRandom.SequenceTRNG.CalcBits ( int min,
int max )
static

Calculates needed bits (from the quota) for generating a random sequence. NOTE: The calculated value is an approximation and will may differ from the real quota deducted from the server.

Parameters
minStart of the interval
maxEnd of the interval
Returns
Needed bits for generating the sequence.

◆ Generate()

static List< int > BogaNet.TrueRandom.SequenceTRNG.Generate ( int min,
int max,
int number = 0,
bool prng = false )
static

Generates random sequence.

Parameters
minStart of the interval (range: -1'000'000'000 - 1'000'000'000)
maxEnd of the interval (range: -1'000'000'000 - 1'000'000'000)
numberHow many numbers you have in the result (optional, max range: max - min)
prngUse Pseudo-Random-Number-Generator (optional, default: false)
Returns
List with the generated sequence.

◆ GenerateAsync()

static async Task< List< int > > BogaNet.TrueRandom.SequenceTRNG.GenerateAsync ( int min,
int max,
int number = 0,
bool prng = false )
static

Generates random sequence asynchronously.

Parameters
minStart of the interval (range: -1'000'000'000 - 1'000'000'000)
maxEnd of the interval (range: -1'000'000'000 - 1'000'000'000)
numberHow many numbers you have in the result (optional, max range: max - min)
prngUse Pseudo-Random-Number-Generator (optional, default: false)
Returns
List with the generated sequence.

◆ GeneratePRNG()

static List< int > BogaNet.TrueRandom.SequenceTRNG.GeneratePRNG ( int min,
int max,
int number = 0,
int seed = 0 )
static

Generates a random sequence with the C#-standard Pseudo-Random-Number-Generator.

Parameters
minStart of the interval
maxEnd of the interval
numberHow many numbers you have in the result (optional, max range: max - min)
seedSeed for the PRNG (optional, default: 0 (=standard))
Returns
List with the generated sequence.

Property Documentation

◆ Result

List<int> BogaNet.TrueRandom.SequenceTRNG.Result = []
staticget

Returns the sequence from the last generation.

Returns
Sequence from the last generation.

The documentation for this class was generated from the following file: