- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/lib/security/sign/signer.php
- Класс: BitrixMainSecuritySignSigner
- Вызов: Signer::unpack
public function unpack($value, $limit = 2)
{
// Some kind of optimization
if ($limit === 0)
{
if (strpos($value, $this->separator) === false)
throw new BadSignatureException('Separator not found in value');
return explode($this->separator, $value);
}
$result = array();
while(--$limit > 0)
{
$pos = bxstrrpos($value, $this->separator);
if ($pos === false)
throw new BadSignatureException('Separator not found in value');
$result[] = mb_substr($value, $pos + 1);
$value = mb_substr($value, 0, $pos);
}
$result[] = $value;
return array_reverse($result);
}