Skip to content

Commit

Permalink
removed rand() that was causing int overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rgex authored Apr 30, 2017
1 parent 1a5492a commit 5aeb24a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BitcoinPHP/BitcoinECDSA/BitcoinECDSA.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function generateRandom256BitsHexaString($extra = 'FkejkzqesrfeifH3ioio9h
{
$bytes = openssl_random_pseudo_bytes(256, $cStrong);
$hex = bin2hex($bytes);
$random = $hex . microtime(true) . rand(100000000000, 1000000000000) . $extra;
$random = $hex . microtime(true) . $extra;

if ($cStrong === false) {
throw new \Exception('Your system is not able to generate strong enough random numbers');
Expand Down

0 comments on commit 5aeb24a

Please sign in to comment.