fix threading bug
parent
35decf30bd
commit
3ec852b64c
|
|
@ -85,7 +85,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size)
|
||||||
{
|
{
|
||||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||||
# ifdef WORKAROUND_MS_BUG_Q258000
|
# ifdef WORKAROUND_MS_BUG_Q258000
|
||||||
static MicrosoftCryptoProvider m_Provider;
|
const MicrosoftCryptoProvider &m_Provider = Singleton<MicrosoftCryptoProvider>().Ref();
|
||||||
# endif
|
# endif
|
||||||
if (!CryptGenRandom(m_Provider.GetProviderHandle(), (DWORD)size, output))
|
if (!CryptGenRandom(m_Provider.GetProviderHandle(), (DWORD)size, output))
|
||||||
throw OS_RNG_Err("CryptGenRandom");
|
throw OS_RNG_Err("CryptGenRandom");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue