-
Notifications
You must be signed in to change notification settings - Fork 0
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
array_rand is not cryptographically safe #2
Comments
The
ad 1. ad 2. ad 3. Thanks for pointing out that problem. |
rand() is not better, you should use random_int() instead (for php >= 7) |
Replaced all functions in question. |
Your getRandomWord() function picks a word in the file using the php array_rand() function.
https://www.php.net/manual/en/function.array-rand.php explicitly says that this function should not be used for cryptographic purposes.
The text was updated successfully, but these errors were encountered: