sessionid - What is the best way to generate unique session IDs? -


I want to generate a 16 character alphanumeric session ID string. What is the best way to do this so that it is guaranteed that the strings generated each time will be unique?

Note: I am using C ++ to create session IDs.

Usually you use whatever language / OS services you provide such a service. Normally available GUIDs are 16 byte long, which will be 32 characters in hex representation. You can convert it to symbolic words and make it slightly smaller (22 characters or so). Are you really ok 16 characters ? Required


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -