Extract the hash object from the hash string
@protected
@param {String} hashString
@return {Object} hashObject
178922
function (hashString) {
            var pairs = hashString, hashObject = {}, currentPair, currentPairString;
            pairs = (pairs) ? pairs.split(this._separatorRegExp) : [];
            for (var i = 0, size = pairs.length; size > i; i++) {
                currentPairString = pairs[i];
                currentPair = decodeURIComponent(currentPairString).split("=");
                if (currentPair.length == 2) {
                    hashObject[currentPair[0]] = currentPair[1];
                } else {
                    if (currentPairString.indexOf("=") == currentPairString.length) {
                        hashObject[currentPair[0]] = "";
                    } else {
                        hashObject["param" + i] = currentPair[0];
                    }
                }
            }
            return hashObject;
        }
690153
def make_hash(str)

      str = str.split('&')
      hash = {}

      str.each do |s|
        opt = s.split('=')
        hash[opt[0]] = URI.unescape(opt[1].to_s.gsub('+', ' '))
      end

      hash

    end
1094924
public static String hashToString(byte[] hash) {
        StringBuilder buf = new StringBuilder();
        for (byte b : hash) {
            buf.append(HEX_CHARS[(b >> 4) & 0xF]);
            buf.append(HEX_CHARS[b & 0xF]);
        }
        return buf.toString();
    }
1138125
function hash (str) {
  return crypto
    .createHash('sha1')
    .update(str, 'ascii')
    .digest('base64')
    .replace(PLUS_GLOBAL_REGEXP, '-')
    .replace(SLASH_GLOBAL_REGEXP, '_')
    .replace(EQUAL_GLOBAL_REGEXP, '')
}
330404
function hashGet(key) {
	  var data = this.__data__;
	  if (nativeCreate) {
	    var result = data[key];
	    return result === HASH_UNDEFINED ? undefined : result;
	  }
	  return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
	}
944085
public static String getHashFromString(String str) {
        try {
            java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-256");
            byte[] array = md.digest(str.getBytes("UTF-8"));
            StringBuilder sb = new StringBuilder();
            for (byte anArray : array) {
                sb.append(Integer.toHexString((anArray & 0xFF) | 0x100).substring(1, 3));
            }
            return sb.toString();
        } catch (java.security.NoSuchAlgorithmException | UnsupportedEncodingException e) {
            throw new IllegalArgumentException("Cannot calculate SHA-256 hash for :" + str, e);
        }
    }
254479
function hash_string_to_words(string) {
	var sha = new SHA224();
	sha.write(string);
	var view = new DataView(sha.digest().buffer);
	var digest = new Uint32Array(7);
	for (var i = 0; i < 7; ++i) {
		digest[i] = view.getUint32(i * 4);
	}
	return digest;
}
233992
function hash(method) {
  // Is user supplies a function, use it and assume they will take of any
  // encoding (Base-64 or otherwise).
  if (typeof method === 'function') {
    return method;
  }

  if (hashFunctions.hasOwnProperty(method)) {
    return hashFunctions[method];
  }

  throw new Error(`Could not resolve hash function, received ${typeof method}.`);
}
143334
public static int[] createHashes(String str, int hashNumber) {
		int[] result = new int[hashNumber];
		for(int i = 0; i < hashNumber; i++) {
			result[i] = hash(str, i);
			
		}
		return result;
	}
