Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:2.3frompierredup:random_compat
Sep 26, 2015

Conversation

pierredup
Copy link
Contributor

QA
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#15239
LicenseMIT
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.

@dunglas
Copy link
Member

Looks good to me. 👍

@sstok
Copy link
Contributor

👍

@fabpot
Copy link
Member

I would do the same as forircmaxell/password-compat where we require either the right PHP version or the dep incomposer.json (#7853), at least for 3.0.

@pierredup
Copy link
ContributorAuthor

@fabpot This PR adds support for therandom_bytes function in 2.3 if it is available (either by using PHP 7 or by manually including the compat library).

#15879 deprecates the SecureRandom class for 2.8 and#15880 removes the class for 3.0 and only uses therandom_bytes function with a hard dependency on theparagonie/random_compat library (which will only define the necessary functions when they are not available, I.E PHP < 7).

I'm not sure if this is what you had in mind

@derrabus
Copy link
Member

👍

Status: Reviewed

@fabpot
Copy link
Member

👍

@fabpot
Copy link
Member

Thank you@pierredup.

@fabpotfabpot merged commit6a217dc intosymfony:2.3Sep 26, 2015
fabpot added a commit that referenced this pull requestSep 26, 2015
…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
@fabpotfabpot mentioned this pull requestOct 6, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

8 participants
@pierredup@dunglas@sstok@fabpot@derrabus@acasademont@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp