• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/crypt.php
  • Класс: CCrypt
  • Вызов: CCrypt::Decrypt
function Decrypt($cipher)
{
	if (empty($cipher))
	{
		$this->errorMessage = "Empty cipher text";
		return false;
	}

	$text = false;
	switch ($this->blockCipherMode)
	{
		case CRYPT_MODE_ECB:
			$text = $this->__DecryptECB($cipher);
			break;

		case CRYPT_MODE_CBC:
			$text = $this->__DecryptCBC($cipher);
			break;

		default:
			$this->errorMessage = "Invalid mode '".$this->blockCipherMode."'";
	}

	return $text;
}