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

	if ($blockSize <= 0)
	{
		$text = $this->cipher->__Decrypt($cipher);
	}
	else
	{
		$cipherLength = mb_strlen($cipher);
		for ($i = 0; $i < $cipherLength; $i = $i + $blockSize)
		{
			$block = mb_substr($cipher, $i, $blockSize);
			$block = $this->cipher->__Decrypt($block);

			while (mb_substr($block, 0, 1) == "")
				$block = mb_substr($block, 1);

			$text .= $block;
		}
	}

	return $text;
}