Skip to content
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

windows: move BCryptGenRandom to helper function #318

Closed
wants to merge 1 commit into from

Conversation

josephlr
Copy link
Member

This is not a functional change. It just makes adding additional fallback implementations easier in the future.

Note that the try_into().unwrap() is optimized away: https://godbolt.org/z/nbThsqsTE

I was originally going to try to use BCRYPT_RNG_ALG_HANDLE and fall back to our currently implementation, but that will cause segfaults on older versions.

Signed-off-by: Joe Richey joerichey@google.com

This _is not_ a functional change. It just makes adding additional
fallback implementations easier in the future.

Note that the try_into().unwrap() is optimized away: https://godbolt.org/z/nbThsqsTE

Signed-off-by: Joe Richey <joerichey@google.com>
@newpavlov
Copy link
Member

I think it will be better to have one PR with fallback implementation, instead of splitting it into several.

@josephlr
Copy link
Member Author

I think it will be better to have one PR with fallback implementation, instead of splitting it into several.

Sounds reasonable, I'll move this to draft then.

@josephlr
Copy link
Member Author

Closing, we went with a different approach in #337

@josephlr josephlr closed this Feb 22, 2023
@newpavlov newpavlov deleted the win_cleanup branch June 6, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants