[+] AuRNG::RandomDef static utilities (Fast, Secure, FromU64Seed, FromU32Seed, FromMassiveSeed)
This commit is contained in:
parent
9393c17564
commit
daab43a2b2
@ -23,6 +23,42 @@ namespace Aurora::RNG
|
||||
this->SetSeed64(seed);
|
||||
}
|
||||
|
||||
inline RandomDef(const AuArray<AuUInt8, 64> &seed)
|
||||
{
|
||||
this->SetMassiveSeed(seed);
|
||||
}
|
||||
|
||||
cstatic RandomDef Secure()
|
||||
{
|
||||
RandomDef def;
|
||||
def.SetCSRNG();
|
||||
return AuMove(def);
|
||||
}
|
||||
|
||||
cstatic RandomDef Fast()
|
||||
{
|
||||
return RandomDef {};
|
||||
}
|
||||
|
||||
cstatic RandomDef FromU64Seed(AuUInt64 uSeed)
|
||||
{
|
||||
RandomDef def(uSeed);
|
||||
return AuMove(def);
|
||||
}
|
||||
|
||||
cstatic RandomDef FromU32Seed(AuUInt32 uSeed)
|
||||
{
|
||||
RandomDef def(uSeed);
|
||||
return AuMove(def);
|
||||
}
|
||||
|
||||
cstatic RandomDef FromMassiveSeed(const AuArray<AuUInt8, 64> &seed)
|
||||
{
|
||||
RandomDef def;
|
||||
def.SetMassiveSeed(seed);
|
||||
return AuMove(def);
|
||||
}
|
||||
|
||||
bool bSecure {};
|
||||
AuOptional<AuUInt32> seed;
|
||||
AuOptional<AuUInt64> seed64;
|
||||
|
Loading…
Reference in New Issue
Block a user