246888
public static function hash($string)
    {
        static $valid_hash = null;
        if ($valid_hash === null) {
            $valid_hash = function_exists('hash') && (in_array('sha256', hash_algos()));
        }

        /**
         * Fallback hash('sha256', [(string) string]);
         */
        if ($valid_hash) {
            return hash('sha256', $string);
        }

        if (is_array($string) || is_object($string)) {
            $type   = gettype($string);
            $caller =  next(debug_backtrace());
            $error['line']  = $caller['line'];
            $error['file']  = strip_tags($caller['file']);
            trigger_error(
                "sha1() expects parameter 1 to be string, "
                . $type
                . " given in <b>{$error['file']}</b> on line <b>{$error['line']}</b><br />\n",
                E_USER_ERROR
            );

            return null;
        }

        // convert into string
        $string = "{$string}";
        /**
         * Instance Application
         * @var object
         */
        $instance = self::getInstance();
        $key = md5($string);
        if (isset($instance->x_sha256_record[$key])) {
            return $instance->x_sha256_record[$key];
        }

        /**
         * SHA-256 Constants
         * sequence of 64 constant 32-bit words representing the first thirty-two bits
         * of the fractional parts of the cube roots of the first 64 prime numbers.
         * @var  array
         */
        $keyState64 = array(
                   0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
                   0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
                   0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
                   0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
                   0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
                   0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
                   0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
                   0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
                   0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
                   0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
                   0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
                   0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
                   0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
                   0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
                   0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
                   0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2);
        /**
         * [$state8 description]
         * @var array
         */
        $state8 = array(
            0x6a09e667,
            0xbb67ae85,
            0x3c6ef372,
            0xa54ff53a,
            0x510e527f,
            0x9b05688c,
            0x1f83d9ab,
            0x5be0cd19
        );
        /**
         *  Parsing the Padded Message (Break into N 512-bit blocks)
         * @var array
         */
        $string_split = str_split(
            $instance->charPad($string), // Pre-processing: Padding the string
            64
        );

        // loop through message blocks and compute hash. ( For i=1 to N : )
        for ($i = 0; $i < count($string_split); $i++) {
            // Break input block into 16 32-bit words (message schedule prep)
            $MI = parent::byte2intSplit($string_split[$i]);
            // Initialize working variables
            $a = $state8[0];
            $b = $state8[1];
            $c = $state8[2];
            $d = $state8[3];
            $e = $state8[4];
            $f = $state8[5];
            $g = $state8[6];
            $h = $state8[7];
            $W = array();
            // Compute the hash and update
            for ($t = 0; $t < 16; $t++) {
                // Prepare the first 16 message schedule values as we loop
                $W[$t] = $MI[$t];
                $t1 = ($e & $f) ^ ((~$e) & $g); //$instance->Ch($e, $f, $g);
                $t1 = $instance->add(
                    $instance->add(
                        $h,
                        ($instance->rotr($e, 6)^$instance->rotr($e, 11)^$instance->rotr($e, 25)) //$instance->Sigma1($e)
                    ),
                    $t1
                );
                // Compute hash
                $t1 = $instance->add(
                    $instance->add(
                        $t1,
                        $keyState64[$t]
                    ),
                    $W[$t]
                );
                $t2 = $instance->add(
                    ($instance->rotr($a, 2)^$instance->rotr($a, 13)^$instance->rotr($a, 22)), //$instance->Sigma0($a),
                    (($a & $b) ^ ($a & $c) ^ ($b & $c)) //$instance->Maj($a, $b, $c)
                );

                // Update working variables
                $h = $g;
                $g = $f;
                $f = $e;
                $e = $instance->add($d, $t1);
                $d = $c;
                $c = $b;
                $b = $a;
                $a = $instance->add($t1, $t2);
            }

            for (; $t < 64; $t++) {
                // Continue building the message schedule as we loop
                $s0 = $W[($t+1)&0x0F];
                $s0 =($instance->rotr($s0, 7)^$instance->rotr($s0, 18)^parent::zeroFill($s0, 3));
                $s1 = $W[($t+14)&0x0F];
                $s1 = $instance->rotr($s1, 17)^$instance->rotr($s1, 19)^parent::zeroFill($s1, 10);
                $W[$t&0xF] = $instance->add($W[$t&0xF], $s0);
                $W[$t&0xF] = $instance->add($W[$t&0xF], $s1);
                $W[$t&0xF] = $instance->add($W[$t&0xF], $W[($t+9)&0x0F]);

                // Compute hash
                $t1 = $instance->add($h, ($instance->rotr($e, 6)^$instance->rotr($e, 11)^$instance->rotr($e, 25)));
                $t1 = $instance->add($t1, (($e & $f) ^ ((~$e) & $g)));
                $t1 = $instance->add($t1, $keyState64[$t]);
                $t1 = $instance->add($t1, $W[$t&0xF]);
                $t2 = $instance->add(
                    ($instance->rotr($a, 2)^$instance->rotr($a, 13)^$instance->rotr($a, 22)),
                    ($a & $b) ^ ($a & $c) ^ ($b & $c)
                );

                // Update working variables
                $h = $g;
                $g = $f;
                $f = $e;
                $e = $instance->add($d, $t1);
                $d = $c;
                $c = $b;
                $b = $a;
                $a = $instance->add($t1, $t2);
            }

            $state8[0] = $instance->add($state8[0], $a);
            $state8[1] = $instance->add($state8[1], $b);
            $state8[2] = $instance->add($state8[2], $c);
            $state8[3] = $instance->add($state8[3], $d);
            $state8[4] = $instance->add($state8[4], $e);
            $state8[5] = $instance->add($state8[5], $f);
            $state8[6] = $instance->add($state8[6], $g);
            $state8[7] = $instance->add($state8[7], $h);
        }
        // Convert the 32-bit words into human readable hexadecimal format.
        $instance->x_sha256_record[$key] = sprintf(
            "%08x%08x%08x%08x%08x%08x%08x%08x",
            $state8[0],
            $state8[1],
            $state8[2],
            $state8[3],
            $state8[4],
            $state8[5],
            $state8[6],
            $state8[7]
        );
        $ret_val = $instance->x_sha256_record[$key];
        unset(
            $string,
            $W,
            $instance,
            $binStr,
            $keyState64,
            $string_split,
            $state8,
            $MI,
            $s0,
            $s1,
            $t1,
            $t2
        );
        return $ret_val;
    }
