Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: unique cookie id?

by duct_tape (Hermit)
on Dec 23, 2003 at 18:26 UTC ( [id://316675]=note: print w/replies, xml ) Need Help??


in reply to unique cookie id?

As a well tested and proven module, I think that you may want to look into how Apache::Session generates ids. The below code was taken directly from Apache::Session::Generate::MD5.

Digest::MD5::md5_hex(Digest::MD5::md5_hex(time(). {}. rand(). $$))

It basically takes an MD5 checksum of a MD5 checksum of a string like this 1072203122HASH(0x80f915c)0.43483996817758877220. It generates a 32 character long string like af68382107551b68473e6a7836ab372e. I would consider that to be pretty unique and unguessable.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found