Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

typo #1789

Merged
merged 2 commits into from
Sep 17, 2019
Merged

typo #1789

merged 2 commits into from
Sep 17, 2019

Conversation

enumag
Copy link
Contributor

@enumag enumag commented Sep 16, 2019

No description provided.

@@ -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
Copy link
Owner

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.

Copy link
Contributor Author

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.

Copy link
Owner

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?

src/Faker/Provider/Uuid.php Outdated Show resolved Hide resolved
@fzaninotto fzaninotto merged commit b618562 into fzaninotto:master Sep 17, 2019
@fzaninotto
Copy link
Owner

Thanks!

@enumag enumag deleted the patch-1 branch September 17, 2019 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants