Mac OS X also comes with uuidgen, which probably means the other BSDs
do as well. The code seems straightforward enough to turn it into a
loadable module.

I'm using a simple random sequence of characters as a session id for
visitors:

    set chars
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
    set chars_len [string length $chars]
    set uid ""
    for { set i 0 } { $i < 64 } { incr i } {
        append uid [string index $chars [expr int($chars_len * rand())]]
    }

I think I stole this from Dossy's nssession module; it should suffice
for uniquely identifying a session over a reasonable period of time. If
this isn't fast enough, you can always pre-generate a bunch of them and
stick them in an nsv.

/s.

On Mar 25, 2004, at 3:40 PM, Dave Bauer wrote:

Has anyone had the need to generate UUID/GUIDs as described here
http://hegel.ittc.ukans.edu/topics/internet/internet-drafts/draft-l/
draft-leach-uuids-guids-01.txt

One option is to use the uuidgen program that is installed on linux at
least. I am not sure that would always be available.

Are there any other options for AOLserver or Tcl?

Dave


-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to