• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/fields/cryptofield.php
  • Класс: Bitrix\Main\ORM\Fields\CryptoField
  • Вызов: CryptoField::cryptoAvailable
static function cryptoAvailable($key = '')
{
	if($key == '')
	{
		// get the key from the settings
		$key = static::getDefaultKey();
	}

	if($key <> '')
	{
		if(static::$cipher === null)
		{
			try
			{
				static::$cipher = new Security\Cipher();
			}
			catch(Security\SecurityException $e)
			{
				static::$cipher = false;
			}
		}
	}

	return ($key <> '' && static::$cipher);
}