-
-
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
std/sysrand
for Windows XP
#19538
std/sysrand
for Windows XP
#19538
Conversation
`BCryptGenRandom` is not present in Windows XP, but has `CryptGenRandom`.
The error you reported in "nim-lang.Nim (Windows_amd64_batch1_3 packages)" has to do with this problem here: #19537 As for the problem in "nim-lang.Nim (OSX_amd64_cpp packages)" I have no idea, but I guarantee it has nothing to do with this PR. |
That's quite a lot of code in order to support Windows XP. I don't mind supporting XP if it doesn't take much effort but this seems excessive for an OS that Microsoft ended all support for on April 8th, 2014. |
IMO easiest way to support XP is to use It does not need a handle being opened/closed like both current |
It appears to be the best solution. I researched and it seems to be used quite a lot by other languages and libraries. |
@xflywind I wanted to hear from you who added sysrand if there was any discussion about the Windows API and any objections to RtlGenRandom... |
Looking at a related PR elsewhere, I agree with @wqweto. RtlGenRandom is the way to go here. |
This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions. |
This pull request is stale because it has been open for 1 year with no activity. Contribute more commits on the pull request and rebase it on the latest devel, or it will be closed in 30 days. Thank you for your contributions. |
This pull request has been marked as stale and closed due to inactivity after 395 days. |
BCryptGenRandom
is not present in Windows XP, but hasCryptGenRandom
.I believe this can be discussed.