[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: CRC32 module?
- From: PA <petite.abeille@...>
- Date: Mon, 7 Feb 2005 12:06:24 +0100
On Feb 07, 2005, at 11:56, Luiz Henrique de Figueiredo wrote:
Do you really need CRC32?
Yes.
Doesn't MD5 or SHA1 work for you?
Yes. But for different purposes.
For example, lets assume I want to build an URL pointing to some data
of some sort. The data are uniquely identified by a time based UUID:
98ab2edf-ef9c-42e3-a4cc-739442ce2186
A md5 of an uuid is still quite long and obscure:
cfcd208495d565ef66e7dff9f98764da
So... what I would like to do instead is to build an URL which reflects
the UUID time, plus a short hash to identity the data in that time
frame:
/2005/02/07/12345
Therefore the need for some predictable hashing of some sort. CRC32
comes to mind. But any sort of hashing would do. Doesn't Lua itself
have some kind of hashing function for strings?
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/