Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static class: RT.Util.RndCrypto

Summary

This class offers static functions which generate cryptographically-strong random numbers in a thread-safe manner.

Static methods

string
GenerateString(int length, string takeCharactersFrom = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
Generates a random string of the specified length, taking characters from the specified arsenal of characters.
intReturns a random non-negative integer.
int
Next(int max)
Returns a non-negative random number less than max.
int
Next(int min, int max)
Returns a random integer between min (inclusive) and max (exclusive).
boolReturns a random boolean.
void
NextBytes(byte[] buffer)
Fills the specified buffer with cryptographically-strong random bytes.
byte[]
NextBytes(int count)
Returns a new array with the specified number of elements, filled with cryptographically-strong random bytes.
doubleReturns a random double between 0.0 and 1.0.
double
NextDouble(double min, double max)
Returns a random double between min and max. It is unclear whether min or max can ever be returned.
longReturns a random non-negative 64-bit integer.