Skip to content

Always sys/random.h, I don't like Apple nor Google equally now #98

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Jun 11, 2025

Closes #97

@phadej phadej force-pushed the sys-random-always branch 2 times, most recently from 184de04 to 4072bc6 Compare June 11, 2025 16:22
... because apparently some systems don't expose getentropy via unistd.h
(as POSIX suggests since recently). (Some systems include Android).

While we are on it:
- Use `RtlGenRandom` on Windows instead of time
- Use `SecRandomCopyBytes` on macos and ios
  I have no access to ios devices, but if SecRandomCopyBytes approach
  works on macos, I hope it works on ios.
  `getentropy` is reported to not work on `ios` elsewhere.
@phadej phadej force-pushed the sys-random-always branch from 4072bc6 to cdddad7 Compare June 25, 2025 18:07
@phadej phadej merged commit 047c4f7 into master Jun 25, 2025
22 checks passed
@phadej phadej deleted the sys-random-always branch June 25, 2025 18:26
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.

1 participant