RandomOptionsExtensions.WithChaChaRounds Method

Creates a new RandomOptions configured for ChaCha with the specified number of rounds.

Definition

Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
public static RandomOptions WithChaChaRounds(
	this RandomOptions options,
	int rounds
)

Parameters

options  RandomOptions
The base options.
rounds  Int32
The number of ChaCha rounds (must be 8, 12, or 20).

Return Value

RandomOptions
A new RandomOptions with ChaCha rounds configured.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type RandomOptions. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This extension method sets the Variant property according to the round count:

Valid round values are 8, 12, and 20. Other values will throw an exception.

Exceptions

ArgumentExceptionThrown when rounds is not 8, 12, or 20.

See Also