Did I find the right examples for you? yes no

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)
Return True if the hashes are equal up to the length of the
shorter, assuming the shorter isn't too short.

        def hash_equal(hash1, hash2):
    """
    Return True if the hashes are equal up to the length of the
    shorter, assuming the shorter isn't too short.
    """
    assert isinstance(hash1, buffer), "Hash values must be buffers"
    assert isinstance(hash2, buffer), "Hash values must be buffers"
    
    h1len = len(hash1)
    h2len = len(hash2)

    minlen = min(h1len, h2len)
    assert minlen >= 12
    return hash1[0:minlen] == hash2[0:minlen]
        


src/g/r/GridBackup-HEAD/grid_backup/backup_series.py   GridBackup(Download)
                elif entry.path.exists():
                    cur_hash = d_mgr.hash(entry.path)
                    if util.hash_equal(cur_hash, hash_val):
                        # The file is still around, add it to the job queue
                        jobs.add_entry(entry.path, entry.path.meta)

src/g/r/GridBackup-HEAD/grid_backup/upload_manager.py   GridBackup(Download)
        self._log.log(1, "Checking hash of %s", job.path)
        current_hash = self._diff_mgr.hash(tmp_path, cache_sig = True)
        if not util.hash_equal(current_hash, job.hash_val):
            # File has changed.  Uncache the signature because we're not
            # going to upload the file.

src/g/r/GridBackup-HEAD/grid_backup/diff_manager.py   GridBackup(Download)
        """
        if (not old_hash or
            util.hash_equal(new_hash, old_hash)):
            # No hash of the old file, therefore no signature, or else the
            # hash hasn't changed.

src/a/s/asv-HEAD/asv/commands/profile.py   asv(Download)
from ..repo import get_repo
from ..results import iter_results_for_machine
from ..util import hash_equal, iter_subclasses
 
 
            for result in iter_results_for_machine(
                    conf.results_dir, machine_name):
                if hash_equal(commit_hash, result.commit_hash):
                    if result.has_profile(benchmark):
                        if (environment is None or

src/a/s/asv-HEAD/asv/commands/rm.py   asv(Download)
from ..console import log
from ..results import iter_results
from ..util import hash_equal
 
 
            for key, val in six.iteritems(global_patterns):
                if key == 'commit_hash':
                    if not hash_equal(result.commit_hash, val):
                        found = False
                        break