public addRecipientInformation ( Jose\Object\JWKInterface $recipient_key, $recipient_headers = [] ) | ||
$recipient_key | Jose\Object\JWKInterface |
public function addRecipientInformation(JWKInterface $recipient_key, $recipient_headers = [])
{
Assertion::true(null === $this->getCiphertext(), 'The JWE is encrypted. No additional recipient allowed.');
$jwe = clone $this;
$jwe->recipients[] = Recipient::createRecipient($recipient_key, $recipient_headers);
return $jwe;
}