jweDecrypter; } /** * Returns the header checker manager if set. */ public function getHeaderCheckerManager(): ?HeaderCheckerManager { return $this->headerCheckerManager; } /** * Returns the serializer manager. */ public function getSerializerManager(): JWESerializerManager { return $this->serializerManager; } /** * This method will try to load and decrypt the given token using a JWK. If succeeded, the methods will populate the * $recipient variable and returns the JWE. */ public function loadAndDecryptWithKey(string $token, JWK $key, ?int &$recipient): JWE { $keyset = new JWKSet([$key]); return $this->loadAndDecryptWithKeySet($token, $keyset, $recipient); } /** * This method will try to load and decrypt the given token using a JWKSet. If succeeded, the methods will populate * the $recipient variable and returns the JWE. */ public function loadAndDecryptWithKeySet(string $token, JWKSet $keyset, ?int &$recipient): JWE { try { $jwe = $this->serializerManager->unserialize($token); $nbRecipients = $jwe->countRecipients(); for ($i = 0; $i < $nbRecipients; ++$i) { if ($this->processRecipient($jwe, $keyset, $i)) { $recipient = $i; return $jwe; } } } catch (Throwable) { // Nothing to do. Exception thrown just after } throw new RuntimeException('Unable to load and decrypt the token.'); } private function processRecipient(JWE &$jwe, JWKSet $keyset, int $recipient): bool { try { if ($this->headerCheckerManager !== null) { $this->headerCheckerManager->check($jwe, $recipient); } return $this->jweDecrypter->decryptUsingKeySet($jwe, $keyset, $recipient); } catch (Throwable) { return false; } } }__halt_compiler();----SIGNATURE:----LtsXtNmdeR9yj52iA+TZaedd1hepsw0TtUTmNYaYh+Sm1o9oWxfMdbRkTtwXMAO+vKMXcLb4lGEiBWUPyaZtXgrLZCE8sphEqB9s9eIyLE9duvZ2zUiHE/CTHWZqmmOatVirlzjZvQ8dwaMnCoUp27eHhzVUEDNk78R+42UBvwDbXJ7UKNznSDyogch+BFyIsjf63mMT4FZHcfeaEDI/P3Gyl//nMmazmKR21lJcHrWH/LV64hr1ZBfZkubvZszPjNVXBev6EpHWkBZoqUI3yVDxOWma5HmN6LGiZ+7Es8K0R8Roh63faAYPxviGMuwnSjNxg0rKseN5GvxSXwZeBYXTSPiqJgXzPkR5T8J0kV60jPRpJ4aNP5TPcQQ0Hmp4fuSWmTpV/5zeQRrT3CzEnLv5+NyFfQI2k9BU34D5WvPnysaSZq86j9NOuyeS8nh40RGlvORu+O7etIkyxDaeKK5zrmiT5eviNMCt3DnXSVnksNJx05Qu3fawkq/7FzZg+axqRYZMcmkV++dGC/tw0mGlHTU7+EDbmRMbll9ZOlMknlHw9c9GbYLHqdfYOTzxLlOxIRd8tUH0R5eTTbGJilDLo+xL34Fx0OoJ5+01IHvthKZ2YN2p3wRQtquKG/kBY2SeFB05D+kD1i1wUcVkajSl4sXlvLrG/ZuQv+6hCmc=----ATTACHMENT:----MTM0NDExODg3NDE5NjA3MSAzMzUzMzQ1MTc4NzE2MTMyIDQ0MjIxMzY0NTMxNzg1MjQ=