Cache2 File Name Hash

Hi everyone,

I am new to this forum, and I hope this is an appropriate area to post this question.

I’m studying the cache2 functionality to help write a security tool as a hobby and learning project. Unfortunately, I am struggling to understand the cache file naming functionality. All available sources online suggest the file name is simply the entire website URL hashed using an SHA-1 hexadecimal digest. However, I cannot verify if this is still the method used as most online sources are antiquated. At the same time, my attempts at recreating file names yield different results than what tools like MZCacheView are displaying.

Using the SHA-1 Hex Digest function in Python returns different results than MZCacheView



I’m currently trying to identify the problem (e.g. wrong hashing algorithm, misusing MZCacheView, etc.) Any help would be deeply appreciated! Thanks!