lib/3rdParty/composer/web-token/jwt-library/Encryption/Serializer/JWESerializer.php
raw symbols SCIP| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Jose\Component\Encryption\Serializer; |
| 6 | |
| 7 | use Jose\Component\Encryption\JWE; |
| 8 | |
| 9 | interface JWESerializer |
| 10 | { |
| 11 | /** |
| 12 | * The name of the serialization method. |
| 13 | */ |
| 14 | public function name(): string; |
| 15 | |
| 16 | /** |
| 17 | * Display name of the serialization method. |
| 18 | */ |
| 19 | public function displayName(): string; |
| 20 | |
| 21 | /** |
| 22 | * Converts a JWE into a string. If the JWE is designed for multiple recipients and the serializer only supports one |
| 23 | * recipient, the recipient index has to be set. |
| 24 | */ |
| 25 | public function serialize(JWE $jws, ?int $recipientIndex = null): string; |
| 26 | |
| 27 | /** |
| 28 | * Loads data and return a JWE object. Throws an exception in case of failure. |
| 29 | * |
| 30 | * @param string $input A string that represents a JWE |
| 31 | */ |
| 32 | public function unserialize(string $input): JWE; |
| 33 | } |