MCPcopy Create free account
hub / github.com/Detanup01/gbe_fork / randombytes

Function randombytes

dll/base.cpp:38–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36#ifdef __WINDOWS__
37
38void randombytes(char *buf, size_t size)
39{
40 // NT_SUCCESS is: return value >= 0, including Ntdef.h causes so many errors
41 while (BCryptGenRandom(NULL, (PUCHAR) buf, (ULONG) size, BCRYPT_USE_SYSTEM_PREFERRED_RNG) < 0) {
42 PRINT_DEBUG("ERROR");
43 Sleep(100);
44 }
45
46}
47
48std::string get_env_variable(const std::string &name)
49{

Callers 3

generate_account_idFunction · 0.85
generate_random_intFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected