-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update osrng.cpp #1232
base: master
Are you sure you want to change the base?
Update osrng.cpp #1232
Conversation
Added the possibility of using Microsoft's default RNG provider, removes the need to acquire a provider (which solves the problem of not having an available provider and also saves resources)
Thanks @Kronix69. Where is |
I momentarily left it like that so the user can enable it if they desire and so if you guys believed it to be better to enable it by default |
We could completely remove the need for a provider, I haven't encountered any issues with using the default provider so we could just erase the whole acquiring of a provider, remove the if defined for CRYPTOPP_DEFAULT_AES_PROVIDER and just make it be the standard |
Made using the default provider the standard, removes the need to acquire a provider and solves issues for those who were getting an invalid handle
I made a small mistake, if the CRYPTOAPI is used we still need to use the provider
Hey @noloader, any status on merging? I changed the code and applied the changes without the #ifdef. |
You could conditionally define |
Done, I instead used the WINVER define which specifies the Windows version to check for Windows 10 and higher. |
Any status on the merge? |
Nevermind I realised the issue with static checking, will devise a way to runtime check |
Added the possibility of using Microsoft's default RNG provider, removes the need to acquire a provider (which solves the problem of not having an available provider and also saves resources)