':param possible_hash: A string that may be a hash.
:return: The hash type if the string seems to be a md5 / sha1 hash.
None otherwise.'

def _get_hash_type(self, possible_hash):

    hash_type_len = {'MD5': 32, 'SHA1': 40, 'SHA224': 56, 'SHA256': 64, 'SHA384': 96, 'SHA512': 128}
    for (hash_type, hash_len) in hash_type_len.items():
        if (len(possible_hash) == hash_len):
            return hash_type
    return None
