Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Random, Unique, but Simple session ID

by sachmet (Scribe)
on Apr 13, 2001 at 21:33 UTC ( [id://72407]=note: print w/replies, xml ) Need Help??


in reply to Re: Random, Unique, but Simple session ID
in thread Random, Unique, but Simple session ID

Technically, that could work. As long as you're not going to have 32K sessions per second, that seems fairly unique. Problem is, I believe the poster wanted random. There's many ways you could run into race conditions in this case. I say it depends on the application as to the source of randomness and uniqueness. For example, if using a database that supports sequences, you could MD5-encrypt a sequence number with a random password, and that'd be both unique and random, as well as fairly simple. Without more information, it's difficult, though.

Update: Double posted; this should be under this node instead.
Update2: Second post had MD5 note added whereas first didn't.
  • Comment on Re: Re: Random, Unique, but Simple session ID

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://72407]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found