Returns text hash

@param string $text User supplie text

@return string
964000
public function getHash($text = null)
    {
        // inserting captcha record
        $time = time() + $this->timeout;
        $textHash = $this->getTextHash($text);

        // if session is started - storing captcha info here
        $session = $this->getSession();
        if ($session->isSessionStarted()) {
            $hash = oxUtilsObject::getInstance()->generateUID();
            $hashArray = $session->getVariable('captchaHashes');
            $hashArray[$hash] = array($textHash => $time);
            $session->setVariable('captchaHashes', $hashArray);
        } else {
            $database = DatabaseProvider::getDb();
            $query = "insert into oecaptcha (oxhash, oxtime) values (" .
                      $database->quote($textHash) . ", " . $database->quote($time) . ")";
            $database->execute($query);
            $hash = $database->getOne('select LAST_INSERT_ID()', false, false);
        }

        return $hash;
    }
154169
public static function normalizeText($text)
    {
        $text = strtolower($text);
        $text = preg_replace('/[^a-z0-9 -]/im', ' ', $text);
        $text = preg_replace('/( +)/im', ' ', $text);

        return trim($text);
    }
670267
public static function humanize($text)
    {
        preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $text, $matches);
        $ret = $matches[0];

        foreach ($ret as &$match) {
            $match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);
        }

        return ucfirst(implode(' ', $ret));
    }
1362530
public function processText(string $text): string
    {
        $text = str_replace("<br>", "", $text);
        $text = str_replace("<br/>", "", $text);
        $text = str_replace("<br />", "", $text);
        $text = str_replace("\n", "<br>", $text);
        $text = str_replace("\t", "&nbsp; &nbsp; &nbsp;", $text);

        return preg_replace($this->pattern, $this->replace, $text);
    }
285991
public static function transliterate($text)
    {
        self::init();

        if (preg_match_all(self::$regex, $text, $matches)) {
            for ($i = 0; $i < count($matches[0]); $i++) {
                $char = $matches[0][$i];
                if (isset (self::$map[$char])) {
                    $text = str_replace($char, self::$map[$char], $text);
                }
            }
        }

        return $text;
    }
975550
public function say($text)
    {
        $message = $this->getSpeechBubble($text);
        
        return str_replace(
          '{{bubble}}',
          $message,
          $this->character
        );
    }
133937
protected function encrypt($text): string
    {
        $length = strlen($text);
        $plain = '';
        for ($iteration = 0; $iteration < $length; $iteration += 8) {
            $lBlock = $this->asc2int(substr($text, $iteration, 4));
            $rBlock = $this->asc2int(substr($text, $iteration + 4, 4));
            list($lBlock, $rBlock) = $this->bfEncrypt($lBlock, $rBlock);
            $plain .= $this->int2asc($lBlock) . $this->int2asc($rBlock);
        }
        return $plain;
    }
730823
protected function replaceTextTokens($text)
    {
        foreach ($this->tokens as $key => $val) {
            $text = str_replace('<' . $key . '>', $val, $text);
        }

        return $text;
    }
711619
static function parse($text)
    {
        $parser = new \Parsedown();

        $text = static::cleanLeadingSpace($text);

        return $parser->text($text);
    }
1284864
public function hash(string $string): Hash {
        $hash = new Hash();
        $hash->setAlgorithm($this->getAlgorithm());
        $value = hash($this->getAlgorithm(), $string, true);
        $hash->setValue($value);
        return $hash;
    }
1016643
public static String generateShaHash(String text) {
		try {
			MessageDigest digest = MessageDigest.getInstance(SHA_ALGORITHM);
			byte[] bytes = text.getBytes(UTF_8);
			bytes = digest.digest(bytes);
			return toHexEncode(bytes);
		} catch (Exception e) {
			throw new UnexpectedException(e);
		}
	}
1317703
public function decrypt($text): string
    {
        $length = strlen($text);
        $plain = '';
        for ($iteration = 0; $iteration < $length; $iteration += 8) {
            $aBlock = $this->asc2int(substr($text, $iteration, 4));
            $bBlock = $this->asc2int(substr($text, $iteration + 4, 4));
            list($aBlock, $bBlock) = $this->bfDecrypt($aBlock, $bBlock);
            $plain .= $this->int2asc($aBlock) . $this->int2asc($bBlock);
        }
        return $plain;
    }
536167
public function clean($text)
    {
        if (!$this->type) {
            return $text;
        }

        return static::$filter->clean($text, $this->type);
    }
1296101
public static String getMD5Hash(String text) {
    MessageDigest md;
    byte[] md5hash = new byte[32];
    try {
      md = MessageDigest.getInstance("MD5");
      md.update(text.getBytes("iso-8859-1"), 0, text.length());
      md5hash = md.digest();
    } catch (NoSuchAlgorithmException e) {
      e.printStackTrace();
    } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    return convertToHex(md5hash);
  }
668494
private function decode($text) {
		$pad = ord(substr($text, -1));
		if ($pad < 1 || $pad > 32) {
			$pad = 0;
		}

		return substr($text, 0, (strlen($text) - $pad));
	}
58893
public function snakeToCamel($text)
	{
		if (strpos($text, '_') !== false)
		{
			$bits = explode('_', $text);
			$bits = array_map('ucfirst', $bits);
			$text = lcfirst(implode('', $bits));
		}

		return $text;
	}
253301
public function text( string $text ): string
	{
		$then = $this->getThen();
		if( $this->lang_text )
		{
			return $this->lang->text($text, $then);
		}
		else
		{
			return $text;
		}
	}