in reply to Re: Random, Unique, but Simple session ID
in thread Random, Unique, but Simple session ID
Uh, that tr never fires there. hexhash always generates hex chars. Perhaps you're confusing this with the base64 versions that I was trying to steer the other petitioner around.# ** Note ** This is intended to be unique, not unguessable. my $id = MD5->hexhash(MD5->hexhash(time.{}.rand().$$)); $id =~ tr|+/=|-_.|; # make non-word characters URL friendly
-- Randal L. Schwartz, Perl hacker
|
---|
In Section
Seekers of Perl Wisdom