Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 24428

re: GUIDs are designed to be unique, not random

$
0
0

The original problem is about shuffling a jury pool, so there is no need for cryptography, passwords or any such thing. If using C/C++, rand() would work just fine. Just walk the list, exchanging each entry with a random entry. No need to sort or actually assign a number.

[It may not need to be cryptographically secure, but it definitely needs to be unbiased. The jury pool probably exceeds the resolution of rand(), so you're going to have systematic bias in your selection. -Raymond]

Viewing all articles
Browse latest Browse all 24428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>