views:

261

answers:

1

I've been looking at Safari 4's Webpage Previews (~/Library/Caches/com.apple.Safari/Webpage Previews/), the image names appear to use a 128 bit hash, but which hash function are Apple using?

I found this page, Web Based MD5 / SHA1 / SHA-256 / SHA-384 / SHA-512 Cryptographic Hash Calculator Function, but, comparing some Webpage Preview image names with the hash results for the same URLs gives no positive results.

A: 

Something tells me that they do not use hash code. Names are just plain generated GUIDs. To match page with preview they use sqlite3 database, you can find it by name WebpageIcons.db.

EDIT: unfortunatelly WebpageIcons.db is not for previews...

Mike Chaliy
I don't know much about GUIDs, but from what I read on the Wiki page, it says that they are based on the users network card MAC address or the time of generating the GUID.Using a Guest account, I checked the file names generated for www.yahoo.com (and also www.zune.com), then reset Safari's cache and relaunched, it had the same file name. So I left that account and restarted it, same result, same names. Revisiting both sites in my regular account yields the same result too.
neeklamy
yep, seems so, ignore my comment then
Mike Chaliy
So I feel silly. Went back to the hash calculator webpage, armed with a couple of URLs and lo, they are MD5 hash's. http : // www. apple .com/ (without the spaces of course!) is f61b95cc3da5eba49338fca5a4bcb866 Thanks though, your help is appreciated!
neeklamy