File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class OpenSslGenerator implements Generator
3434 */
3535 public function __construct (int $ bytes = PHP_INT_SIZE , bool $ forceStrong = true )
3636 {
37- if ($ bytes < 1 ) {
37+ if ($ bytes < 1 ) {
3838 throw new OutOfRangeException ('The length of the desired string of bytes. Must be a positive integer. ' );
3939 }
4040
@@ -54,8 +54,8 @@ public function isForceStrong(): bool
5454 */
5555 public function getRandomInt ()
5656 {
57- $ random = openssl_random_pseudo_bytes ($ this ->bytes , $ strong );
58- if ($ random === false || ($ this ->forceStrong && $ strong !== true )) {
57+ $ random = openssl_random_pseudo_bytes ($ this ->bytes , $ isSourceStrong );
58+ if ($ random === false || ($ this ->forceStrong && $ isSourceStrong !== true )) {
5959 throw new RuntimeException (
6060 'Random number generator algorithm didn \'t used "cryptographically strong" method. '
6161 );
You can’t perform that action at this time.
0 commit comments