reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
Random.hxx File Reference
#include "rutil/Mutex.hxx"
#include "rutil/Data.hxx"
#include "rutil/ThreadIf.hxx"
#include "rutil/ResipAssert.h"

Go to the source code of this file.

Classes

class  resip::Random
 A static class that wraps the random-number generation code of your platform. More...
 

Namespaces

namespace  resip
 dcm! – add UnusedChecking(_enum) below;
 

Macros

#define RESIP_RANDOM_WIN32_RTL   1
 Enable "RtlGenRandom" (aka SystemFunction036) on the Windows platform.
 

Macro Definition Documentation

◆ RESIP_RANDOM_WIN32_RTL

#define RESIP_RANDOM_WIN32_RTL   1

Enable "RtlGenRandom" (aka SystemFunction036) on the Windows platform.

RtlGenRandom is a cryptographically secure RNG present on all Windows versions since XP, and is the Microsoft-recommended replacement for the weak srand()/rand() pair (CWE-338). It is enabled by default; the code in Random.cxx falls back to rand() automatically if the entry point cannot be resolved. Comment this out to force the legacy rand() behaviour.

Definition at line 18 of file Random.hxx.