Provide access to the complete hash string.

        The hash string may have zero or more hash values with
        appropriate prefixes. All hash values are assumed to be
        strings
557444
def hash(self):
        
        hashvals = []
        if (self.md5 is not None):
            hashvals.append('md5:' + self.md5)
        if (self.sha1 is not None):
            hashvals.append('sha-1:' + self.sha1)
        if (self.sha256 is not None):
            hashvals.append('sha-256:' + self.sha256)
        if (len(hashvals) > 0):
            return(' '.join(hashvals))
        return(None)
629083
private void expandAndRehash() {
    final int[] newHashSet = new int[hashSet.length * 2];
    final int bucketMask = (newHashSet.length - 1);

    for (int j = 0; j < hashSet.length; j++) {
      final int state = hashSet[j];
      if (state > 0) {
        int slot = hash(state, stateLength(state)) & bucketMask;
        for (int i = 0; newHashSet[slot] > 0;) {
          slot = (slot + (++i)) & bucketMask;
        }
        newHashSet[slot] = state;
      }
    }
    this.hashSet = newHashSet;
  }
781395
function hashThisString(string) {
    var hash = 0;
    if (string.length === 0) { return hash; }
    for (var i = 0; i < string.length; i++) {
      var char = string.charCodeAt(i);
      hash = ((hash << 5) - hash) + char;
      hash = hash & hash; // Convert to 32bit integer
    }
    return hash;
  }
870995
private String determineHashes(HashingFunction hashFunction) {
        if (isVirtual) {
            return null;
        }
        try {
            final File file = getActualFile();
            return hashFunction.hash(file);
        } catch (IOException | RuntimeException ex) {
            LOGGER.warn("Unable to read '{}' to determine hashes.", actualFilePath);
            LOGGER.debug("", ex);
        } catch (NoSuchAlgorithmException ex) {
            LOGGER.warn("Unable to use MD5 or SHA1 checksums.");
            LOGGER.debug("", ex);
        }
        return null;
    }
460177
private int hashCodeImpl() {
		int result = 0;
		for (Map.Entry<String, Object> e : memberValues.entrySet()) {
			result += (127 * e.getKey().hashCode())
					^ memberValueHashCode(e.getValue());
		}
		return result;
	}
677951
def dashify_string_hash(string_hash)
      output = Hash.new
      string_hash.each do |key, value|
        dashed = key.to_s.gsub("_", "-").to_sym
        output[dashed] = value
      end
      output
    end
132274
def to_h
      h = {}
      to_hash(@root_node).each do |k, v|
        key = k.terminate(false).to_string
        h[key] = v
      end
      h
    end
1169550
static long hash(String... theValues) {
		Hasher hasher = HASH_FUNCTION.newHasher();

		for (String next : theValues) {
			if (next == null) {
				hasher.putByte((byte) 0);
			} else {
				next = UrlUtil.escapeUrlParam(next);
				byte[] bytes = next.getBytes(Charsets.UTF_8);
				hasher.putBytes(bytes);
			}
			hasher.putBytes(DELIMITER_BYTES);
		}

		HashCode hashCode = hasher.hash();
		return hashCode.asLong();
	}
929930
@SuppressWarnings("unused")
    void finish(String hash) {
        TokenInfo info = new TokenInfo();
        String error = null;
        String errorDesc = "";
        String errorUri = "";

        // Iterate over keys and values in the string hash value to find relevant
        // information like the access token or an error message. The string will be
        // in the form of: #key1=val1&key2=val2&key3=val3 (etc.)
        int idx = 1;
        while (idx < hash.length() - 1) {
            // Grab the next key (between start and '=')
            int nextEq = hash.indexOf('=', idx);
            if (nextEq < 0) {
                break;
            }
            String key = hash.substring(idx, nextEq);

            // Grab the next value (between '=' and '&')
            int nextAmp = hash.indexOf('&', nextEq);
            nextAmp = nextAmp < 0 ? hash.length() : nextAmp;
            String val = hash.substring(nextEq + 1, nextAmp);

            // Start looking from here from now on.
            idx = nextAmp + 1;

            // Store relevant values to be used later.
            if (key.equals("access_token")) {
                info.setAccessToken(val);
            } else if (key.equals("token_type")) {
                info.setTokenType(val);
            } else if (key.equals("expires_in")) {
                // expires_in is seconds, convert to milliseconds and add to now
                Double expiresIn = Double.valueOf(val) * 1000;
                info.setExpires(String.valueOf(clock.now() + expiresIn));
            } else if (key.equals("error")) {
                error = val;
            } else if (key.equals("error_description")) {
                errorDesc = " (" + val + ")";
            } else if (key.equals("error_uri")) {
                errorUri = "; see: " + val;
            }
        }

        if (error != null) {
            lastCallback.onFailure(
                    new RuntimeException("Error from provider: " + error + errorDesc + errorUri));
        } else if (info.getAccessToken() == null) {
            lastCallback.onFailure(new RuntimeException("Could not find access_token in hash " + hash));
        } else {
            setToken(lastRequest, info);
            lastCallback.onSuccess(info);
        }
    }
997160
def parse(string)
      return nil unless string.is_a?(String)

      uri = Addressable::URI.parse(string)

      scheme = uri.scheme
      return nil unless scheme

      self.secure = true if scheme.match(/ss\Z/m)

      host = uri.host
      host = '/' unless host && host != ''
      self.host = host
      self.port = uri.port.to_s if uri.port

      request_uri = uri.path
      request_uri = '/' unless request_uri && request_uri != ''
      request_uri += "?" + uri.query if uri.query
      self.resource_name = request_uri

      return self
    end
894508
def strip_hashes(s)
		s = s[num_leading_hashes(s), s.size]
		i = s.size-1
		while i > 0 && (s[i,1] =~ /(#|\s)/); i-=1; end
		s[0, i+1].strip
	end
386582
def extract(hash, *args)
      begin
        tmp = hash
        args.each do |arg|
          tmp = tmp[arg]
        end
        tmp
      rescue
        nil
      end
    end
291708
def query_params_from_hash(value, prefix = nil)
      case value
      when Array
        value.map { |v| query_params_from_hash(v, "#{prefix}%5B%5D") }.join("&")
      when Hash
        value.map { |k, v|
          query_params_from_hash(v, prefix ? "#{prefix}%5B#{Rack::Utils.escape_path(k)}%5D" : Rack::Utils.escape_path(k))
        }.join("&")
      when NilClass
        prefix
      else
        raise ArgumentError, "value must be a Hash" if prefix.nil?
        "#{prefix}=#{Rack::Utils.escape_path(value)}"
      end
    end
79864
def get_hash(self, handle):
        
        handle = os.path.expanduser(os.path.expandvars(handle))
        with open(self._prefixed('%s.hash' % handle)) as f:
            return f.read()
250192
def get_shared_string(value)
      return '' if value == ''

      string = root_object.shared_strings_table.string_indexes[value.to_i]
      @character = string.run
      @raw_text = string.text
    end
416823
def update_hash_from_str(hsh, str_input):
    
    byte_input = str(str_input).encode("UTF-8")
    hsh.update(byte_input)
784135
def sha1_hash(string):
    '''
    
    '''

    hasher = sha1()
    hasher.update(string.encode())
    return hasher.hexdigest()