• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/backup.php
  • Класс: CPasswordStorage
  • Вызов: CPasswordStorage::getEncryptKey
static function getEncryptKey()
{
	static $key;

	if ($key === null)
	{
		/** @var string $LICENSE_KEY defined in the license_key.php */
		if (file_exists($file = $_SERVER['DOCUMENT_ROOT'].BX_ROOT.'/license_key.php'))
			include($file);
		if ($LICENSE_KEY == '')
			$LICENSE_KEY = 'DEMO';

		$key = $LICENSE_KEY;

		$l = strlen($key);
		if ($l > 56)
			$key = substr($key, 0, 56);
		elseif ($l < 16)
			$key = str_repeat($key, ceil(16/$l));
	}

	return $key;
}