def check_against_chunks(self, chunks):<EOL>
gots = {}<EOL>for hash_name in iterkeys(self._allowed):<EOL><INDENT>try:<EOL><INDENT>gots[hash_name] = hashlib.new(hash_name)<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>raise InstallationError('<STR_LIT>' % hash_name)<EOL><DEDENT><DEDENT>for chunk in chunks:<EOL><INDENT>for hash in itervalues(gots):<EOL><INDENT>hash.update(chunk)<EOL><DEDENT><DEDENT>for hash_name, got in iteritems(gots):<EOL><INDENT>if got.hexdigest() in self._allowed[hash_name]:<EOL><INDENT>return<EOL><DEDENT><DEDENT>self._raise(gots)<EOL>
Check good hashes against ones built from iterable of chunks of
        data.

        Raise HashMismatch if none match.