{"action":"opened","issue":{"url":"https://api.github.com/repos/bumptech/glide/issues/2914","repository_url":"https://api.github.com/repos/bumptech/glide","labels_url":"https://api.github.com/repos/bumptech/glide/issues/2914/labels{/name}","comments_url":"https://api.github.com/repos/bumptech/glide/issues/2914/comments","events_url":"https://api.github.com/repos/bumptech/glide/issues/2914/events","html_url":"https://github.com/bumptech/glide/issues/2914","id":299470476,"number":2914,"title":"Can I decode the single string key used as the file name in the image_manager_disk_cache folder of an android app?","user":{"login":"xfy741","id":36434513,"avatar_url":"https://avatars0.githubusercontent.com/u/36434513?v=4","gravatar_id":"","url":"https://api.github.com/users/xfy741","html_url":"https://github.com/xfy741","followers_url":"https://api.github.com/users/xfy741/followers","following_url":"https://api.github.com/users/xfy741/following{/other_user}","gists_url":"https://api.github.com/users/xfy741/gists{/gist_id}","starred_url":"https://api.github.com/users/xfy741/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfy741/subscriptions","organizations_url":"https://api.github.com/users/xfy741/orgs","repos_url":"https://api.github.com/users/xfy741/repos","events_url":"https://api.github.com/users/xfy741/events{/privacy}","received_events_url":"https://api.github.com/users/xfy741/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T19:04:59Z","updated_at":"2018-02-22T19:04:59Z","closed_at":null,"author_association":"NONE","body":"I have read lot of post and information trying to figure out how a filename key is generated on the disk cache and if there is a way to decode it but I haven't found an answer.\r\n\r\nThere is an android app (grindr) that is now using glide to manage its image gallery. In the data/data/com.grindrapp.android/cache/image_manager_disk_cache are stored the images the app retrieve from their server and they are store with a 65 characters (letters and numbers) and the extension .0, they're jpg files and I can visualize them if a I change the extension from .0 to jpg.\r\n\r\nFor example If I upload a file named \"test.jpg\". The file is uploaded and they put a hash name to it on the server.\r\n\r\nThis is URL of the uploaded file.\r\nhttp://cdns.grindr.com/grindr/chat/d4fd5146af013031d4e3b6728bdc446b7bdac212\r\n\r\nIf I send or receive a picture in the app messages they appear as images but if i look on the database this event appears like this: \r\n\r\n{\"imageHash\":\"d4fd5146af013031d4e3b6728bdc446b7bdac212\",\"imageType\":0,\"tapType\":0}\r\n\r\n\"imagehash\" is the same key used in the server without the URL prefix and has 40 characters.\r\n\r\nBut this same picture appears on the image_manager_disk_cache folder as a  key of 65 characters and the extension .0:\r\n\r\ndf8552a09dc05009e07b274d122cb30aebf97aaee9a70b7e2693b6cc8766fc4a.0\r\n\r\nI read that all of these keys are hashed in a particular order to create a unique and safe File name to save a particular image on disk. To generate the name of disk cache keys on disk, the individual elements of the keys are hashed to create a single String key, which is then used as the file name in the disk cache.\r\n\r\nSo my question is: Is it possible to decode that single string key to find individual elements that has been hashed? Is there a way to get some info from that keystring? is that key string equal as the event shown on the chat database table: \r\n\r\n{\"imageHash\":\"d4fd5146af013031d4e3b6728bdc446b7bdac212\",\"imageType\":0,\"tapType\":0}\r\n\r\nI hope you can help me to understand this.\r\n"}}
{"actor":{"display_login":"xfy741"}}