"

ChaCha Class

Summary

A cryptographically secure random number generator using the ChaCha algorithm.
Namespace
RandN.Rngs
Interfaces
Base Types
  • object

Syntax

public sealed class ChaCha : ISeekableRng<ChaCha.Counter>, ICryptoRng, IRng

Properties

NameValueSummary
PositionChaCha.Counter
The current position of the RNG.

Methods

NameValueSummary
Create(ChaCha.Seed, uint)ChaCha
Creates a ChaCha RNG using the given seed and number of double rounds.
static
Create(ChaCha.Seed)ChaCha
Creates a ChaCha20 rng using the given seed.
static
Fill(Span<byte>)void
Completely fills the span with random bytes.
GetChaCha12Factory()ChaCha.Factory12
Gets the ChaCha12 factory.
static
GetChaCha20Factory()ChaCha.Factory20
Gets the ChaCha20 factory.
static
GetChaCha8Factory()ChaCha.Factory8
Gets the ChaCha8 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.