MCPcopy Create free account
hub / github.com/Kitware/CMake / WinCryptRandom

Function WinCryptRandom

Source/cmSystemTools.cxx:2906–2916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2904# define CRYPT_SILENT 0x40 /* Not defined by VS 6 version of header. */
2905# endif
2906static int WinCryptRandom(void* data, size_t size)
2907{
2908 int result = 0;
2909 HCRYPTPROV hProvider = 0;
2910 if (CryptAcquireContextW(&hProvider, 0, 0, PROV_RSA_FULL,
2911 CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
2912 result = CryptGenRandom(hProvider, (DWORD)size, (BYTE*)data) ? 1 : 0;
2913 CryptReleaseContext(hProvider, 0);
2914 }
2915 return result;
2916}
2917#endif
2918
2919unsigned int cmSystemTools::RandomSeed()

Callers 1

RandomSeedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…