• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/security/mfa/hotpalgorithm.php
  • Класс: BitrixMainSecurityMfaHotpAlgorithm
  • Вызов: HotpAlgorithm::getSyncParameters
public function getSyncParameters($inputA, $inputB)
{
	$counter = 0;
	$this->window = 1;
	for ($i = 0; $i < self::SYNC_WINDOW; $i++)
	{
		[$verifyA,] = $this->verify($inputA, $counter);
		[$verifyB,] = $this->verify($inputB, $counter + 1);
		$counter++;
		if ($verifyA && $verifyB)
		{
			break;
		}
	}

	if ($i === self::SYNC_WINDOW)
	{
		throw new OtpException('Cannot synchronize this secret key with the provided password values.');
	}

	return $counter;
}