• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/fields/cryptofield.php
  • Класс: Bitrix\Main\ORM\Fields\CryptoField
  • Вызов: CryptoField::decrypt
public function decrypt($data)
{
	if($data == '')
	{
		//is empty data still a secret?
		return $data;
	}
	try
	{
		//decrypt the data
		$value = base64_decode($data);
		$value = static::$cipher->decrypt($value, $this->cryptoKey);
		return $value;
	}
	catch(Security\SecurityException $e)
	{
		trigger_error("Error on decrypting the field {$this->getEntity()->getName()}.{$this->getName()}: {$e->getMessage()}", E_USER_WARNING);
		return null;
	}
}