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
Parameter | Description | Version |
---|---|---|
$value | Message for signature | |
$time | Time stamp or date of signature (presented in the format similar to strtotime). | |
$salt | Salt, 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-2024
Up