iPhone: fast hash function for storing web images (url) as files (hashed filenames)
- by Stefan Klumpp
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).