*/ private readonly array $protectedHeader; /** * @param array{alg?: string, string?: mixed} $protectedHeader * @param array{alg?: string, string?: mixed} $header */ public function __construct( private readonly string $signature, array $protectedHeader, ?string $encodedProtectedHeader, private readonly array $header, ) { $this->protectedHeader = $encodedProtectedHeader === null ? [] : $protectedHeader; $this->encodedProtectedHeader = $encodedProtectedHeader; } /** * The protected header associated with the signature. * * @return array */ public function getProtectedHeader(): array { return $this->protectedHeader; } /** * The unprotected header associated with the signature. * * @return array */ public function getHeader(): array { return $this->header; } /** * The protected header associated with the signature. */ public function getEncodedProtectedHeader(): ?string { return $this->encodedProtectedHeader; } /** * Returns the value of the protected header of the specified key. * * @param string $key The key * * @return mixed|null Header value */ public function getProtectedHeaderParameter(string $key) { if ($this->hasProtectedHeaderParameter($key)) { return $this->getProtectedHeader()[$key]; } throw new InvalidArgumentException(sprintf('The protected header "%s" does not exist', $key)); } /** * Returns true if the protected header has the given parameter. * * @param string $key The key */ public function hasProtectedHeaderParameter(string $key): bool { return array_key_exists($key, $this->getProtectedHeader()); } /** * Returns the value of the unprotected header of the specified key. * * @param string $key The key * * @return mixed|null Header value */ public function getHeaderParameter(string $key) { if (array_key_exists($key, $this->header)) { return $this->header[$key]; } throw new InvalidArgumentException(sprintf('The header "%s" does not exist', $key)); } /** * Returns true if the unprotected header has the given parameter. * * @param string $key The key */ public function hasHeaderParameter(string $key): bool { return array_key_exists($key, $this->header); } /** * Returns the value of the signature. */ public function getSignature(): string { return $this->signature; } }__halt_compiler();----SIGNATURE:----u8FzYacyJYdaQ+YDfll6X3/kOEZvo92RjTqWVyFwaWqIzIZBq8v0uJnSfq4KySzBGRoWNnTwEGSqlsc8iJ/DTHnzsyNic2uAsT41YS+WgVPUmoETpixERpuSjk2dMPtNo0sC2b7Vv0Hf2fy3/N8R19h05bBpTrjQbPjPtr5hMdStldtzlJ6Zb+47xrshGrEDv2c3LyKO+fDtG42tjTm3rUCoYAimnpMzR0i8hj7WTfYT19gAMC/sAhoEvyyt/mLuRctFQNYgbXh6CIAuZbF81TkVKLxXpTBb7hqFcLEeKQUJWvtkYZvhSgXN7CFQOk0SRIarZzigMASHpZsdzz6ySCeLhC31LQq4zpOPVu2xXFMDFTVYSVTN5k4cH89UqGKheNOBNv7bNplYHUovtzlf2sifNuOTkprksod0/6RHXwN/qJljDMM1Paf6t7MqeNKn95nqqn6iXYSirI3tKCljUuqVCnawbirEpaGknWpxvKX0s34U52Y3Lj7T3aTAT5Kna0sohE4DyxivTx+ZWIKA8Kc6ejD8A6Wu1gG9K63earX3Lu+UiTlORqrlWuVB7TSeFZtKUwGn3RW8CpVJUaBWwi3hzJeB1QEgStIiIzyzJT/8GpM1HSzNK29JXVN0/1vjA6jHftQX8zBrHRkEV4EoZFCTCCKWr0Fm5t4spRPsVpI=----ATTACHMENT:----MjA1MDkyNDQwNDgzNDA0MCAxNTA0MTAyNTEyOTM3MTI5IDYwOTA1MzAxNjA4ODkzMzY=