Documentation

sign

string public
\Bitrix\Main\Security\Sign\TimeSigner::sign(
 string $value,
 string $time,
 string|null $salt = null
);

Non-static method signs message with expired time, returns string in the format: {message}{separator}{expired timestamp}{separator}{signature}.

Parameters

ParameterDescriptionVersion
$valueMessage for signature
$timeTime stamp or date of signature (presented in the format similar to strtotime).
$saltSalt, if required.

Example

 // If salt needed
 $foo = (new TimeSigner)->sign('test', '+1 hour', 'my_salt');

 // Otherwise
 $bar = (new TimeSigner)->sign('test', '+1 day');



© «Bitrix24», 2001-2022
Up