19 declare(strict_types=1);
    29 use ILIAS\FileDelivery\Token\Signer\Key\DigestMethod\Concat as NoneDigest;
    62         $this->salt_factory = 
new Factory();
    65         $algorithm = 
new SHA1();
    82         $this->payload_builder = 
new Builder();
    88         Disposition $disposition,
    92         $payload = $this->payload_builder->shortFile(
    98         if ($until !== null) {
    99             $payload->setUntil($until->getTimestamp());
   102         return $this->signing_serializer->sign(
   104             $this->salt_factory->create(
'stream')
   111         if (
$data === null) {
   114         return $this->payload_builder->shortFileFromRaw(
$data);
   124         if ($until !== null) {
   125             $payload->setUntil($until->getTimestamp());
   128         return $this->signing_serializer->sign(
   130             $this->salt_factory->create($salt)
   138         return $this->signing_serializer->verify(
   140             $this->salt_factory->create($salt)
 
getSignedStreamToken(FileStream $stream, string $filename, Disposition $disposition, int $user_id, \DateTimeImmutable $until=null)
 
SigningSerializer $signing_serializer
 
verify(string $token, string $salt)
 
verifyStreamToken(string $token)
 
The salt is combined with the secret key to derive a unique key for distinguishing different contexts...
 
if(count($parts) !=3) $payload
 
sign(array $data, string $salt, \DateTimeImmutable $until=null)
 
__construct(SecretKeyRotation $key_rotation)
 
The base interface for all filesystem streams. 
 
Key rotation can provide an extra layer of mitigation against an attacker discovering a secret key...