iPhone: fast hash function for storing web images (url) as files (hashed filenames)
Posted
by Stefan Klumpp
on Stack Overflow
See other posts from Stack Overflow
or by Stefan Klumpp
Published on 2010-05-29T11:59:28Z
Indexed on
2010/05/29
12:02 UTC
Read the original article
Hit count: 334
What is a fast hash function available for the iPhone to hash web urls (images)?
I'd like to store the cached web image as a file with a hash as the filename, because I suppose the raw web url could contain strange characters that could cause problems on the file system.
The hash function doesn't need to be cryptographic, but it definitely needs to be fast.
Example:
Input: http://www.calumetphoto.com/files/iccprofiles/icc-test-image.jpg
Output: 3573ed9c4d3a5b093355b2d8a1468509
This was done by using MD5(), but since I don't know much about that topic I don't know if it is overkill (-> slow).
© Stack Overflow or respective owner