Reece
4703264c57
[*] Cryptographically unsafe RNG is marginally less dangerous; use secure rng for the entire base seed instead of seeding using 32bit mt
13 lines
308 B
C++
13 lines
308 B
C++
#pragma once
|
|
|
|
struct WELLRand
|
|
{
|
|
AuUInt32 state[16];
|
|
int index;
|
|
Aurora::Threading::Primitives::SpinLock lock;
|
|
};
|
|
|
|
WELLRand WELL_SeedRand(AuUInt32 seed);
|
|
WELLRand WELL_SeedRand64(AuUInt64 seed);
|
|
AuUInt32 WELL_NextLong(WELLRand* rand);
|
|
void WELL_NextBytes(WELLRand *rand, void *in, AuUInt32 length); |