-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Conversation
src/Faker/Provider/Uuid.php
Outdated
@@ -10,7 +10,7 @@ class Uuid extends Base | |||
*/ | |||
public static function uuid() | |||
{ | |||
// fix for compatibility with 32bit architecture; seed range restricted to 62bit | |||
// fix for compatibility with 32bit architecture; seed range restricted to 32bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this "seed range restricted to" comment. But concatenating two 32 bits random numbers does sound like 64 bits of randomness, not 32.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, it means that each mt_rand
call is limited to 32 bits. Previously PHP_MAX_INT was used which produced 32 bit randomness on 32bit systems and 64 bit randomnes on 64bit systems. Two 32bit calls are used instead to produce 64bit result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update the comment to make it more clear?
Thanks! |
No description provided.