902777
private int rollHash(int hashvalue, String str, int i) {
    // 'roll' hash
    char outchar = str.charAt(str.length() - 1 - i);
    char inchar = str.charAt(str.length() - _block - 1 - i);
    hashvalue = A * hashvalue + CHAR_HASHES[inchar] - _Apowblock * CHAR_HASHES[outchar];
    return hashvalue;
  }
1033376
public static byte[] stringToHash(String s) {
        if (s.length() % 2 != 0) {
            throw new IllegalArgumentException("Invalid hash string: " + s);
        }
        byte[] hash = new byte[s.length() / 2];
        for (int i = 0; i < s.length(); i += 2) {
            byte b = (byte) ((hexDigitValue(s.charAt(i)) << 4) + hexDigitValue(s.charAt(i + 1)));
            hash[i / 2] = b;
        }
        return hash;
    }
843242
def str_to_hash
        client = RestClient.where(:api_key => @http_headers[@@header_api_key]).first
        if client.nil?
          @errors << "client is not registered"
        end
        client.nil? ? "" : client.secret + @request_uri.gsub( /\?.*/, "" ) + @http_headers[@@header_timestamp]
      end
488932
function hash(str, algo, encoding) {
  return crypto
    .createHash(algo || 'sha1')
    .update(str)
    .digest(encoding || 'hex');
}
190708
function (text /*:String*/) /*:Object*/ {
        
        var hashParts /*:Array*/ = text.split("&"),
            hashPart /*:Array*/ = null,
            hash /*:Object*/ = {};
        
        if (text.length > 0){
            for (var i=0, len=hashParts.length; i < len; i++){
                hashPart = hashParts[i].split("=");
                hash[decodeURIComponent(hashPart[0])] = decodeURIComponent(hashPart[1]);
            }
        }
        
        return hash;
    }
444402
def hash_from_file_content(string)
      hash = {}
      string.split("\n").each do |line|
        uncommented_line = strip_comment(line)
        if include = extract_include(uncommented_line)
          @includes.push normalized_xcconfig_path(include)
        else
          key, value = extract_key_value(uncommented_line)
          next unless key
          value.gsub!(INHERITED_REGEXP) { |m| hash.fetch(key, m) }
          hash[key] = value
        end
      end
      hash
    end
437315
function hash_serializer(result, key, value) {
  var matches = key.match(brackets);

  // Has brackets? Use the recursive assignment function to walk the keys,
  // construct any missing objects in the result tree and make the assignment
  // at the end of the chain.
  if (matches) {
    var keys = parse_keys(key);
    hash_assign(result, keys, value);
  }
  else {
    // Non bracket notation can make assignments directly.
    var existing = result[key];

    // If the value has been assigned already (for instance when a radio and
    // a checkbox have the same name attribute) convert the previous value
    // into an array before pushing into it.
    //
    // NOTE: If this requirement were removed all hash creation and
    // assignment could go through `hash_assign`.
    if (existing) {
      if (!Array.isArray(existing)) {
        result[key] = [ existing ];
      }

      result[key].push(value);
    }
    else {
      result[key] = value;
    }
  }

  return result;
}