in reply to Generate a session ID
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Generate a session ID
by Your Mother (Archbishop) on Dec 03, 2005 at 19:57 UTC | |
by jonadab (Parson) on Dec 04, 2005 at 11:41 UTC |