Random Options Extensions.With Cha Cha Variant 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#
A new RandomOptions with the specified variant stored in extras.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public static RandomOptions WithChaChaVariant(
this RandomOptions options,
ChaChaVariant variant
)Parameters
- options RandomOptions
- The base options.
- variant ChaChaVariant
- The ChaCha variant.
Return Value
RandomOptionsA new RandomOptions with the specified variant stored in extras.
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
| Argument | Thrown when rounds is not 8, 12, or 20. |