Returns a unique hash for the context of the current request, depending
on whether the request comes from frontend or backend.

@return string
9602
public function getContextHash()
    {
        return ($this->environmentService->isEnvironmentInFrontendMode())
            ? 'fe-' . Core::get()->getPageController()->id
            : 'be-' . StringService::get()->sanitizeString(GeneralUtility::_GET('M'));
    }
365774
protected function _csrf_set_hash() {
		if ($this->_csrf_hash == '') {
			// If the cookie exists we will use it's value.
			// We don't necessarily want to regenerate it with
			// each page load since a page could contain embedded
			// sub-pages causing this feature to fail
			if (isset($_COOKIE[$this->_csrf_cookie_name]) && preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[$this->_csrf_cookie_name]) === 1) {
				return $this->_csrf_hash = $_COOKIE[$this->_csrf_cookie_name];
			}
			
			return $this->_csrf_hash = md5(uniqid(rand(), TRUE));
		}
		
		return $this->_csrf_hash;
	}
117962
protected function getHash()
    {
        $query  = $this->getSQL();
        $hints  = $this->getHints();
        $params = array_map(function(Parameter $parameter) {
            // Small optimization
            // Does not invoke processParameterValue for scalar values
            if (is_scalar($value = $parameter->getValue())) {
                return $value;
            }

            return $this->processParameterValue($value);
        }, $this->parameters->getValues());

        ksort($hints);

        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
    }
897773
private function getHash()
	{
		if($this->_hash===null)
			$this->_hash=sha1(serialize($this));
		return $this->_hash;
	}
378330
protected function getContentTypesHash()
    {
        $contentTypeHash = [];
        foreach ($this->contentTypeService->loadContentTypeGroups() as $contentTypeGroup) {
            foreach ($this->contentTypeService->loadContentTypes($contentTypeGroup) as $contentType) {
                $contentTypeHash[$contentType->getName()] = $contentType->identifier;
            }
        }
        ksort($contentTypeHash);

        return $contentTypeHash;
    }
1249836
protected function getHash()
    {
        return md5(sprintf('%s %s %s %s',
            $this->getMethod(),
            $this->getPath(),
            json_encode($this->getHeaders()),
            json_encode($this->getQueryString())
        ));
    }
687121
public function getHashCode()
    {
        if ($this->isSupervisor) {
            return $this->getSharedComponent()->getHashCode();
        }
        return md5(
            $this->name .
            $this->size .
            ($this->bold ? 't' : 'f') .
            ($this->italic ? 't' : 'f') .
            ($this->superScript ? 't' : 'f') .
            ($this->subScript ? 't' : 'f') .
            $this->underline .
            ($this->strikethrough ? 't' : 'f') .
            $this->color->getHashCode() .
            __CLASS__
        );
    }
803481
public function getHashCode() {
    	return md5(
    		  $this->_conditionType
    		. $this->_operatorType
    		. implode(';', $this->_condition)
    		. $this->_style->getHashCode()
    		. __CLASS__
    	);
    }
901669
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->name,
            $this->titles->calculateHash(),
            $this->descriptions->calculateHash(),
            $this->author,
            $this->version,
            $this->fileName,
            $this->directoryName,
            array_map(function (Dependency $dependency): string {
                return $dependency->calculateHash();
            }, $this->dependencies),
            $this->thumbnailHash,
            $this->checksum,
            $this->order,
        ]);
    }
269489
public function xss_hash() {
		if ($this->_xss_hash == '') {
			mt_srand();
			$this->_xss_hash = md5(time() + mt_rand(0, 1999999999));
		}
		
		return $this->_xss_hash;
	}
42284
public function get_pathnamehash() {
        return sha1('/'.$this->get_contextid().'/'.$this->get_component().'/'.$this->get_filearea().'/'.$this->get_itemid().$this->get_filepath().$this->get_filename());
    }
312362
public function doHash()
    {
        return $this->attributes['hash'] = md5(
            $this->start_at.'/'.
            $this->contact_id.'/'.
            $this->business_id.'/'.
            $this->service_id
        );
    }
1370612
public function getHashCode() {
    	return md5(
    		  $this->_path
    		. $this->_name
    		. $this->_offsetX
    		. $this->_offsetY
    		. $this->_width
    		. $this->_height
    		. __CLASS__
    	);
    }
142697
public function getHash()
	{
		if (is_null($this->hash)) {
			if ($this->content != null) {
				$this->hash = sha1($this->content);
			} else {
				$path = ResourceUtil::createTempDir() . DIRECTORY_SEPARATOR . $this->getFilename();
				file_put_contents($path, $this->getStream());
				$this->hash = sha1_file($path);
				unlink($path);
				rmdir(dirname($path));
			}
		}
		return $this->hash;
	}
1260364
protected function makeSoapClientHash()
    {
        return sha1(
            $this->request->getLocation()
            . json_encode($this->request->getOptions())
            . json_encode($this->request->getHeaders())
        );
    }
121482
public function getCookie()
    {
        $request = Request::current();
        $settings = CsrfSettings::singleton();

        if ($request instanceof WebRequest){
            $existingCookie = $request->cookie(self::TOKEN_COOKIE_NAME, false);

            if ($existingCookie){
                $this->currentCookie = $existingCookie;
            }
        }

        if (!$this->currentCookie) {
            $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345689.;,!$%^&*()-=+";
            $cookie = "";
            for ($x = 0; $x < self::TOKEN_COOKIE_LENGTH; $x++) {
                $rand = rand(0, strlen($chars) - 1);
                $char = $chars[$rand];

                if (rand(0, 1) == 1) {
                    $char = strtolower($char);
                }

                $cookie .= $char;
            }

            $this->currentCookie = $cookie;

            HttpResponse::setCookie(self::TOKEN_COOKIE_NAME, $cookie, 0, '/', parse_url($settings->domain, PHP_URL_HOST), false, true);
        }

        return $this->currentCookie;
    }
1166183
public function getHash()
	{
		$names = array_keys($this->modules);
		sort($names);
		
		return md5(implode('|', $names));
	}