BogaNet.TrueRandom 1.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package BogaNet.TrueRandom --version 1.2.1                
NuGet\Install-Package BogaNet.TrueRandom -Version 1.2.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BogaNet.TrueRandom" Version="1.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BogaNet.TrueRandom --version 1.2.1                
#r "nuget: BogaNet.TrueRandom, 1.2.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BogaNet.TrueRandom as a Cake Addin
#addin nuget:?package=BogaNet.TrueRandom&version=1.2.1

// Install BogaNet.TrueRandom as a Cake Tool
#tool nuget:?package=BogaNet.TrueRandom&version=1.2.1                

BogaNet.TrueRandom

Why use TrueRandom?

“TrueRandom” can generate random numbers and they are “truly random”, because they are generated with atmospheric noise, which supersedes the pseudo-random number algorithms typically use in computer programs. TrueRandom can be used for holding drawings, lotteries and sweepstakes, to drive online games, for scientific applications and for art and music.

Here some more information regarding “true” vs. “pseudo-” random: There are two principal methods used to generate random numbers. The first method measures some physical phenomenon that is expected to be random and then compensates for possible biases in the measurement process. Example sources include measuring atmospheric noise, thermal noise, and other external electromagnetic and quantum phenomena. For example, cosmic background radiation or radioactive decay as measured over short timescales represent sources of natural entropy. The second method uses computational algorithms that can produce long sequences of apparently random results, which are in fact completely determined by a shorter initial value, known as a seed value or key. As a result, the entire seemingly random sequence can be reproduced if the seed value is known. This type of random number generator is often called a pseudorandom number generator. This type of generator typically does not rely on sources of naturally occurring entropy, though it may be periodically seeded by natural sources. This generator type is non-blocking, so they are not rate-limited by an external event, making large bulk reads a possibility. Comparison TrueRandom vs. C# Random

For more, please read this: https://en.wikipedia.org/wiki/Random_number_generation

Quota

"TrueRandom" uses the API of random.org, which provides a free tier with a quota limitation of 1'000'000 random bits per IP-address in 24 hours. This allows to generate at least:

  • 120'000 bytes
  • 30'000 integers/floats (depends on the size)
  • 12'000 strings (length of 10 chars, depends on the settings)
  • 3'000 sequences (interval of 10 elements)

If the quota expires, C# pseudo-random will be used automatically. It is recommended to use "TrueRandom" only to set seeds in the PRNG and refresh them as desired to reduce the delay and quota usage.

Main classes

  • CheckQuota: Gets the remaining quota from www.random.org.
  • BytesTRNG: Generates true random byte-arrays in configurable intervals.
  • FloatTRNG: Generates true random floats in configurable intervals.
  • IntegerTRNG: Generates true random integers in configurable intervals.
  • SequenceTRNG: Randomizes a given interval of integers, i.e. arrange them in random order.
  • StringTRNG: Generates true random strings of various length and character compositions.

Nuget:

BogaNet.TrueRandom

API:

https://www.crosstales.com/media/data/BogaNet/api/

GitHub:

https://github.com/slaubenberger/BogaNet/

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.0 89 8/5/2024
1.3.0 80 7/26/2024
1.2.1 103 7/12/2024
1.2.0 86 7/12/2024
0.9.0 107 7/7/2024

Nullability improved.