Thanks Andrew & Clint. Oddly enough, within about 5 minutes, I:
a)finished building my own class to do it (converting Branden Hall's SHA-1 algorithm to AS2)
b)received Clint's class
d)received Andrew's link

Took longer to research than to write the class, once I found an AS SHA-1 algorithm.
I just generated 50k uuids using SHA-1 hashes made from a namespace, the results of new date() and an incrementor. Probably overkill, but but I learned:
a)flash can handle really big hash tables
b)I'm not going to win the lottery
c)I've forgotten much of my discrete math class in college

I'm going to put in a request for MM to include a uuid generator. Seems to make sense given the nature of RIA that new object generation is going to occur mostly on the client, so why not have these things available. Even better why not have them compiled in the player?? (come on, it'd be less than 1k)


Thanks again
Sean

On Jul 13, 2005, at 6:14 PM, Andrew Spaulding wrote:

Hey Sean,

Check out ASCrypt at http://www.meychi.com/archive/000031.php

It has the following classes: Base8, Base64, Goauld, LZW, GUID, RC4,
MD5, SHA1, ROT13, Rijndael and TEA.

I have used the GUID class at it creates exactly what you are after.
Also it is all written in Actionscript 2.0

cheers,

Andrew Spaulding
www.flexdaddy.info



--- In [email protected], Sean McKibben <[EMAIL PROTECTED]> wrote:
> Is anyone aware of a guid generation system for flex/flash? I'm 
> building a system which does quite a bit on the client before a trip 
> to the server, and it needs to make some references amongst objects 
> that the server can understand, so a real guid generator would be the 
> best way to do that.
>
> I know I could probably use math.random() to generate a random number 
> and try to use that as a guid, but this is an enterprise app here, 
> and there are rules for guids which we'd need to conform to.
>
> Ideally, the the UUID version 5, using SHA-1 would be my preference. 
> Anything at least pretty robust which could come up with the format, 
> "{3F2504E0-4F89-11D3-9A0C-0305E82C3301}" would be useful.
>
> Anyone else come across a solution for this?
>
> Thanks,
> Sean




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to