-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Use random_bytes function if it is available for random number generation #15875
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
Conversation
Looks good to me. 👍 |
👍 |
I would do the same as for |
8645fbd
to
6a217dc
Compare
@fabpot This PR adds support for the #15879 deprecates the SecureRandom class for 2.8 and #15880 removes the class for 3.0 and only uses the I'm not sure if this is what you had in mind |
👍 Status: Reviewed |
👍 |
Thank you @pierredup. |
…number generation (pierredup) This PR was merged into the 2.3 branch. Discussion ---------- Use random_bytes function if it is available for random number generation | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15239 | License | MIT | Doc PR | This is an attempt to use the random_bytes function when generating secure random numbers. This function is included in PHP 7 or through the "paragonie/random_compat" library. This PR only adds support to use the function if it is available. Changes that can be added is to add a hard dependency on the paragonie/random_compat library, so all current functionality can be deprecated. Commits ------- 6a217dc Use random_bytes function if it is available for random number generation
This is an attempt to use the random_bytes function when generating secure random numbers. This function is included in PHP 7 or through the "paragonie/random_compat" library.
This PR only adds support to use the function if it is available. Changes that can be added is to add a hard dependency on the paragonie/random_compat library, so all current functionality can be deprecated.