In python, how does one split a SHA256 hash into a 32bit prefixes? I'm working with Google's safebrowsing api, which requires that I compare 32bit prefixes between my own collection, and the collection the API sends to me. I understand how to pull the list from Google, and I understand how to form a collection of hashes from parsed URLs, however, I don't understand how I am to derive the first 32bits of each hash.
And after obtaining the prefix, would the best course of action between to place them in a dictionary with corresponding key/value pairs being the prefix/full hash, so that I can reference them later?