Update the digest hashes for this bundle
15635
def update_digest

    path = self.bundle_dir
    sha = Digest::SHA2.new
    bundle_sha = Digest::SHA2.new

    digests = []
    Dir.glob("#{path}/**/*").sort.each do |f|
      next if File.directory?(f) || File.basename(f) == "digest" || f =~ /^#{path}\/test/
      bundle_sha.file(f)
      sha.reset()
      digests << { :file => f.gsub(/#{path}\//, ''), :digest => sha.file(f).hexdigest() }
    end

    @digest = { :digest => bundle_sha.hexdigest(), :files => digests }
    File.open(path+"/digest", 'w'){ |f|
      f.write(MultiJson.dump(@digest, :pretty => true, :adapter => :json_gem) + "\n")
    }

  end
1230727
def update(self):
        
        res = True  # An update was successful
        if self.source:
            _keys = self._keys  # just in case

            # reread everything
            self._keys = []

            try:
                if self.remote is False:
                    if self.fileformat in ["jwks", "jwk"]:
                        self.do_local_jwk(self.source)
                    elif self.fileformat == "der":
                        self.do_local_der(self.source, self.keytype,
                                          self.keyusage)
                else:
                    res = self.do_remote()
            except Exception as err:
                logger.error('Key bundle update failed: {}'.format(err))
                self._keys = _keys  # restore
                return False

            now = time.time()
            for _key in _keys:
                if _key not in self._keys:
                    if not _key.inactive_since:  # If already marked don't mess
                        _key.inactive_since = now
                    self._keys.append(_key)

        return res
1355437
public function updateBundlesSchema()
    {
        foreach ($this->_application->getBundles() as $bundle) {
            $this->updateBundleSchema($bundle->getId());
        }
    }
1099334
def digester(data):
    """"""
    if not isinstance(data, six.binary_type):
        data = data.encode('utf_8')
    hashof = hashlib.sha1(data).digest()
    encoded_hash = base64.b64encode(hashof)
    if not isinstance(encoded_hash, six.string_types):
        encoded_hash = encoded_hash.decode('utf_8')
    chunked = splitter(encoded_hash, chunksize=60)
    lines = '\n'.join(chunked)
    return lines
309308
def whitelist_redact_hash redact_hash
  	    digest_hash = {}
  	    
  	  	redact_hash.each do |key,how|
  	  	  if (how.to_sym == :digest)
  	  	    digest_hash[digest_key(key)] = :keep
  	  	  end
  	  	end
  	  	
  	  	digest_hash.merge redact_hash
	  end
979528
def get_digest(filename):
    """"""
    h = hashlib.md5()
    with open(filename, 'rb') as f:
        data = f.read(1 * MB)
        while data:
            h.update(data)
            data = f.read(1 * MB)
        return h.hexdigest()
445450
def update
      @trackers.each_value {|tracker| tracker.update}
      results = all
      (results.each {|r| yield r}) if block_given?
      results
    end
760335
def update(self, data, length=None):
        
        if self.digest_finalized:
            raise DigestError("No updates allowed")
        if not isinstance(data, bintype):
            raise TypeError("A byte string is expected")
        if length is None:
            length = len(data)
        elif length > len(data):
            raise ValueError("Specified length is greater than length of data")
        result = libcrypto.EVP_DigestUpdate(self.ctx, c_char_p(data), length)
        if result != 1:
            raise DigestError("Unable to update digest")
1169913
def hash_block
      hash_string = [index,timestamp,data,prev_hash].join
      sha = Digest::SHA256.new
      sha.update(hash_string)
      sha.hexdigest
    end
193137
def hydrate_bundles(bundles_field, glob_match_error_behavior):
  """"""
  path_globs_with_match_errors = [
    pg.copy(glob_match_error_behavior=glob_match_error_behavior)
    for pg in bundles_field.path_globs_list
  ]
  snapshot_list = yield [Get(Snapshot, PathGlobs, pg) for pg in path_globs_with_match_errors]

  spec_path = bundles_field.address.spec_path

  bundles = []
  zipped = zip(bundles_field.bundles,
               bundles_field.filespecs_list,
               snapshot_list)
  for bundle, filespecs, snapshot in zipped:
    rel_spec_path = getattr(bundle, 'rel_path', spec_path)
    kwargs = bundle.kwargs()
    # NB: We `include_dirs=True` because bundle filesets frequently specify directories in order
    # to trigger a (deprecated) default inclusion of their recursive contents. See the related
    # deprecation in `pants.backend.jvm.tasks.bundle_create`.
    kwargs['fileset'] = _eager_fileset_with_spec(rel_spec_path,
                                                 filespecs,
                                                 snapshot,
                                                 include_dirs=True)
    bundles.append(BundleAdaptor(**kwargs))
  yield HydratedField('bundles', bundles)
943989
function() {
      ss.http.cached.loadStatic();
      ss.http.cached.loadAssets();
      ss.bundler.updateCachedOndemandAssets();

      ss.bundler.forEach(function(bundler) {
        bundler.updateCachedDevAssets();
      });
    }
234507
def hash(self):
        """"""
        if 'digest' not in self._p4dict:
            self._p4dict = self._connection.run(['fstat', '-m', '1', '-Ol', self.depotFile])[0]

        return self._p4dict['digest']
468513
@Override
    public void updateDigest(MessageDigest digest)
    {
        updateWithName(digest);

        // We don't take the deltas into account in a digest
        contextManager.updateDigest(digest, value());

        FBUtilities.updateWithLong(digest, timestamp());
        FBUtilities.updateWithByte(digest, serializationFlags());
        FBUtilities.updateWithLong(digest, timestampOfLastDelete());
    }
916050
def update(self, buf):
        """"""
        if self._updatable:
            return libssdeep_wrapper.fuzzy_update(self._state, buf)
        else:
            raise InvalidOperation("Cannot update sdeep created from hash")
752614
def update(hash = {})
      hash.each do |k,v|
        # The name of the setter for the value of k
        setter = "#{k}="

        # Check if there is a matching setter
        if self.respond_to?(setter)
          # Yes, there is. Call the setter with the value
          self.send(setter, v)
        end
      end

      self
    end
1107261
def update(other_hash)
      other_hash.each_pair { |key, value| regular_writer(convert_key(key), convert_value(value)) }
      self
    end
311403
def save_digest(header)
      @request_count = 0

      @digest = {}
      header.split(",").each do |line|
        k, v = line.strip.split("=", 2)
        @digest[k] = (k != "algorithm" and k != "stale") && v[1..-2] || v
      end

      @digest_type = @digest["qop"] ? @digest["qop"].split(",") : []
    end