Generates SHA1/2 hashes for a given input.