mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-23 17:28:59 +03:00
Use random_bytes() to generate a random node
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user