• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/security/sign/timesigner.php
  • Класс: BitrixMainSecuritySignTimeSigner
  • Вызов: TimeSigner::unsign
public function unsign($signedValue, $salt = null)
{
	$timedValue = $this->signer->unsign($signedValue, $salt);

	if (mb_strpos($signedValue, $timedValue) === false)
		throw new BadSignatureException('Timestamp missing');

	list($value, $time) = $this->unpack($timedValue);
	$time = (int) $time;

	if ($time <= 0)
		throw new BadSignatureException(sprintf('Malformed timestamp %d', $time));

	if ($time < time())
		throw new BadSignatureException(sprintf('Signature timestamp expired (%d < %d)', $time, time()));

	return $value;
}