1 | <?php |
||
23 | final class ContentEncryptionAlgorithmChecker implements HeaderChecker |
||
24 | { |
||
25 | private const HEADER_NAME = 'enc'; |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $protectedHeader = false; |
||
31 | |||
32 | /** |
||
33 | * @var string[] |
||
34 | */ |
||
35 | private $supportedAlgorithms; |
||
36 | |||
37 | /** |
||
38 | * @param string[] $supportedAlgorithms |
||
39 | */ |
||
40 | public function __construct(array $supportedAlgorithms, bool $protectedHeader = false) |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | * |
||
49 | * @throws InvalidHeaderException if the header is invalid |
||
50 | */ |
||
51 | public function checkHeader($value): void |
||
60 | |||
61 | public function supportedHeader(): string |
||
65 | |||
66 | public function protectedHeaderOnly(): bool |
||
70 | } |
||
71 |