AuroraRuntime/Source/RNG/WELL.hpp
Reece 4703264c57 [+] Added 64bit rng seed support
[*] Cryptographically unsafe RNG is marginally less dangerous; use secure rng for the entire base seed instead of seeding using 32bit mt
2021-10-01 17:54:55 +01:00

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);