Use random_bytes() to generate a random node

This commit is contained in:
Ben Ramsey
2017-09-22 11:52:03 -05:00
parent 0ef23d1b10
commit aab08bb08a
2 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -31,6 +31,6 @@ class RandomNodeProvider implements NodeProviderInterface
*/
public function getNode()
{
return sprintf('%06x%06x', mt_rand(0, 0xffffff), mt_rand(0, 0xffffff));
return bin2hex(random_bytes(6));
}
}