1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-04-21 16:01:56 +02:00

Update src/Faker/Provider/Uuid.php

This commit is contained in:
Jáchym Toušek 2019-09-17 15:52:46 +02:00 committed by GitHub
parent 3fcc34228b
commit 26db8f5dcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,8 @@ class Uuid extends Base
*/
public static function uuid()
{
// fix for compatibility with 32bit architecture; seed range restricted to 32bit
// fix for compatibility with 32bit architecture; each mt_rand call is restricted to 32bit
// two such calls will cause 64bits of randomness regardless of architecture
$seed = mt_rand(0, 2147483647) . '#' . mt_rand(0, 2147483647);
// Hash the seed and convert to a byte array