About
The MAXON API provides pseudo random number generators for trivial purposes and cryptographic applications.
Random
maxon::LinearCongruentialRandom is a standard pseudo random number generator that can be initialized with a seed value:
  
 
  
 
  
 
  
  {
  }
Py_ssize_t i
Definition: abstract.h:645
 
Py_ssize_t count
Definition: abstract.h:640
 
Definition: basearray.h:415
 
ResultMem EnsureCapacity(Int requestedCapacity, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY)
Definition: basearray.h:1329
 
MAXON_ATTRIBUTE_FORCE_INLINE ResultRef< T > Append(ARG &&x)
Appends a new element at the end of the array and constructs it using the forwarded value.
Definition: basearray.h:628
 
Definition: lib_math.h:19
 
FLOAT Get01()
Returns the next random value in the range of [0..1].
 
int32_t Int32
32 bit signed integer datatype.
Definition: apibase.h:190
 
float Float32
32 bit floating point value (float)
Definition: apibase.h:196
 
#define iferr_return
Definition: resultbase.h:1524
 
  
SecureRandom
maxon::SecureRandom is a cryptographically secure pseudo-random number generator. It is typically used in the context of encrypting data. See Cryptography
maxon::SecureRandom provides these static functions:
  
 
  
 
  
 
  
  {
  }
ResultMem Resize(Int newCnt, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::DEFAULT)
Definition: basearray.h:1218
 
static MAXON_METHOD SecureRandomProvider GetDefaultProvider()
 
static MAXON_METHOD Bool GetRandomNumber(SecureRandomProvider provider, const Block< Byte > &buffer)
 
unsigned char UChar
unsigned 8 bit character
Definition: apibase.h:199
 
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
 
  
Further Reading