Are you really sure you're never going to need more than a couple million sessions at a time? There are only just over four million possible combinations of eight hex digits, and if you're picking at random and checking for collisions you do not want to get anywhere near exhausting the space.
If sessions expire after a few minutes, 16^8 is enough, assuming you're not one of the dozen top sites. I'd be careful about how long sessions last before they expire, though, and check that the collision detection allows expired sessions to be reused, or that something ensures they are deleted so as not to cause collisions.
In reply to Re: Generate a session ID
by jonadab
in thread Generate a session ID
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |