StandardRng Class
A cryptographically secure RNG with good performance.
Namespace
RandN
Interfaces
Base Types
  • object
StandardRng
object
ICryptoRng
IRng

Syntax

public sealed class StandardRng : ICryptoRng, IRng

Methods

NameReturn ValueSummary
Create()StandardRng
Creates a StandardRng.
static
Fill(Span<byte>)void
Completely fills the span with random bytes.
GetFactory()StandardRng.Factory
Gets the StandardRng factory.
static
NextUInt32()uint
Returns the next 32 bits in the sequence as a UInt32.
NextUInt64()ulong
Returns the next 64 bits in the sequence as a UInt64.

Extension Methods

NameValueSummary
Sample<StandardRng, TDistribution, TResult>(TDistribution)TResult
Samples the distribution from rng.
Sample<StandardRng, TResult>(IDistribution<TResult>)TResult
Samples the distribution from rng.
ShuffleInPlace<StandardRng, T>(IList<T>)void
Shuffles a list using the in-place Fisher-Yates shuffling algorithm.