Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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

by sachmet (Scribe)
on Apr 13, 2001 at 21:33 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2021-04-20 14:30 GMT
Find Nodes?
    Voting Booth?

    No recent polls found