• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/cookiescrypter.php
  • Класс: BitrixMainWebCookiesCrypter
  • Вызов: CookiesCrypter::buildCipher
protected function buildCipher(): self
{
	if ($this->cipher)
	{
		return $this;
	}

	$configuration = ConfigConfiguration::getInstance();

	$this->cipher = new Cipher();
	$this->cipherKey = $configuration->get('crypto')['crypto_key'] ?? null;
	if (!$this->cipherKey)
	{
		throw new SystemException('There is no crypto[crypto_key] in .settings.php. Generate it.');
	}
	$this->cipherKey = $this->prependSuffixToKey($this->cipherKey);

	return $this;
}