Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uuid4 seems unsafe base on C++ standards #19

Open
DJHoltkamp opened this issue Apr 5, 2018 · 1 comment
Open

uuid4 seems unsafe base on C++ standards #19

DJHoltkamp opened this issue Apr 5, 2018 · 1 comment

Comments

@DJHoltkamp
Copy link

I have found the following content on std::random_device:

std::random_device is a uniformly-distributed integer random number generator that produces non-deterministic random numbers.
std::random_device may be implemented in terms of an implementation-defined pseudo-random number engine if a non-deterministic source (e.g. a hardware device) is not available to the implementation. In this case each std::random_device object may generate the same number sequence.

I am writing a cross platform game and wanting a good UUID, and the fact that these could come out as the same number on some devices (I am thinking Android in particular) is a bit terrifying. Please let me know if I am wrong and there is a better assurance that this couldn't happen.

@dan-ryan
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants