public function decryptUsingKeySet(JWE &$jwe, JWKSet $jwkset, int $recipient): bool
    {
        $this->checkJWKSet($jwkset);
        $this->checkPayload($jwe);
        $this->checkRecipients($jwe);

        $plaintext = $this->decryptRecipientKey($jwe, $jwkset, $recipient);
        if (null !== $plaintext) {
            $jwe = $jwe->withPayload($plaintext);

            return true;
        }

        return false;
    }