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
Post a Comment