Struct Xoroshiro128State
Represents the complete serializable internal state of a Xoroshiro128Plus random number generator. Capturing this struct and passing it back to SetState(Xoroshiro128State) fully restores the generator to the exact point it was when the snapshot was taken, enabling deterministic save/load and replay.
Inherited Members
Namespace: Scylla.Core.Util.Random
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public struct Xoroshiro128State
Remarks
The two 64-bit state words correspond directly to the s[0] and s[1]
fields of the reference xoroshiro128+ algorithm (Vigna/Blackman). The state must
never be all-zeros; SetState(Xoroshiro128State) enforces this invariant
automatically.
Fields
S0
The first 64-bit word of the xoroshiro128+ generator state (s[0]).
Combined with S1 in the plus-output step to produce the raw
output value before the state transition occurs.
Declaration
public ulong S0
Field Value
| Type | Description |
|---|---|
| ulong |
S1
The second 64-bit word of the xoroshiro128+ generator state (s[1]).
Receives a left-rotation and XOR operations during each step; set to 1
as a fallback when the full state would otherwise be all-zeros.
Declaration
public ulong S1
Field Value
| Type | Description |
|---|---|
| ulong |