As with any hashing algorithm, you need to deal with collisions. The chances
of having two URIs with the same MD5 are slim, but definitely nonzero. Apply
the pigeonhole principle.
MD5 is pretty commonly used for this kind of thing, but in my opinion it
shouldn't be unless you're prepared to deal with collisions. It seems like
there's nothing wrong with your plan of translating to FFCs, except that the
names will be long - but who cares?
[EMAIL PROTECTED] (Trevor Phillips) wrote:
>I'm writing a module, where I want to store info on a per URI basis. For
>reasons I won't go into here, I'm storing info in a file per URI. At the
>moment, I'm tweaking the URI into Filesystem friendly characters, and calling
>the file that.
>
>Another alternative is to get the MD5 base64 key to the URI. My query is, what
>is the chance of two URI's giving the same MD5? Is there any risk in it, or is
>MD5 guranteed to give unique ID's? (I know the risk would be SLIM, but how
>slim?) Is MD5 used regularly for this kind of thing?
>
>(MD5 newbie...)
>
>--
>.. Trevor Phillips - http://jurai.murdoch.edu.au/ .
>: CWIS Technical Officer - [EMAIL PROTECTED] :
>| IT Services - Murdoch University |
> >------------------- Member of the #SAS# & #CFC# --------------------<
>| On nights such as this, evil deeds are done. And good deeds, of /
>| course. But mostly evil, on the whole. /
> \ -- (Terry Pratchett, Wyrd Sisters) /
>
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum