Remove unnecessary static from reference to singleton
parent
46c9cc725c
commit
fcdf293356
|
|
@ -146,7 +146,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size)
|
||||||
{
|
{
|
||||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||||
// Acquiring a provider is expensive. Do it once and retain the reference.
|
// Acquiring a provider is expensive. Do it once and retain the reference.
|
||||||
static const MicrosoftCryptoProvider &hProvider = Singleton<MicrosoftCryptoProvider>().Ref();
|
const MicrosoftCryptoProvider &hProvider = Singleton<MicrosoftCryptoProvider>().Ref();
|
||||||
# if defined(USE_MS_CRYPTOAPI)
|
# if defined(USE_MS_CRYPTOAPI)
|
||||||
if (!CryptGenRandom(hProvider.GetProviderHandle(), (DWORD)size, output))
|
if (!CryptGenRandom(hProvider.GetProviderHandle(), (DWORD)size, output))
|
||||||
throw OS_RNG_Err("CryptGenRandom");
|
throw OS_RNG_Err("CryptGenRandom");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue