Anti-Cheat Toolkit  2024.0.0
Multi-purpose anti-cheat solution for Unity Engine
ThreadSafeRandom Class Reference

Static Public Member Functions

static int Next (int minInclusive, int maxExclusive)
 
static long NextLong (long minInclusive, long maxExclusive)
 
static void NextBytes (byte[] buffer)
 
static void NextChars (char[] buffer)
 

Detailed Description

Random utility which can be used from background threads.

Member Function Documentation

◆ Next()

static int Next ( int  minInclusive,
int  maxExclusive 
)
inlinestatic

Generates random int number within specified range.

Parameters
minInclusiveMinimal value, inclusive.
maxExclusiveMaximum value, exclusive.
Returns
Random value in specified range.

◆ NextLong()

static long NextLong ( long  minInclusive,
long  maxExclusive 
)
inlinestatic

Generates random long number within specified range.

Parameters
minInclusiveMinimal value, inclusive.
maxExclusiveMaximum value, exclusive.
Returns
Random value in specified range.

◆ NextBytes()

static void NextBytes ( byte[]  buffer)
inlinestatic

Fills passed buffer with random bytes.

Parameters
bufferBuffer filled with random bytes.

◆ NextChars()

static void NextChars ( char[]  buffer)
inlinestatic

Fills passed buffer with random char values.

Parameters
bufferBuffer filled with random char values.