MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / GetRandom

Method GetRandom

Source/Tools/FEXLoader/ELFCodeLoader.h:206–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 static bool GetRandom(void* Data, size_t DataSize) {
207 ssize_t Result {};
208 do {
209 // This is guaranteed to not be interrupted by a signal,
210 // since fewer than 256 bytes of RNG data are requested
211 Result = getrandom(Data, DataSize, 0);
212 } while (Result != -1 && Result != DataSize);
213
214 return Result != -1;
215 }
216
217public:
218

Callers

nothing calls this directly

Calls 1

getrandomFunction · 0.85

Tested by

no test coverage detected