• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/authentication/shortcode.php
  • Класс: BitrixMainAuthenticationShortCode
  • Вызов: ShortCode::generate
public function generate()
{
	$totp = new MfaTotpAlgorithm();
	$totp->setInterval($this->checkInterval);
	$totp->setSecret($this->code->getOtpSecret());

	$timecode = $totp->timecode(time());
	$shortCode = $totp->generateOTP($timecode);

	return $shortCode;
}